Commit d51e783c authored by KP Singh's avatar KP Singh Committed by Paul Moore
Browse files

lsm: count the LSMs enabled at compile time



These macros are a clever trick to determine a count of the number of
LSMs that are enabled in the config to ascertain the maximum number of
static calls that need to be configured per LSM hook.

Without this one would need to generate static calls for the total
number of LSMs in the kernel (even if they are not compiled) times the
number of LSM hooks which ends up being quite wasteful.

Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Suggested-by: default avatarKui-Feng Lee <sinquersw@gmail.com>
Suggested-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Reviewed-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Acked-by: default avatarSong Liu <song@kernel.org>
Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Nacked-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarKP Singh <kpsingh@kernel.org>
[PM: added IPE to the count during merge]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 7cff549d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment