diff options
author | KP Singh <[email protected]> | 2020-03-29 01:43:50 +0100 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2020-03-30 01:34:00 +0200 |
commit | 98e828a0650f348be85728c69875260cf78069e6 (patch) | |
tree | fbac6bde4fc2450ccd4432346afc15770252865d /lib/pm-notifier-error-inject.c | |
parent | fc611f47f2188ade2b48ff6902d5cce8baac0c58 (diff) |
security: Refactor declaration of LSM hooks
The information about the different types of LSM hooks is scattered
in two locations i.e. union security_list_options and
struct security_hook_heads. Rather than duplicating this information
even further for BPF_PROG_TYPE_LSM, define all the hooks with the
LSM_HOOK macro in lsm_hook_defs.h which is then used to generate all
the data structures required by the LSM framework.
The LSM hooks are defined as:
LSM_HOOK(<return_type>, <default_value>, <hook_name>, args...)
with <default_value> acccessible in security.c as:
LSM_RET_DEFAULT(<hook_name>)
Signed-off-by: KP Singh <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Brendan Jackman <[email protected]>
Reviewed-by: Florent Revest <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Casey Schaufler <[email protected]>
Acked-by: James Morris <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions