[PATCH v6 05/11] LSM: Create lsm_module_list system call
Arnd Bergmann
arnd at arndb.de
Fri Mar 3 18:32:18 UTC 2023
On Wed, Feb 22, 2023, at 21:08, Casey Schaufler wrote:
> @@ -1062,6 +1062,7 @@ asmlinkage long
> sys_set_mempolicy_home_node(unsigned long start, unsigned long l
> asmlinkage long sys_lsm_get_self_attr(struct lsm_ctx *ctx, size_t
> *size,
> __u64 flags);
> asmlinkage long sys_lsm_set_self_attr(struct lsm_ctx *ctx, __u64
> flags);
> +asmlinkage long sys_lsm_module_list(u64 *ids, size_t *size, int flags);
...
> + */
> +SYSCALL_DEFINE3(lsm_module_list,
> + u64 __user *, ids,
> + size_t __user *, size,
> + u64, flags)
> +{
I see that the prototype does not match the definition here,
which really should raise a compiler error, but I suspect that
broke at some point.
Since none of the flags bits are actually used here, can we
please make this a 32-bit field as in the prototype rather
than the 64-bit one in the argument list?
Passing 64-bit arguments through 32-bit registers would make
the calling conventions incompatible with compat mode tasks
on 64-bit kernels.
Arnd
More information about the Linux-security-module-archive
mailing list