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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53A12CCFA18 for ; Thu, 26 Sep 2024 10:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:Date:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rHiLJNBB/41WE31WdhaR0g0jRJOrTR5n+xXIapCfqdY=; b=xNgVwoSa2BauSKhrfjqm5J1zQU rduKHeIIWa0bAru9dR+JQjxvuC8UYtpmB9TUgaWnEwBcVAYEnCqcOWdJrTGVQlO+2wGBFBd9OAV4r jtV4+cfONJyO7ElTZLsCe60OafdVSC5eJD9zJ4fMnVVI++O5vLToiCaAPzvahlDa+C9eUkMdbIK83 jAVryvoE6uS1dnDguy5pZCIF08KP2DjIAcHLrp8cOfTHMTVrYyMjTsjOkXkUlwL5GsBDnsIh2njQ7 /Fz13V2+5n5NOVfg5WvhbY1bll8KQaQX+T13BODvsIGfLXim3cg2c/Smc0HGnTZsUpIYRx10Wy1pH KcsRM7+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stlVS-0000000816w-0oCQ; Thu, 26 Sep 2024 10:13:54 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stlUH-00000008113-04gQ for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2024 10:12:42 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-205722ba00cso7082445ad.0 for ; Thu, 26 Sep 2024 03:12:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727345559; x=1727950359; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=rHiLJNBB/41WE31WdhaR0g0jRJOrTR5n+xXIapCfqdY=; b=bh1Uf2ySAhxr1GaXRixzOR2bzsLHonxpTKFneAjNWQ1R6oG0iKnQf1LtMqGkiH5tC2 5FJ9wMJrvak8D53oBSfRTMpcSK0XqzNRHwg4iY/1pyR82HDPESDj89hAOd34T847yJZ3 OYL10mqq7BtD8gDSLZSA5vWMIumf3sW+uKb20j3I2YH+4hH1FQekLRJuYAKMVOJClqQy 9RqK4N8SHFVfBnInWMqj9Slcf7vDjTO35R1GpI81Ooxi//DrOwhDawjflA+hAKcM6ZRD FxnkdLILQKIOkCRSzxY8A0r/e3y2POAN6fwcujRnfV7eVKYW79H44tNDT2rOckwrg9Kr 5Gmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727345559; x=1727950359; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rHiLJNBB/41WE31WdhaR0g0jRJOrTR5n+xXIapCfqdY=; b=wWzlj1MPaJhdUU6kWpN3wQFoufUCr8ZsM0zE0kCcabKwDfpfbdQolYXcP21PH0Xget kf+MP76KDzCw9YOLiFXLIAGsP2in5XjXgSLn4kO6GEZaKOStoHKMSKynQ21/swsEN0Dv 0JsNzuwwz/wvyPWw+5mbXh4Jyg0UixY7dROMQu2piqPKxyZQ369l3X/BwQUAi1p59NSf COG6UaX9QHsfnMxa2mGjwMHGC4XlN424M6p1Fl4uUO/UKlEpTQ8PwyGCYLFRWdHq69KL 64+dwSdzBZoNJhwEKkikcx0seCcr1APfjIXB1k7wVOHAzKYPY6Moir/hTou2LrewqWSt 5Adw== X-Forwarded-Encrypted: i=1; AJvYcCU7g/Pt+BbMsA/sN+LWLi3qocDI9ir5AD+dLKWxjAhSbvg7yliP9INwkWLToNvTjK46S0ftYJzQu/+QDhQd85mx@lists.infradead.org X-Gm-Message-State: AOJu0YyDYnC4jjiBIspo8nnZ0+QDQYW6Kc9HX0aDH4j/JYSNKDjbea+7 avWag14Q8D5ZDF02JgvhhQ7t5u59DkstQueunrYNUhn5gK68Wnof X-Google-Smtp-Source: AGHT+IG6npOBZQBUv2CaB6oxk/etFDLRwBmkJRqCGddQRwUXf7hnBxoK/LtL8pMadDgjcrPTHodPNw== X-Received: by 2002:a17:902:d58f:b0:206:a011:32cc with SMTP id d9443c01a7336-20afc4483cfmr77683435ad.14.1727345559052; Thu, 26 Sep 2024 03:12:39 -0700 (PDT) Received: from localhost ([183.226.245.34]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af172207csm35630685ad.67.2024.09.26.03.12.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 03:12:38 -0700 (PDT) From: chenqiwu X-Google-Original-From: chenqiwu Date: Thu, 26 Sep 2024 18:12:35 +0800 To: Oleg Nesterov Cc: chenqiwu , 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 Subject: Re: [PATCH v4 2/2] arm64: show signal info for global init Message-ID: <20240926101235.GA3662@rlk> References: <20240924074341.37272-1-qiwu.chen@transsion.com> <20240924074341.37272-2-qiwu.chen@transsion.com> <20240924183634.GB17395@redhat.com> <20240925035440.GA2941@rlk> <20240925120546.GA26882@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240925120546.GA26882@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240926_031241_082291_5C1BD6B5 X-CRM114-Status: GOOD ( 21.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 25, 2024 at 02:05:47PM +0200, Oleg Nesterov wrote: > > > > > Yes, this patch just try to bypass the show_unhandled_signals and > > __ratelimit() checks for the global init. > > I think the changelog should explain this. > Sure, I will explain this in the changelog of patch v5 if someone else would ACK this patch. > But this doesn't look right to me, see below. > > > > 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... > > > > > I think the orignal logic is the signal sent to the global init is > > regarded as unhandled becuase it has SIGNAL_UNKILLABLE feature. > > And? How does this relate to SIGNAL_UNKILLABLE? Again, this check predates > the git history and the SIGNAL_UNKILLABLE feature. And SIGNAL_UNKILLABLE > has no effect in this case, see force_sig_info_to_task(). > Thanks for your explaination! For the report on ARM64 KVM, the signal sent to the global init by arm4_force_sig() and the global init do_exit by get_signal(). However, it doesn't show signal info due to show_unhandled_signals check, because the initial value of show_unhandled_signals is 0 which can be adjusted by /proc/sys/debug/exception-trace in root mode. In ARM64 productive environment, the default value of show_unhandled_signals is set to 0 in case of show_unhandled_signals storms, and the debuggers cannot adjust it dynamically by shell in non-root mode. Considering the minor case of kill init, this change won't have any side effect. Let's to see the ARM64 maintainers if really like it :) Thanks Qiwu