diff options
author | Kees Cook <keescook@chromium.org> | 2017-04-04 19:50:45 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-06-22 19:21:40 -0400 |
commit | fd466e068e5adef5922b76f24374c96ba01faaa2 (patch) | |
tree | 33cb7aa384ed9a0c0f9a9eed44f83e858bd52605 /scripts/gcc-plugins/randomize_layout_plugin.c | |
parent | 313dd1b629219db50cad532dba6a3b3b22ffe622 (diff) |
randstruct: Whitelist struct security_hook_heads cast
The LSM initialization routines walk security_hook_heads as an array
of struct list_head instead of via names to avoid a ton of needless
source. Whitelist this to avoid the false positive warning from the
plugin:
security/security.c: In function ‘security_init’:
security/security.c:59:20: note: found mismatched op0 struct pointer types: ‘struct list_head’ and ‘struct security_hook_heads’
struct list_head *list = (struct list_head *) &security_hook_heads;
^
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: James Morris <james.l.morris@oracle.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
-rw-r--r-- | scripts/gcc-plugins/randomize_layout_plugin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/gcc-plugins/randomize_layout_plugin.c b/scripts/gcc-plugins/randomize_layout_plugin.c index e1d1ba28739f..dc0df3765a8f 100644 --- a/scripts/gcc-plugins/randomize_layout_plugin.c +++ b/scripts/gcc-plugins/randomize_layout_plugin.c | |||
@@ -46,6 +46,8 @@ struct whitelist_entry { | |||
46 | }; | 46 | }; |
47 | 47 | ||
48 | static const struct whitelist_entry whitelist[] = { | 48 | static const struct whitelist_entry whitelist[] = { |
49 | /* walk struct security_hook_heads as an array of struct list_head */ | ||
50 | { "security/security.c", "list_head", "security_hook_heads" }, | ||
49 | { } | 51 | { } |
50 | }; | 52 | }; |
51 | 53 | ||