linux/scripts/gcc-plugins
Bill Wendling 75c1182e18 security: don't treat structure as an array of struct hlist_head
The initialization of "security_hook_heads" is done by casting it to
another structure pointer type, and treating it as an array of "struct
hlist_head" objects. This requires an exception be made in "randstruct",
because otherwise it will emit an error, reducing the effectiveness of
the hardening technique.

Instead of using a cast, initialize the individual struct hlist_head
elements in security_hook_heads explicitly. This removes the need for
the cast and randstruct exception.

Signed-off-by: Bill Wendling <morbo@google.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220407175930.471870-1-morbo@google.com
2022-04-13 12:15:53 -07:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
arm_ssp_per_task_plugin.c gcc-plugins: arm-ssp: Prepare for THREAD_INFO_IN_TASK support 2021-09-27 16:54:01 +02:00
gcc-common.h gcc-plugins: remove duplicate include in gcc-common.h 2021-10-21 08:41:51 -07:00
gcc-generate-gimple-pass.h gcc-plugins: remove support for GCC 4.9 and older 2021-10-04 10:58:08 -07:00
gcc-generate-ipa-pass.h gcc-plugins: remove support for GCC 4.9 and older 2021-10-04 10:58:08 -07:00
gcc-generate-rtl-pass.h gcc-plugins: remove support for GCC 4.9 and older 2021-10-04 10:58:08 -07:00
gcc-generate-simple_ipa-pass.h gcc-plugins: remove support for GCC 4.9 and older 2021-10-04 10:58:08 -07:00
gen-random-seed.sh scripts: make some scripts executable 2021-08-10 09:13:25 +09:00
Kconfig gcc-plugins: Remove cyc_complexity 2021-10-21 08:41:47 -07:00
latent_entropy_plugin.c gcc-plugins: latent_entropy: use /dev/urandom 2022-04-12 11:31:40 -07:00
Makefile
randomize_layout_plugin.c security: don't treat structure as an array of struct hlist_head 2022-04-13 12:15:53 -07:00
sancov_plugin.c
stackleak_plugin.c gcc-plugins/stackleak: Ignore .noinstr.text and .entry.text 2022-02-06 10:55:03 -08:00
structleak_plugin.c gcc-plugins: remove support for GCC 4.9 and older 2021-10-04 10:58:08 -07:00