[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202109241441.20B7EE4B@keescook>
Date: Fri, 24 Sep 2021 14:46:14 -0700
From: Kees Cook <keescook@...omium.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Jonathan Corbet <corbet@....net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Joe Perches <joe@...ches.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] docs: Explain the desired position of function attributes
On Fri, Sep 24, 2021 at 01:27:20PM -0700, Randy Dunlap wrote:
> On 9/24/21 1:23 PM, Kees Cook wrote:
> > +The preferred order of elements for a function prototype is:
> > +
> > +- attributes on the preceding lines
> > +
>
> I thought that idea was already nacked: (it's more of a BSD thing AFAIK)
> (and I would NAK it if I could :)
>
> """
> > Attributes should be on their own line, they can be quite lengthy.
>
> No, no no. They really shouldn't.
> ""
>
> from: https://lore.kernel.org/mm-commits/CAHk-=wjS-Jg7sGMwUPpDsjv392nDOOs0CtUtVkp=S6Q7JzFJRw@mail.gmail.com/
Right -- and then Joe and Rasmus had some convincing counter-arguments,
IMO. So, given the outlined Docs patch, I'd like to see what folks can
propose in the form of alternative patches for this topic.
I genuinely don't care. I just want to have something I can follow for the
refactoring of the allocator attributes. :) The trouble I had with Linus's
suggestion is that some attributes don't work[1] at the end for function
definitions, so I'm left unable to follow his recommendations too.
-Kees
[1] https://lore.kernel.org/mm-commits/202109211630.2D00627@keescook/
--
Kees Cook
Powered by blists - more mailing lists