[PATCH v3] LSM: use 32 bit compatible data types in LSM syscalls.
Paul Moore
paul at paul-moore.com
Wed Mar 13 20:07:00 UTC 2024
On Mar 13, 2024 Casey Schaufler <casey at schaufler-ca.com> 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 at 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 at schaufler-ca.com>
> Reported-and-reviewed-by: Dmitry V. Levin <ldv at strace.io>
> ---
> 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
More information about the Linux-security-module-archive
mailing list