mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
gcc-plugins/stackleak: Ignore .noinstr.text and .entry.text
The .noinstr.text section functions may not have "current()" sanely available. Similarly true for .entry.text, though such a check is currently redundant. Add a check for both. In an x86_64 defconfig build, the following functions no longer receive stackleak instrumentation: __do_fast_syscall_32() do_int80_syscall_32() do_machine_check() do_syscall_64() exc_general_protection() fixup_bad_iret() Suggested-by: Peter Zijlstra <peterz@infradead.org> Cc: Alexander Popov <alex.popov@linux.com> Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
27e9faf415
commit
ae978009fc
1 changed files with 4 additions and 0 deletions
|
@ -463,6 +463,10 @@ static bool stackleak_gate(void)
|
||||||
return false;
|
return false;
|
||||||
if (STRING_EQUAL(section, ".meminit.text"))
|
if (STRING_EQUAL(section, ".meminit.text"))
|
||||||
return false;
|
return false;
|
||||||
|
if (STRING_EQUAL(section, ".noinstr.text"))
|
||||||
|
return false;
|
||||||
|
if (STRING_EQUAL(section, ".entry.text"))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return track_frame_size >= 0;
|
return track_frame_size >= 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue