From: Kees Cook <kees@kernel.org>
To: Jann Horn <jannh@google.com>
Cc: "Jannik Glückert" <jannik.glueckert@gmail.com>,
"Nathan Chancellor" <nathan@kernel.org>,
linux-hardening@vger.kernel.org,
"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
"Bill Wendling" <morbo@google.com>,
"Justin Stitt" <justinstitt@google.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] kunit/fortify: Add back "volatile" for sizeof() constants
Date: Tue, 1 Jul 2025 09:27:56 -0700 [thread overview]
Message-ID: <202507010926.1650356E@keescook> (raw)
In-Reply-To: <CAG48ez0n1E0iuOxPe=jq4MuuP3w2wMSNixmfNmBbB89jyJBSbA@mail.gmail.com>
On Tue, Jul 01, 2025 at 03:41:35PM +0200, Jann Horn wrote:
> On Sun, Jun 29, 2025 at 1:40 AM Kees Cook <kees@kernel.org> wrote:
> > It seems the Clang can see through OPTIMIZER_HIDE_VAR when the constant
> > is coming from sizeof.
>
> Wait, what? That sounds extremely implausible/broken to me.
>
> https://godbolt.org/z/ndeP5chcb also suggests that clang does not
> generally "see through OPTIMIZER_HIDE_VAR when the constant is coming
> from sizeof".
I agree -- something is very unstable about this case, and it's been
very frustrating to pin down.
> Do you have a minimal reproducer of what you're talking about?
I have not had the time to minimize it, no.
-Kees
--
Kees Cook
next prev parent reply other threads:[~2025-07-01 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-28 23:40 [PATCH] kunit/fortify: Add back "volatile" for sizeof() constants Kees Cook
2025-07-01 12:35 ` Nathan Chancellor
2025-07-01 13:41 ` Jann Horn
2025-07-01 16:27 ` Kees Cook [this message]
2025-07-01 17:38 ` Bill Wendling
2025-07-02 21:12 ` Nathan Chancellor
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=202507010926.1650356E@keescook \
--to=kees@kernel.org \
--cc=jannh@google.com \
--cc=jannik.glueckert@gmail.com \
--cc=justinstitt@google.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
/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