diff options
author | Mike Rapoport <rppt@linux.ibm.com> | 2021-04-22 16:43:28 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2021-04-26 11:41:45 +1000 |
commit | 0f412b92bb35e8711bb753577d0d7a76548a60f1 (patch) | |
tree | 1f478e97b3ef6fc9ddf7b8db2f2359a639e89330 | |
parent | ebad381e4cd10b2fb030e40cff2222f6ad6a6bf1 (diff) | |
download | linux-next-0f412b92bb35e8711bb753577d0d7a76548a60f1.tar.gz |
memfd_secret: use unsigned int rather than long as syscall flags type
Yuri Norov says:
If parameter size is the same for native and compat ABIs, we may
wire a syscall made by compat client to native handler. This is
true for unsigned int, but not true for unsigned long or pointer.
That's why I suggest using unsigned int and so avoid creating compat
entry point.
Use unsigned int as the type of the flags parameter in memfd_secret()
system call.
Link: https://lkml.kernel.org/r/20210331142345.27532-1-rppt@kernel.org
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r-- | include/linux/syscalls.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 49c93c906893..1a1b5d724497 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1050,7 +1050,7 @@ asmlinkage long sys_landlock_create_ruleset(const struct landlock_ruleset_attr _ asmlinkage long sys_landlock_add_rule(int ruleset_fd, enum landlock_rule_type rule_type, const void __user *rule_attr, __u32 flags); asmlinkage long sys_landlock_restrict_self(int ruleset_fd, __u32 flags); -asmlinkage long sys_memfd_secret(unsigned long flags); +asmlinkage long sys_memfd_secret(unsigned int flags); /* * Architecture-specific system calls |