Message ID | 20240328064256.2358634-2-ardb+git@google.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | e7d24c0aa8e678f41457d1304e2091cac6fd1a2e |
Headers | show |
Series | gcc-plugins/stackleak: Avoid .head.text section | expand |
On Thu, 28 Mar 2024 07:42:57 +0100, Ard Biesheuvel wrote: > 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. > > Applied to for-next/hardening, thanks! [1/1] gcc-plugins/stackleak: Avoid .head.text section https://git.kernel.org/kees/c/4ac9a796ada0 Take care,
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;