[PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-14 Thread Alex Elder
Several times recently Greg KH has admonished that variants of WARN() should not be used, because when the panic_on_warn kernel option is set, their use can lead to a panic. His reasoning was that the majority of Linux instances (including Android and cloud systems) run with this option enabled. An

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-14 Thread Laurent Pinchart
Hi Alex, Thank you for the patch. On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: > Several times recently Greg KH has admonished that variants of WARN() > should not be used, because when the panic_on_warn kernel option is set, > their use can lead to a panic. His reasoning was that

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-14 Thread Alex Elder
On 4/14/24 2:48 PM, Laurent Pinchart wrote: Hi Alex, Thank you for the patch. On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: Several times recently Greg KH has admonished that variants of WARN() should not be used, because when the panic_on_warn kernel option is set, their use can

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-14 Thread Greg KH
On Sun, Apr 14, 2024 at 10:48:35PM +0300, Laurent Pinchart wrote: > Hi Alex, > > Thank you for the patch. > > On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: > > Several times recently Greg KH has admonished that variants of WARN() > > should not be used, because when the panic_on_war

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-14 Thread Greg KH
On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: > Several times recently Greg KH has admonished that variants of WARN() > should not be used, because when the panic_on_warn kernel option is set, > their use can lead to a panic. His reasoning was that the majority of > Linux instances (i

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-15 Thread Christoph Hellwig
No, this advice is wronger than wrong. If you set panic_on_warn you get to keep the pieces.

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-15 Thread Laurent Pinchart
Hi Greg, On Mon, Apr 15, 2024 at 07:21:37AM +0200, Greg KH wrote: > On Sun, Apr 14, 2024 at 10:48:35PM +0300, Laurent Pinchart wrote: > > On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: > > > Several times recently Greg KH has admonished that variants of WARN() > > > should not be used

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-15 Thread Greg KH
On Mon, Apr 15, 2024 at 11:25:29AM +0300, Laurent Pinchart wrote: > Hi Greg, > > On Mon, Apr 15, 2024 at 07:21:37AM +0200, Greg KH wrote: > > On Sun, Apr 14, 2024 at 10:48:35PM +0300, Laurent Pinchart wrote: > > > On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: > > > > Several times re

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-15 Thread Greg KH
On Mon, Apr 15, 2024 at 01:07:41AM -0700, Christoph Hellwig wrote: > No, this advice is wronger than wrong. If you set panic_on_warn you > get to keep the pieces. > But don't add new WARN() calls please, just properly clean up and handle the error. And any WARN() that userspace can trigger en

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-15 Thread Laurent Pinchart
On Mon, Apr 15, 2024 at 10:33:42AM +0200, Greg KH wrote: > On Mon, Apr 15, 2024 at 11:25:29AM +0300, Laurent Pinchart wrote: > > On Mon, Apr 15, 2024 at 07:21:37AM +0200, Greg KH wrote: > > > On Sun, Apr 14, 2024 at 10:48:35PM +0300, Laurent Pinchart wrote: > > > > On Sun, Apr 14, 2024 at 12:08:50P

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-15 Thread Christoph Hellwig
On Mon, Apr 15, 2024 at 10:35:21AM +0200, Greg KH wrote: > On Mon, Apr 15, 2024 at 01:07:41AM -0700, Christoph Hellwig wrote: > > No, this advice is wronger than wrong. If you set panic_on_warn you > > get to keep the pieces. > > > > But don't add new WARN() calls please, just properly clean u

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-15 Thread Kees Cook
On Mon, Apr 15, 2024 at 10:35:21AM +0200, Greg KH wrote: > On Mon, Apr 15, 2024 at 01:07:41AM -0700, Christoph Hellwig wrote: > > No, this advice is wronger than wrong. If you set panic_on_warn you > > get to keep the pieces. > > > > But don't add new WARN() calls please, just properly clean u

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-18 Thread Jason Gunthorpe
On Mon, Apr 15, 2024 at 09:26:40AM -0700, Kees Cook wrote: > On Mon, Apr 15, 2024 at 10:35:21AM +0200, Greg KH wrote: > > On Mon, Apr 15, 2024 at 01:07:41AM -0700, Christoph Hellwig wrote: > > > No, this advice is wronger than wrong. If you set panic_on_warn you > > > get to keep the pieces. > >

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-18 Thread Eric Biggers
On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: > diff --git a/Documentation/process/coding-style.rst > b/Documentation/process/coding-style.rst > index 9c7cf73473943..bce43b01721cb 100644 > --- a/Documentation/process/coding-style.rst > +++ b/Documentation/process/coding-style.rst > @

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-18 Thread Kees Cook
On Thu, Apr 18, 2024 at 09:14:30AM -0700, Eric Biggers wrote: > Also, it's not true that "Android" sets this option. It might be the case > that > some individual Android OEMs have decided to use it for some reason (they do > have the ability to customize their kernel command line, after all). I

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-18 Thread John Hubbard
On 4/18/24 9:14 AM, Eric Biggers wrote: On Sun, Apr 14, 2024 at 12:08:50PM -0500, Alex Elder wrote: diff --git a/Documentation/process/coding-style.rst b/Documentation/process/coding-style.rst index 9c7cf73473943..bce43b01721cb 100644 --- a/Documentation/process/coding-style.rst +++ b/Documenta

Re: [PATCH] Documentation: coding-style: don't encourage WARN*()

2024-04-19 Thread David Hildenbrand
On 14.04.24 19:08, Alex Elder wrote: Several times recently Greg KH has admonished that variants of WARN() should not be used, because when the panic_on_warn kernel option is set, their use can lead to a panic. His reasoning was that the majority of Linux instances (including Android and cloud sy