lkml.org 
[lkml]   [2020]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v14 09/10] arch, mm: wire up memfd_secret system call were relevant
On Thu, Dec 03, 2020 at 03:39:16PM -0800, Andrew Morton wrote:
> On Thu, 3 Dec 2020 08:29:48 +0200 Mike Rapoport <rppt@kernel.org> wrote:
>
> > From: Mike Rapoport <rppt@linux.ibm.com>
> >
> > Wire up memfd_secret system call on architectures that define
> > ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86.
> >
> > ...
> >
> > --- a/include/uapi/asm-generic/unistd.h
> > +++ b/include/uapi/asm-generic/unistd.h
> > @@ -861,9 +861,13 @@ __SYSCALL(__NR_faccessat2, sys_faccessat2)
> > __SYSCALL(__NR_process_madvise, sys_process_madvise)
> > #define __NR_watch_mount 441
> > __SYSCALL(__NR_watch_mount, sys_watch_mount)
> > +#ifdef __ARCH_WANT_MEMFD_SECRET
> > +#define __NR_memfd_secret 442
> > +__SYSCALL(__NR_memfd_secret, sys_memfd_secret)
> > +#endif
>
> Why do we add the ifdef? Can't we simply define the syscall on all
> architectures and let sys_ni do its thing?

I quite blindly copied it from clone3. I agree there is no real need for
it and sys_ni handles this just fine.

--
Sincerely yours,
Mike.

\
 
 \ /
  Last update: 2020-12-06 12:36    [W:3.260 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site