On Tue, Jul 01, 2025 at 10:38:36AM -0700, Bill Wendling wrote: > On Tue, Jul 1, 2025 at 9:27 AM Kees Cook <k...@kernel.org> wrote: > > I have not had the time to minimize it, no.
I can try to extract this into a minimal reproducer next week if nothing major crops up over the long weekend. > OPTIMIZER_HIDE_VAR doesn't have a 'volatile' on it. Could that be it? I tested diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 6f04a1d8c720..eab208a9a6f4 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -160,7 +160,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, #ifndef OPTIMIZER_HIDE_VAR /* Make the optimizer believe the variable can be manipulated arbitrarily. */ #define OPTIMIZER_HIDE_VAR(var) \ - __asm__ ("" : "=r" (var) : "0" (var)) + __asm__ volatile("" : "=r" (var) : "0" (var)) #endif #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) but that did not resolve the error. Cheers, Nathan