Re: [PATCH v3] LSM: use 32 bit compatible data types in LSM syscalls.
From: Paul Moore <paul@paul-moore.com>
Date: 2024-03-13 20:07:02
Also in:
linux-api, lkml
On Mar 13, 2024 Casey Schaufler [off-list ref] wrote:
LSM: use 32 bit compatible data types in LSM syscalls.
Change the size parameters in lsm_list_modules(), lsm_set_self_attr()
and lsm_get_self_attr() from size_t to u32. This avoids the need to
have different interfaces for 32 and 64 bit systems.
Cc: stable@vger.kernel.org
Fixes: a04a1198088a: ("LSM: syscalls for current process attributes")
Fixes: ad4aff9ec25f: ("LSM: Create lsm_list_modules system call")
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reported-and-reviewed-by: Dmitry V. Levin [off-list ref]
---
include/linux/lsm_hook_defs.h | 4 ++--
include/linux/security.h | 8 ++++----
security/apparmor/lsm.c | 4 ++--
security/lsm_syscalls.c | 10 +++++-----
security/security.c | 12 ++++++------
security/selinux/hooks.c | 4 ++--
security/smack/smack_lsm.c | 4 ++--
tools/testing/selftests/lsm/common.h | 6 +++---
tools/testing/selftests/lsm/lsm_get_self_attr_test.c | 10 +++++-----
tools/testing/selftests/lsm/lsm_list_modules_test.c | 8 ++++----
tools/testing/selftests/lsm/lsm_set_self_attr_test.c | 6 +++---
11 files changed, 38 insertions(+), 38 deletions(-)Okay, this looks better, I'm going to merge this into lsm/stable-6.9 and put it through the usual automated testing as well as a kselftest run to make sure everything there is still okay. Assuming all goes well and no one raises any objections, I'll likely send this up to Linus tomorrow. Thanks everyone! -- paul-moore.com