mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
5893ed18a2
commit
df0ce17331
3 changed files with 227 additions and 227 deletions
|
@ -52,8 +52,8 @@ static const struct whitelist_entry whitelist[] = {
|
|||
{ "net/unix/af_unix.c", "unix_skb_parms", "char" },
|
||||
/* big_key payload.data struct splashing */
|
||||
{ "security/keys/big_key.c", "path", "void *" },
|
||||
/* walk struct security_hook_heads as an array of struct list_head */
|
||||
{ "security/security.c", "list_head", "security_hook_heads" },
|
||||
/* walk struct security_hook_heads as an array of struct hlist_head */
|
||||
{ "security/security.c", "hlist_head", "security_hook_heads" },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue