From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A73A6CF9C6B for ; Tue, 24 Sep 2024 18:45:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 11A0E6B00AD; Tue, 24 Sep 2024 14:45:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CAE66B00AE; Tue, 24 Sep 2024 14:45:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED4076B00AF; Tue, 24 Sep 2024 14:45:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D04496B00AD for ; Tue, 24 Sep 2024 14:45:11 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 77646ABB41 for ; Tue, 24 Sep 2024 18:45:11 +0000 (UTC) X-FDA: 82600509222.20.B2C6B98 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf13.hostedemail.com (Postfix) with ESMTP id 65AF620010 for ; Tue, 24 Sep 2024 18:45:09 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="ScYoiyP/"; spf=pass (imf13.hostedemail.com: domain of oleg@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=oleg@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727203391; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Zt72CyM9B0sv7aGUDR0oUAP65oR3BubIzw+MfhGukWY=; b=Zw5JIy+Wx2ytigii+XBQ4XhbSjIACGg7ygT+drEEJhoeNvDRgTWypkLQy9hHn4GGb49Cqe WUciOqAeOgCrNqgMWAUqUAhzU5GjNZQ9VHb5SnPZpCr7gI1xc25KjVtq3mgNZJ64u1EA8w OFazhqWAQ8Voi5dE/dwHsy/ZT7goytQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727203391; a=rsa-sha256; cv=none; b=USipZDQpFd7L0FvrSQKvBpiHdPKWUMIX9AP+5NfnpqDW0rUbl0hTfWUmsrSEcoC8grppIb yw0WsuuFND5vM1xfv2Nbt/KQkrrrK1zjJLfMD1bxf/8JlFYdgRfDkfNTB5eHfkaXxuta8B R4AIXZWJL13MM3W1jsS7vYO/ZnZln5E= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="ScYoiyP/"; spf=pass (imf13.hostedemail.com: domain of oleg@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=oleg@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727203508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zt72CyM9B0sv7aGUDR0oUAP65oR3BubIzw+MfhGukWY=; b=ScYoiyP/WZbv9nVkR+8UnIdRnSzR5qVJtQITf5itlFyJCMzmljbzRzgvjOiDMBHWgWQ0hx xFUhhcNXXgpvjCgX9l7o/iX2ygVko6tDECNSmE7HzFCNVXJmJ1yEgvMsrmCaai2e5dPiYj R+BU1fu90knz2nMuZKyX0p501I9FZkU= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-62-SpljQlxaOWOK3fVkVgEt3w-1; Tue, 24 Sep 2024 14:45:05 -0400 X-MC-Unique: SpljQlxaOWOK3fVkVgEt3w-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (unknown [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 22B831936CD1; Tue, 24 Sep 2024 18:45:03 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.226.71]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 011881955D7A; Tue, 24 Sep 2024 18:36:48 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 24 Sep 2024 20:36:40 +0200 (CEST) Date: Tue, 24 Sep 2024 20:36:35 +0200 From: Oleg Nesterov To: "qiwu.chen" Cc: corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, paulmck@kernel.org, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, "qiwu.chen" Subject: Re: [PATCH v4 2/2] arm64: show signal info for global init Message-ID: <20240924183634.GB17395@redhat.com> References: <20240924074341.37272-1-qiwu.chen@transsion.com> <20240924074341.37272-2-qiwu.chen@transsion.com> MIME-Version: 1.0 In-Reply-To: <20240924074341.37272-2-qiwu.chen@transsion.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 65AF620010 X-Stat-Signature: 3dnrnh5514cbk4iasxgtpp4e14zk7iyp X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1727203509-157777 X-HE-Meta: U2FsdGVkX18Ug/fVICFxfC58yCyOpPZU5NhWcEjfROIrfbETPmXUjk9StkXJsUyRJURtDzD4jTW6t5jXtzCvgwcuboQDD5+XDyuoChFStrnyU5/fFWM08CsE32K0nV8bV2otGQDrYChAGpccah7BnaeGpeongbgD8kFk2GUy5+6iAm4Bs4eornv3xwYwkV7BCix9B8mRfxJN6TUriUIaA3GV9yRiXc7o+PXY6Kjp6AeDeuQyo9N3hhKmcrG9jUHVHl68HXkYmx0LJpNqrEdSWEa3G+Zeddx687BNi/cFjYi1rhkws71JIWDqmnJisiS5Hq/OyGqune5aWmAuskyR3mnvCpNtMSGQ4CS+LYi2jaKvIHtg+1s7IkDMHnQupRDmlpCGUppq4Ajey1R+qZ4+jIW7Q/bVRD/N1zQaq/9FDjFFPOTmGn7+CQVMOQK8KTwAF+atjnz1aiciWzLESqAurE2rzIuI4i7isIfV+xDrKC1JDCyC1ONm1/+KKW3TZPgPQzPOrZwilEz/4iaqSa3wd7qjcga3Ha27EmS0eGMW1HIbXNt4Ws2GMu7cCqLZyuD20Z53okENYWUU6OLMFqMmrdBxCu8FjUMFmzkURh2QQFRWa7duwp5sRKwghCbpSPwAEW6/oZbQwNVUhjRMrP8TzxtTnbRI/PHDonxaUv1jQCT5OZsjmKkLb6nfSi1oGbysg/Nx4atzsa+fjhrwryc6tMoCqXKSY6XLKT9b1MZAgJLvVMF0N7p+/HV9/OAU4l1OQO7y4q+JqHDXsDwEGgUngZ57XQJ2gj2qNC+raxPH7MDaUaDrVPW5Y/eQbIioojV1BTg42kYCtSLNd9QaHt3/noGTKkZs5zRfAI2Fez6X8CsUfIiwnXewjlZS99scq2FoYzshxqh1svJuL9CRwEEuFKGCpbjuWuwt9yNuTNYlcA3QE3fgk1/5IQGUUHF+lsARcaZqUGpeYtu7W7pQJxb XPKZ8djT Khjds6Ut+Qz5igiDdPj8ldgvQY8iUDLxKVU8kXOjeRmNiapolUZ8Qc/UPCYhxqeap1h9oIE8BvNEsQ8kKQmfcKBp59L4Ded7eA1fk+ezTsXBtE82WoqaRNj/hCyoJkF5PZOmubFvRTZpcQhVv2LjaGVmu0Df7dCJQ8yl398PeX71Zmwo8xAqCCzyQl1gitdBI2rwTWgUuelWc0xX9U5H9GUuw4vTeL2MQepaYPlUgMiqw29NQ1/YzH+yv14GDmeKWohIO7b1YfcjPQBlAkT+3kVCrQ7qguPgKLTDJhc3nOIncMqduzdlrfwynRAjuQnQ5Hcn1g+xntlMNKkiPUULmXiWG7CuCXlSKnK44 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Well, can't comment, I leave this to the arch/arm64/ maintainers. but let me add a bit of spam just for the record, On 09/24, qiwu.chen wrote: > > --- a/arch/arm64/kernel/traps.c > +++ b/arch/arm64/kernel/traps.c > @@ -247,12 +247,20 @@ static void arm64_show_signal(int signo, const char *str) > unsigned long esr = tsk->thread.fault_code; > struct pt_regs *regs = task_pt_regs(tsk); > > + /* > + * The signal sent to the global init needs to be shown, > + * which is useful for debugging kill init issue. > + */ > + if (unlikely(is_global_init(tsk))) > + goto dump; > + > /* Leave if the signal won't be shown */ > if (!show_unhandled_signals || > !unhandled_signal(tsk, signo) || > !__ratelimit(&rs)) > return; > > +dump: So what does this patch try to do? Note that unhandled_signal(tsk) returns true if is_global_init(tsk). So it seems that this patch just tries to bypass the show_unhandled_signals and __ratelimit() checks? Or what? OTOH. The is_global_init() check in unhandled_signal() (which predates the git history) doesn't look right to me. If init has a handler for, say, SIGSEGV, why should the kernel complain? I need to recheck this logic... Oleg.