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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63629C433F5 for ; Sat, 2 Oct 2021 18:31:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 491DF61B2F for ; Sat, 2 Oct 2021 18:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233859AbhJBSd1 (ORCPT ); Sat, 2 Oct 2021 14:33:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:34112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233845AbhJBSdY (ORCPT ); Sat, 2 Oct 2021 14:33:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DB9B36008E; Sat, 2 Oct 2021 18:31:34 +0000 (UTC) Date: Sat, 2 Oct 2021 14:31:32 -0400 From: Steven Rostedt To: Al Viro Cc: Alexander Popov , 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 , 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: <20211002143132.3a51a8e0@oasis.local.home> In-Reply-To: References: <20210929185823.499268-1-alex.popov@linux.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2 Oct 2021 18:04:10 +0000 Al Viro wrote: > > @@ -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? Perhaps add an irq_work() here to trigger the do_group_exit() from a "safe" interrupt context? -- Steve