linux/scripts/gcc-plugins
Alexander Popov 8fb2dfb228 stackleak: Register the 'stackleak_cleanup' pass before the '*free_cfg' pass
Currently the 'stackleak_cleanup' pass deleting a CALL insn is executed
after the 'reload' pass. That allows gcc to do some weird optimization in
function prologues and epilogues, which are generated later [1].

Let's avoid that by registering the 'stackleak_cleanup' pass before
the '*free_cfg' pass. It's the moment when the stack frame size is
already final, function prologues and epilogues are generated, and the
machine-dependent code transformations are not done.

[1] https://www.openwall.com/lists/kernel-hardening/2018/11/23/2

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Alexander Popov <alex.popov@linux.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
2018-12-06 09:10:23 -08:00
..
.gitignore gcc-plugins: Add the randstruct plugin 2017-06-22 16:15:45 -07:00
cyc_complexity_plugin.c gcc-plugins: consolidate on PASS_INFO macro 2017-01-13 14:20:03 -08:00
gcc-common.h gcc-plugins: Clean up the cgraph_create_edge* macros 2018-07-24 16:14:06 -07:00
gcc-generate-gimple-pass.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gcc-generate-ipa-pass.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gcc-generate-rtl-pass.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gcc-generate-simple_ipa-pass.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gen-random-seed.sh License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig stackleak: Allow runtime disabling of kernel stack erasing 2018-09-04 10:35:48 -07:00
latent_entropy_plugin.c gcc-plugins: Use dynamic initializers 2018-02-05 17:27:46 -08:00
Makefile gcc-plugins: remove unused GCC_PLUGIN_SUBDIR 2018-07-02 19:27:00 -07:00
randomize_layout_plugin.c security: convert security hooks to use hlist 2018-03-31 13:18:27 +11:00
sancov_plugin.c gcc-plugins: fix sancov_plugin for gcc-5 2017-02-27 14:10:10 -08:00
stackleak_plugin.c stackleak: Register the 'stackleak_cleanup' pass before the '*free_cfg' pass 2018-12-06 09:10:23 -08:00
structleak_plugin.c gcc-plugins: Use dynamic initializers 2018-02-05 17:27:46 -08:00