Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <323d0784-249d-7fef-6c60-e8426d35b083@intel.com>
Date: Wed, 29 Sep 2021 12:03:36 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Alexander Popov <alex.popov@...ux.com>, Jonathan Corbet <corbet@....net>,
 Paul McKenney <paulmck@...nel.org>, Andrew Morton
 <akpm@...ux-foundation.org>, Thomas Gleixner <tglx@...utronix.de>,
 Peter Zijlstra <peterz@...radead.org>, Joerg Roedel <jroedel@...e.de>,
 Maciej Rozycki <macro@...am.me.uk>, Muchun Song <songmuchun@...edance.com>,
 Viresh Kumar <viresh.kumar@...aro.org>, Robin Murphy <robin.murphy@....com>,
 Randy Dunlap <rdunlap@...radead.org>, Lu Baolu <baolu.lu@...ux.intel.com>,
 Petr Mladek <pmladek@...e.com>, Kees Cook <keescook@...omium.org>,
 Luis Chamberlain <mcgrof@...nel.org>, Wei Liu <wl@....org>,
 John Ogness <john.ogness@...utronix.de>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 Alexey Kardashevskiy <aik@...abs.ru>,
 Christophe Leroy <christophe.leroy@...roup.eu>, Jann Horn
 <jannh@...gle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Mark Rutland <mark.rutland@....com>, Andy Lutomirski <luto@...nel.org>,
 Dave Hansen <dave.hansen@...ux.intel.com>,
 Steven Rostedt <rostedt@...dmis.org>, Thomas Garnier <thgarnie@...gle.com>,
 Will Deacon <will.deacon@....com>, Ard Biesheuvel
 <ard.biesheuvel@...aro.org>, Laura Abbott <labbott@...hat.com>,
 David S Miller <davem@...emloft.net>, Borislav Petkov <bp@...en8.de>,
 kernel-hardening@...ts.openwall.com, linux-hardening@...r.kernel.org,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: notify@...nel.org
Subject: Re: [PATCH] Introduce the pkill_on_warn boot parameter

On 9/29/21 11:58 AM, 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);
> +
>  	/* Just a warning, don't kill lockdep. */
>  	add_taint(taint, LOCKDEP_STILL_OK);
>  }

Doesn't this tie into the warning *printing* code?  That's better than
nothing, for sure.  But, if we're doing this for hardening, I think we
would want to kill anyone provoking a warning, not just the first one
that triggered *printing* the warning.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.