• Kees Cook's avatar
    fortify: Split reporting and avoid passing string pointer · 475ddf1f
    Kees Cook authored
    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: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    475ddf1f
noreturns.h 1.35 KB