From 46684493b57e3a2042b52adebd13595e9930b08f Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 14 Apr 2021 08:21:46 +1000 Subject: [PATCH] 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 --- tools/testing/selftests/vm/memfd_secret.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/memfd_secret.c b/tools/testing/selftests/vm/memfd_secret.c index c878c2b841fc..2462f52e9c96 100644 --- a/tools/testing/selftests/vm/memfd_secret.c +++ b/tools/testing/selftests/vm/memfd_secret.c @@ -38,7 +38,7 @@ static unsigned long page_size; static unsigned long mlock_limit_cur; static unsigned long mlock_limit_max; -static int memfd_secret(unsigned long flags) +static int memfd_secret(unsigned int flags) { return syscall(__NR_memfd_secret, flags); } -- 2.51.0