lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 7 Dec 2020 18:00:06 +0200 From: Mike Rapoport <rppt@...ux.ibm.com> To: Qian Cai <qcai@...hat.com> Cc: Mike Rapoport <rppt@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Alexander Viro <viro@...iv.linux.org.uk>, Andy Lutomirski <luto@...nel.org>, Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>, Catalin Marinas <catalin.marinas@....com>, Christopher Lameter <cl@...ux.com>, Dan Williams <dan.j.williams@...el.com>, Dave Hansen <dave.hansen@...ux.intel.com>, David Hildenbrand <david@...hat.com>, Elena Reshetova <elena.reshetova@...el.com>, "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>, James Bottomley <jejb@...ux.ibm.com>, "Kirill A. Shutemov" <kirill@...temov.name>, Matthew Wilcox <willy@...radead.org>, Mark Rutland <mark.rutland@....com>, Michael Kerrisk <mtk.manpages@...il.com>, Palmer Dabbelt <palmer@...belt.com>, Paul Walmsley <paul.walmsley@...ive.com>, Peter Zijlstra <peterz@...radead.org>, Rick Edgecombe <rick.p.edgecombe@...el.com>, Roman Gushchin <guro@...com>, Shakeel Butt <shakeelb@...gle.com>, Shuah Khan <shuah@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Tycho Andersen <tycho@...ho.ws>, Will Deacon <will@...nel.org>, linux-api@...r.kernel.org, linux-arch@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-fsdevel@...r.kernel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org, linux-nvdimm@...ts.01.org, linux-riscv@...ts.infradead.org, x86@...nel.org, Palmer Dabbelt <palmerdabbelt@...gle.com> Subject: Re: [PATCH v14 09/10] arch, mm: wire up memfd_secret system call were relevant On Mon, Dec 07, 2020 at 09:45:59AM -0500, Qian Cai wrote: > On Thu, 2020-12-03 at 08:29 +0200, Mike Rapoport wrote: ... > > diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h > > index 6d55324363ab..f9d93fbf9b69 100644 > > --- a/include/linux/syscalls.h > > +++ b/include/linux/syscalls.h > > @@ -1010,6 +1010,7 @@ asmlinkage long sys_pidfd_send_signal(int pidfd, int sig, > > asmlinkage long sys_pidfd_getfd(int pidfd, int fd, unsigned int flags); > > asmlinkage long sys_watch_mount(int dfd, const char __user *path, > > unsigned int at_flags, int watch_fd, int watch_id); > > +asmlinkage long sys_memfd_secret(unsigned long flags); > > > > /* > > * Architecture-specific system calls > > diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h > > index 5df46517260e..51151888f330 100644 > > --- 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 > > I can't see where was it defined for arm64 after it looks like Andrew has > deleted the above chunk. Thus, we have a warning using this .config: > > https://cailca.coding.net/public/linux/mm/git/files/master/arm64.config > > <stdin>:1539:2: warning: #warning syscall memfd_secret not implemented [-Wcpp] I was under the impression that Andrew only removed the #ifdef... Andrew, can you please restore syscall definition for memfd_secret() in include/uapi/asm-generic/unistd.h? > > > > #undef __NR_syscalls > > -#define __NR_syscalls 442 > > +#define __NR_syscalls 443 > > > > /* > > * 32 bit systems traditionally used different > > diff --git a/mm/secretmem.c b/mm/secretmem.c > > index 7236f4d9458a..b8a32954ac68 100644 > > --- a/mm/secretmem.c > > +++ b/mm/secretmem.c > > @@ -415,6 +415,9 @@ static int __init secretmem_setup(char *str) > > unsigned long reserved_size; > > int err; > > > > + if (!can_set_direct_map()) > > + return 0; > > + > > reserved_size = memparse(str, NULL); > > if (!reserved_size) > > return 0; > > diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh > > index a18b47695f55..b7609958ee36 100755 > > --- a/scripts/checksyscalls.sh > > +++ b/scripts/checksyscalls.sh > > @@ -40,6 +40,10 @@ cat << EOF > > #define __IGNORE_setrlimit /* setrlimit */ > > #endif > > > > +#ifndef __ARCH_WANT_MEMFD_SECRET > > +#define __IGNORE_memfd_secret > > +#endif > > + > > /* Missing flags argument */ > > #define __IGNORE_renameat /* renameat2 */ > > > -- Sincerely yours, Mike.
Powered by blists - more mailing lists