lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 30 Sep 2021 19:54:30 -0700
From:   Joe Perches <joe@...ches.com>
To:     Kees Cook <keescook@...omium.org>,
        Randy Dunlap <rdunlap@...radead.org>
Cc:     Jonathan Corbet <corbet@....net>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] docs: Explain the desired position of function
 attributes

On Thu, 2021-09-30 at 15:52 -0700, Kees Cook wrote:
> I have read and re-read Linus's emails, and did a frequency count in the
> kernel, and it looks like the preference is [return type] [return type attrs]

Please don't read too much into frequency counts as it really depends
on age of code.

> but I personally agree with you. :)
> 
> # regex I built from __must_check hits...
> $ re='((struct .*|void|char) \* ?|((unsigned )?(long|int)|bool|size_t)($| ))'
> 
> # type before __must_check
> $ git grep -E "$re"'__must_check' | wc -l
> 746
> 
> # type after __must_check
> $ git grep -E '\b(static (__always_)?inline )?__must_check($| '"$re"')' | wc -l
> 297

Hmm.

$ git grep -w __must_check -- '*.[ch]' | wc -l
909


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ