Re: [GIT PULL] hardening fixes for v6.6-rc3

2023-09-24 Thread Linus Torvalds
On Sun, 24 Sept 2023 at 09:58, Alexey Dobriyan wrote: > > 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. I suspect a lot of it is "this got

Re: [GIT PULL] hardening fixes for v6.6-rc3

2023-09-24 Thread Alexey Dobriyan
On Sat, Sep 23, 2023 at 11:04:57AM -0700, Linus Torvalds wrote: > On Fri, 22 Sept 2023 at 20:49, Kees Cook 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

Re: [GIT PULL] hardening fixes for v6.6-rc3

2023-09-23 Thread Linus Torvalds
On Fri, 22 Sept 2023 at 20:49, Kees Cook 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.

Re: [GIT PULL] hardening fixes for v6.6-rc3

2023-09-22 Thread Kees Cook
On Fri, Sep 22, 2023 at 04:55:45PM -0700, Linus Torvalds wrote: > On Fri, 22 Sept 2023 at 09:59, Kees Cook wrote: > > > > - Fix UAPI stddef.h to avoid C++-ism (Alexey Dobriyan) > > Ugh. Did we really have to make two different versions of that define? > > Ok, so C++ did something stupid wrt an