From: Alexey Dobriyan <adobriyan@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [GIT PULL] hardening fixes for v6.6-rc3
Date: Sun, 24 Sep 2023 19:58:31 +0300 [thread overview]
Message-ID: <88707e12-dba9-4a9f-95d7-8d6f3c8f0f58@p183> (raw)
In-Reply-To: <CAHk-=whf6Zu3Cfm1eOTxXniZf5EPaf1iLj_q_6BVHrzTUBfUGw@mail.gmail.com>
On Sat, Sep 23, 2023 at 11:04:57AM -0700, Linus Torvalds wrote:
> On Fri, 22 Sept 2023 at 20:49, Kees Cook <keescook@chromium.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.
next prev parent reply other threads:[~2023-09-24 16:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 16:59 Kees Cook
2023-09-22 23:55 ` Linus Torvalds
2023-09-23 3:49 ` Kees Cook
2023-09-23 18:04 ` Linus Torvalds
2023-09-24 16:58 ` Alexey Dobriyan [this message]
2023-09-24 17:24 ` Linus Torvalds
2023-09-23 16:53 ` Alexey Dobriyan
2023-09-23 18:02 ` Linus Torvalds
2023-09-22 23:58 ` pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=88707e12-dba9-4a9f-95d7-8d6f3c8f0f58@p183 \
--to=adobriyan@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®