Files
linux/lib
Kees Cook cf4e5c19cb kunit/fortify: Add back "volatile" for sizeof() constants
[ Upstream commit 10299c07c9 ]

It seems the Clang can see through OPTIMIZER_HIDE_VAR when the constant
is coming from sizeof. Adding "volatile" back to these variables solves
this false positive without reintroducing the issues that originally led
to switching to OPTIMIZER_HIDE_VAR in the first place[1].

Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2075 [1]
Cc: Jannik Glückert <jannik.glueckert@gmail.com>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Fixes: 6ee149f61b ("kunit/fortify: Replace "volatile" with OPTIMIZER_HIDE_VAR()")
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250628234034.work.800-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-15 12:16:14 +02:00
..
2024-12-12 18:26:32 +01:00
2025-03-16 22:30:49 -07:00
2025-04-11 17:32:38 -07:00
2025-04-11 17:32:37 -07:00
2024-07-12 16:39:53 -07:00
2024-02-01 13:06:40 +01:00
2025-03-25 10:18:31 -03:00
2025-01-12 20:21:15 -08:00
2025-01-14 19:45:35 +01:00
2023-08-21 13:46:25 -07:00
2023-10-16 12:44:06 -04:00
2024-10-14 16:33:24 -05:00
2023-10-16 12:44:06 -04:00
2025-03-17 12:17:00 -07:00
2024-07-04 23:43:10 -07:00
2024-02-15 12:17:28 -05:00
2025-03-25 10:18:31 -03:00
2024-12-09 13:48:29 -08:00