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:   Sat, 2 Oct 2021 12:42:40 +0200
From:   Miguel Ojeda <>
To:     Greg KH <>
Cc:     Nick Desaulniers <>,
        Kees Cook <>,
        Linus Torvalds <>,
        Miguel Ojeda <>,
        Jonathan Corbet <>,
        Randy Dunlap <>,
        Joe Perches <>,
        Alexey Dobriyan <>,
        Rasmus Villemoes <>,
        Andrew Morton <>,
        linux-kernel <>,
        Linux Doc Mailing List <>,
Subject: Re: [PATCH v4] docs: Explain the desired position of function attributes

On Sat, Oct 2, 2021 at 8:31 AM Greg KH <> wrote:
> Why would documenting the expected format have an affect on tools not
> being able to follow that exact expected format?  Are we defining a
> format that is somehow impossible for them to use?

>From a quick test, clang-format-12 with our current config keeps
attributes in the same line and it does not seem to reorder them, so
it seems OK (the developer has to do it by hand, but that is fine)
except for the `__malloc` in the second example which is in a
different line (but not in the first). Is that intended?

> If anything I would think that now we have a format that the tools can
> actually follow, while before it was semi-random as to what to pick as
> the "one true way".

In the future, clang-format could have a configuration option to pass
a sort order, in which case, having the sort order already defined in
the kernel would definitely be helpful.

In fact, we could use the fact that the kernel has one as a way to
tell upstream that such a feature would be nice to have :)


Powered by blists - more mailing lists