[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202507010926.1650356E@keescook>
Date: Tue, 1 Jul 2025 09:27:56 -0700
From: Kees Cook <kees@...nel.org>
To: Jann Horn <jannh@...gle.com>
Cc: Jannik Glückert <jannik.glueckert@...il.com>,
Nathan Chancellor <nathan@...nel.org>,
linux-hardening@...r.kernel.org,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH] kunit/fortify: Add back "volatile" for sizeof() constants
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@...nel.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
Powered by blists - more mailing lists