proc: Use lsmids instead of lsm names for attrs
authorCasey Schaufler <casey@schaufler-ca.com>
Tue, 12 Sep 2023 20:56:48 +0000 (13:56 -0700)
committerPaul Moore <paul@paul-moore.com>
Mon, 13 Nov 2023 03:54:42 +0000 (22:54 -0500)
commit267c068e5f8b81b68cc4247c94dbba90a21a634e
tree58b75854f3b7743433ea23603eb08348dd3a4d77
parent9285c5ad9d00abfe0f4e2ce4039c8127e7a09738
proc: Use lsmids instead of lsm names for attrs

Use the LSM ID number instead of the LSM name to identify which
security module's attibute data should be shown in /proc/self/attr.
The security_[gs]etprocattr() functions have been changed to expect
the LSM ID. The change from a string comparison to an integer comparison
in these functions will provide a minor performance improvement.

Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Reviewed-by: Mickael Salaun <mic@digikod.net>
Reviewed-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
fs/proc/base.c
fs/proc/internal.h
include/linux/security.h
security/security.c