Thread (27 messages) 27 messages, 6 authors, 2023-04-06

Re: [PATCH v6 05/11] LSM: Create lsm_module_list system call

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2023-03-03 18:32:59
Also in: linux-api, lkml

On Wed, Feb 22, 2023, at 21:08, Casey Schaufler wrote:
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help