]> git.baikalelectronics.ru Git - kernel.git/commit
security: convert security hooks to use hlist
authorSargun Dhillon <sargun@sargun.me>
Thu, 29 Mar 2018 01:28:23 +0000 (01:28 +0000)
committerJames Morris <james.morris@microsoft.com>
Sat, 31 Mar 2018 02:18:27 +0000 (13:18 +1100)
commitcd9cab8a5ba93089f3771e66f74aeba9b28061cd
tree0336a2aa616f738572946bd41bdfbbe1efbf3a83
parent985de3fe2c7ceaeb8d524f4a4599fb338ab424a8
security: convert security hooks to use hlist

This changes security_hook_heads to use hlist_heads instead of
the circular doubly-linked list heads. This should cut down
the size of the struct by about half.

In addition, it allows mutation of the hooks at the tail of the
callback list without having to modify the head. The longer-term
purpose of this is to enable making the heads read only.

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Reviewed-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
include/linux/lsm_hooks.h
scripts/gcc-plugins/randomize_layout_plugin.c
security/security.c