diff options
author | Ard Biesheuvel <[email protected]> | 2024-03-28 07:42:57 +0100 |
---|---|---|
committer | Kees Cook <[email protected]> | 2024-04-03 14:35:49 -0700 |
commit | e7d24c0aa8e678f41457d1304e2091cac6fd1a2e (patch) | |
tree | 5c9aedc7e789f113f2ab74fa902e99377a33954d | |
parent | 39cd87c4eb2b893354f3b850f916353f2658ae6f (diff) |
gcc-plugins/stackleak: Avoid .head.text section
The .head.text section carries the startup code that runs with the MMU
off or with a translation of memory that deviates from the ordinary one.
So avoid instrumentation with the stackleak plugin, which already avoids
.init.text and .noinstr.text entirely.
Fixes: 48204aba801f1b51 ("x86/sme: Move early SME kernel encryption handling into .head.text")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-lkp/[email protected]
Signed-off-by: Ard Biesheuvel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
-rw-r--r-- | scripts/gcc-plugins/stackleak_plugin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/gcc-plugins/stackleak_plugin.c b/scripts/gcc-plugins/stackleak_plugin.c index c5c2ce113c92..d20c47d21ad8 100644 --- a/scripts/gcc-plugins/stackleak_plugin.c +++ b/scripts/gcc-plugins/stackleak_plugin.c @@ -467,6 +467,8 @@ static bool stackleak_gate(void) return false; if (STRING_EQUAL(section, ".entry.text")) return false; + if (STRING_EQUAL(section, ".head.text")) + return false; } return track_frame_size >= 0; |