[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <64be87a7-bb1f-5578-a526-b7d064fcfea3@ispras.ru>
Date: Wed, 27 Jul 2022 20:47:41 +0300
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Petr Mladek <pmladek@...e.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Alexander Popov <alex.popov@...ux.com>,
Jonathan Corbet <corbet@....net>,
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>,
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 <kernel-hardening@...ts.openwall.com>,
linux-hardening@...r.kernel.org,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
notify@...nel.org, ldv-project@...uxtesting.org
Subject: Re: [PATCH] Introduce the pkill_on_warn boot parameter
On 27.07.2022 19:42, Linus Torvalds wrote:
> On Wed, Jul 27, 2022 at 9:17 AM Alexey Khoroshilov
> <khoroshilov@...ras.ru> wrote:
>>
>> We see a number of cases where WARNING is used to inform userspace that
>> it is doing something wrong, e.g.
>> https://elixir.bootlin.com/linux/v5.19-rc8/source/net/can/j1939/socket.c#L181
>> https://elixir.bootlin.com/linux/v5.19-rc8/source/drivers/video/fbdev/core/fbmem.c#L1023
>
> That first case is entirely bogus.
>
> WARN_ON() should only be used for "This cannot happen, but if it does,
> I want to know how we got here".
>
> But the second case is fine: Using "pr_warn()" is fine. A kernel
> warning (without a backtrace) is a normal thing for something that is
> deprecated or questionable, and you want to tell the user that "this
> app is doing something wrong".
Agree with the only note that I like the requirement:
* Do not include "BUG"/"WARNING" in format strings manually to make
* these conditions distinguishable from kernel issues.
very much.
Thank you,
Alexey
Powered by blists - more mailing lists