]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
memfd_secret: use unsigned int rather than long as syscall flags type
authorMike Rapoport <rppt@linux.ibm.com>
Thu, 22 Apr 2021 06:43:27 +0000 (16:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 May 2021 01:46:47 +0000 (11:46 +1000)
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>
mm/secretmem.c

index fa6738e860c2e8830f84d298328e08cbde77452c..8901acd94638fc6a1e7a37a0e4734bd01e19289e 100644 (file)
@@ -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;