aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/structleak_plugin.c
diff options
context:
space:
mode:
authorMark Rutland <[email protected]>2022-04-27 17:31:27 +0000
committerKees Cook <[email protected]>2022-05-08 08:33:09 +0000
commit8111e67dee9ff774712cff8e34fba465c8361960 (patch)
treef7939bb13d63ab03d22651a35e73b17a703d212a /scripts/gcc-plugins/structleak_plugin.c
parentlkdtm/stackleak: check stack boundaries (diff)
downloadkernel-8111e67dee9ff774712cff8e34fba465c8361960.tar.gz
kernel-8111e67dee9ff774712cff8e34fba465c8361960.zip
stackleak: add on/off stack variants
The stackleak_erase() code dynamically handles being on a task stack or another stack. In most cases, this is a fixed property of the caller, which the caller is aware of, as an architecture might always return using the task stack, or might always return using a trampoline stack. This patch adds stackleak_erase_on_task_stack() and stackleak_erase_off_task_stack() functions which callers can use to avoid on_thread_stack() check and associated redundant work when the calling stack is known. The existing stackleak_erase() is retained as a safe default. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <[email protected]> Cc: Alexander Popov <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Kees Cook <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/structleak_plugin.c')
0 files changed, 0 insertions, 0 deletions