diff options
author | Kees Cook <keescook@chromium.org> | 2023-04-07 12:27:13 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2024-02-29 13:38:02 -0800 |
commit | 475ddf1fce1ec4826c8dda40ec59f7f83a7aadb8 (patch) | |
tree | e9c16bb1b04f47c6fbeb51e532a6271dd1ebb05c /tools/objtool | |
parent | 99db710f768e988e70f1164537bf533a017be24d (diff) |
fortify: Split reporting and avoid passing string pointer
In preparation for KUnit testing and further improvements in fortify
failure reporting, split out the report and encode the function and access
failure (read or write overflow) into a single u8 argument. This mainly
ends up saving a tiny bit of space in the data segment. For a defconfig
with FORTIFY_SOURCE enabled:
$ size gcc/vmlinux.before gcc/vmlinux.after
text data bss dec hex filename
26132309 9760658 2195460 38088427 2452eeb gcc/vmlinux.before
26132386 9748382 2195460 38076228 244ff44 gcc/vmlinux.after
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'tools/objtool')
-rw-r--r-- | tools/objtool/noreturns.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/noreturns.h b/tools/objtool/noreturns.h index 1685d7ea6a9f..3a301696f005 100644 --- a/tools/objtool/noreturns.h +++ b/tools/objtool/noreturns.h @@ -6,6 +6,7 @@ * * Yes, this is unfortunate. A better solution is in the works. */ +NORETURN(__fortify_panic) NORETURN(__kunit_abort) NORETURN(__module_put_and_kthread_exit) NORETURN(__reiserfs_panic) @@ -22,7 +23,6 @@ NORETURN(do_exit) NORETURN(do_group_exit) NORETURN(do_task_dead) NORETURN(ex_handler_msr_mce) -NORETURN(fortify_panic) NORETURN(hlt_play_dead) NORETURN(hv_ghcb_terminate) NORETURN(kthread_complete_and_exit) |