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] [thread-next>] [day] [month] [year] [list]
Message-ID: <88707e12-dba9-4a9f-95d7-8d6f3c8f0f58@p183>
Date:   Sun, 24 Sep 2023 19:58:31 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [GIT PULL] hardening fixes for v6.6-rc3

On Sat, Sep 23, 2023 at 11:04:57AM -0700, Linus Torvalds wrote:
> On Fri, 22 Sept 2023 at 20:49, Kees Cook <keescook@...omium.org> wrote:
> >
> > 2) __cplusplus is relatively common in UAPI headers already:
> >    $ git grep __cplusplus -- include/uapi | wc -l
> >    58
> 
> Look a bit closer.
> 
> Most of those - by far - is for the usual
> 
>   #if defined(__cplusplus)
>   extern "C" {
>   #endif
> 
> pattern. IOW, it's explicitly not different code, but telling the C++
> compiler that "this is C code".
> 
> So this new #ifdef is an ugly new pattern of "do totally different
> things for C++".
> 
> Apparently required, but very ugly nonetheless.

Most of those in uapi/ are likely unnecessary: extern "C" means
"don't mangle", but kernel doesn't export functions to userspace
except vDSO so there is nothing to mangle in the first place.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ