Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2270637pxb; Sat, 2 Oct 2021 11:35:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyVufl/9dPqb5MJke074XJmx0N7lu373ZPJW7dmPIVzqA9lnhKGHE3rigZJGnskY/UIFtv X-Received: by 2002:a17:906:7047:: with SMTP id r7mr2303090ejj.286.1633199703512; Sat, 02 Oct 2021 11:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633199703; cv=none; d=google.com; s=arc-20160816; b=nDY2omE1hUeOFaN1WgctnTOhs1WiD/dshvn/aRpx2sBQZncuj5Znz1PVSVJ1kDfu9h oKrU+3mlHIXU9ret2f/qOPGKtyxbvMlVFbJRog1bHA+UsLjddN/zPTChHLp9y2g0ilgZ 4g3t71vbc61Ny6HZH5fV0jMQy9D21DhX407/w73xgduwcRYGyPMKZLVCZK7DYgP/G5SZ FmgW11djXR8Y2emdHHKNGt+MgOYSNOKX4nw7mCIExlUtzW8sfQ2ANygFYOKkv8TCjJL1 EnlqNpPrR9z9mVyy5slnzXNQsifwuNtcylW2dG1nEVoFscx5FsJnAM2AagtuwaOasl1m 8Gzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=oheqB96gD0F5ChQsBmPl9jrPDOjQZD6XKPbGacfwJGY=; b=X3OozPcTSD4NPfnf0CEw7/+ToHEPcPHpRsmn1URLWfrvHsFysu4vk5WF2ZRArmwNKj IjCL7j6psIjhdrBhY+i4IYRnZSQIpCVC2kaH80ox/u86KOw6NmjxMfESp6DGQ+AO242+ 8sswSiRMZPg2dKkbpSCv8SGTq2hhq2+YwcfAX+v3WJCrw6j5jWTVMmy0HwI1Fe7oZlL0 0ot25wNoGwOcTuxIPGGUEBDwkXw21OyKAveK7W6IXMHyCOzTcCeRuDiDlbgCHfn1K93q rgmBQoqc6il3vf1tU9D+y/UJTHaj8YgUORSXYeDPPJnEoA+3Mt+l6LT2kJmzdw4KtHqJ jmFQ== 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 c61si4542134edf.550.2021.10.02.11.34.39; Sat, 02 Oct 2021 11:35:03 -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 S233853AbhJBSdZ (ORCPT + 99 others); Sat, 2 Oct 2021 14:33:25 -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