Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2266819pxb; Sat, 2 Oct 2021 11:27:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjJxMHj2ubbBqCbvQ3MuIlIewWmu/vKXHFnazDm9Y1xsROGfdHK+wgmaNdOm06ol+rXrH2 X-Received: by 2002:a17:906:3192:: with SMTP id 18mr5626471ejy.246.1633199254281; Sat, 02 Oct 2021 11:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633199254; cv=none; d=google.com; s=arc-20160816; b=FqnBXo6T96LdVcyPqRuuCRqjVpg6fYj589CzgAVaR1P1r/T0HPu0T25D/OTqvctsfh T3GHfMEIQO6tC2YpwwldHZtqsnDXnyBfmgPqV+Q9xp+EKSA333houVC+NBhjy852ZjOS MEC4M1pFHIHtY+jFdEc+xAgPtHtijujkhw8TPpxMGuTL0eNHharY+WoazHZxA80jTzMf 2/epUgGDr99pDCvfluSwmbeHfo3AbF4B4ZVKG7PfZ27dTQDcIPRUYuCSk0AC+EdSDJyY aK42OLg5nytktu8l1prldDEwbfPiP+np2F/81f+4To+w4suWocW/636gpnOTzw3XMLPq KVHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=779Gg6DZ5/ez0f953/sSts1WtDFJS/pvJrTnnfl+5x8=; b=CtkOSXSSz9axS+VC3UkA6iE1ZCBl8W06amqZ9G4+G0zM07DTYmjkpHkeiJn2/uWf2R 4O1wi8tIQT6JffL/akNODzPv6oDUNXM1R6iey8MkTUFpSool74CQjl0HejEmTNehTrVF 1SvHYc4lCmRddgov/tMWxMM1Zq9hiMbVnyjMiY+H+FXF/H9ACvEICTQ9mI57J52uD4T7 t5YhACVw2cQioGgXQx8+YRGneDmV3d6dUlPRhXI54Xq4rhR2wSF+Ys1n4MdmkIw3d3JU SzVnMlMwd3xhjzR8OplCGAjCPaV99onfdK9eaHEW2mYecth2/1UnZ7nixuw7WlV16MIh ZDgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si4511022edm.458.2021.10.02.11.26.58; Sat, 02 Oct 2021 11:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233836AbhJBSX4 (ORCPT + 99 others); Sat, 2 Oct 2021 14:23:56 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:35624 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233829AbhJBSXz (ORCPT ); Sat, 2 Oct 2021 14:23:55 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWjMo-009FYI-Tn; Sat, 02 Oct 2021 18:04:11 +0000 Date: Sat, 2 Oct 2021 18:04:10 +0000 From: Al Viro To: Alexander Popov Cc: Jonathan Corbet , Paul McKenney , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Joerg Roedel , Maciej Rozycki , Muchun Song , Viresh Kumar , Robin Murphy , Randy Dunlap , Lu Baolu , Petr Mladek , Kees Cook , Luis Chamberlain , Wei Liu , John Ogness , Andy Shevchenko , Alexey Kardashevskiy , Christophe Leroy , Jann Horn , Greg Kroah-Hartman , Mark Rutland , Andy Lutomirski , Dave Hansen , Steven Rostedt , Thomas Garnier , Will Deacon , Ard Biesheuvel , Laura Abbott , David S Miller , Borislav Petkov , kernel-hardening@lists.openwall.com, linux-hardening@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, notify@kernel.org Subject: Re: [PATCH] Introduce the pkill_on_warn boot parameter Message-ID: References: <20210929185823.499268-1-alex.popov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210929185823.499268-1-alex.popov@linux.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29, 2021 at 09:58:23PM +0300, Alexander Popov wrote: > --- a/kernel/panic.c > +++ b/kernel/panic.c > @@ -53,6 +53,7 @@ static int pause_on_oops_flag; > static DEFINE_SPINLOCK(pause_on_oops_lock); > bool crash_kexec_post_notifiers; > int panic_on_warn __read_mostly; > +int pkill_on_warn __read_mostly; > unsigned long panic_on_taint; > bool panic_on_taint_nousertaint = false; > > @@ -610,6 +611,9 @@ void __warn(const char *file, int line, void *caller, unsigned taint, > > print_oops_end_marker(); > > + if (pkill_on_warn && system_state >= SYSTEM_RUNNING) > + do_group_exit(SIGKILL); > + Wait a sec... do_group_exit() is very much not locking-neutral. Aren't you introducing a bunch of potential deadlocks by adding that?