aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorMark Rutland <[email protected]>2022-04-27 17:31:25 +0000
committerKees Cook <[email protected]>2022-05-08 08:33:08 +0000
commitf03a50938decaa601f02294e4d057fb0048ca9ca (patch)
treeab423d6a439df190bc88905c336210f424b5cc46 /scripts/gcc-plugins/randomize_layout_plugin.c
parentlkdtm/stackleak: rework boundary management (diff)
downloadkernel-f03a50938decaa601f02294e4d057fb0048ca9ca.tar.gz
kernel-f03a50938decaa601f02294e4d057fb0048ca9ca.zip
lkdtm/stackleak: prevent unexpected stack usage
The lkdtm_STACKLEAK_ERASING() test is instrumentable and runs with IRQs unmasked, so it's possible for unrelated code to clobber the task stack and/or manipulate current->lowest_stack while the test is running, resulting in spurious failures. The regular stackleak erasing code is non-instrumentable and runs with IRQs masked, preventing similar issues. Make the body of the test non-instrumentable, and run it with IRQs masked, avoiding such spurious failures. Signed-off-by: Mark Rutland <[email protected]> Cc: Alexander Popov <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Kees Cook <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions