From: Mike Rapoport Date: Tue, 13 Apr 2021 22:21:45 +0000 (+1000) Subject: memfd_secret: use unsigned int rather than long as syscall flags type X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7346cf88f51e9247069eb29cdad6c75b62409a61;p=users%2Fjedix%2Flinux-maple.git 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 Acked-by: David Hildenbrand Acked-by: Yury Norov Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- diff --git a/mm/secretmem.c b/mm/secretmem.c index fa6738e860c2..8901acd94638 100644 --- a/mm/secretmem.c +++ b/mm/secretmem.c @@ -185,7 +185,7 @@ err_free_inode: return file; } -SYSCALL_DEFINE1(memfd_secret, unsigned long, flags) +SYSCALL_DEFINE1(memfd_secret, unsigned int, flags) { struct file *file; int fd, err;