lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 22 Sep 2021 22:10:24 -0700
From:   Joe Perches <>
To:     Linus Torvalds <>,
        Alexey Dobriyan <>
Cc:     Linux Kernel Mailing List <>,
        Andrew Morton <>,,
        Christoph Lameter <>,
        Daniel Micay <>,
        Dennis Zhou <>,,
        Joonsoo Kim <>,
        Linux-MM <>,
        Lukas Bulwahn <>,, Nathan Chancellor <>,
        Nick Desaulniers <>,
        Miguel Ojeda <>,
        Pekka Enberg <>,
        David Rientjes <>,
        Tejun Heo <>, Vlastimil Babka <>,
        "open list:DOCUMENTATION" <>
Subject: Re: function prototype element ordering

On Wed, 2021-09-22 at 14:15 -0700, Linus Torvalds wrote:
> On Wed, Sep 22, 2021 at 12:24 AM Alexey Dobriyan <> wrote:
> > 
> > Attributes should be on their own line, they can be quite lengthy.
> No, no no. They really shouldn't.
> First off, no normal code should use that "__attribute__(())" syntax
> anyway. It's ugly and big, and many of the attributes are
> compiler-specific anyway.
> So the "quite lengthy" argument is bogus, because the actual names you
> should use are things like "__packed" or "__pure" or "__user" etc.
> But the "on their own line" is complete garbage to begin with. That
> will NEVER be a kernel rule. We should never have a rule that assumes
> things are so long that they need to be on multiple lines.

I think it's not so much that lines are long, it's more that the
information provided by these markings aren't particularly useful to
a caller/user of a function.

Under what circumstance is a marking like __pure/__cold or __section
useful to someone that just wants to call a particular function?

A secondary reason why these should be separate or at least put
at the begining of a function declaration is compatibility with
existing tools like ctags.

Powered by blists - more mailing lists