All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] remove in-kernel syscall invocations (part 3 == compat cruft)
@ 2018-03-18 16:10 Dominik Brodowski
  2018-03-18 16:10   ` Dominik Brodowski
                   ` (5 more replies)
  0 siblings, 6 replies; 78+ messages in thread
From: Dominik Brodowski @ 2018-03-18 16:10 UTC (permalink / raw)
  To: linux-kernel, torvalds, arnd, viro; +Cc: linux-arch

Here is a third series of patches which reduce the number of syscall
invocations from within the kernel. Once this long-term goal is achieved,
the syscall entry path can be streamlined.

This series focuses on a few compat syscall definitions in arch/ which
have no other in-kernel users. In particular, it introduces generic compat
syscalls for a handful of mm- and fs-related functions. Their calling
convention depends on whether the architecture sets
	__ARCH_WANT_LE_COMPAT_SYS (little-endian calling convention)
and/or	__ARCH_WANT_COMPAT_SYS_WITH_PADDING.

As I am not used to non-x86 architectures, please bear with me in case I
broke something or missed some peculiarities. In particular, I was
surprised that a couple of compat syscall definitions used "u64" or
"unsigned long" as parameter definitions -- though the code makes it clear
that they expected an "u32" or an "unsigned int" instead. CVE-2009-0029
seems to be handled already by the compat_sys_*() compat_SyS_*() /
C_SYSC_*() indirection provided for by include/linux/compat.h. Or do I
miss something here?

I did not bother addressing metag and tile, as they are going away.
Parisc and sh (sys_sh32.c in particular) provide similar wrappers for
"native" (non-compat) use, so they are left as-is as well.

Patches 5 and 6 in this series are x86-only.

Thanks,
	Dominik

Dominik Brodowski (6):
  fs: provide a generic compat_sys_fallocate() implementation
  fs: provide a generic compat_sys_truncate64() implementation
  fs: provide generic compat_sys_p{read,write}64() implementations
  mm: provide generic compat_sys_readahead() implementation
  x86: use _do_fork() in compat_sys_x86_clone()
  x86: remove compat_sys_x86_waitpid()

 arch/mips/include/asm/unistd.h         |  8 ++++
 arch/mips/kernel/linux32.c             | 35 ---------------
 arch/mips/kernel/scall64-o32.S         | 10 ++---
 arch/powerpc/include/asm/unistd.h      |  5 +++
 arch/powerpc/kernel/sys_ppc32.c        | 30 -------------
 arch/s390/include/asm/unistd.h         |  4 ++
 arch/s390/kernel/compat_linux.c        | 33 --------------
 arch/s390/kernel/compat_linux.h        |  5 ---
 arch/s390/kernel/syscalls/syscall.tbl  | 10 ++---
 arch/sparc/include/asm/unistd.h        |  4 ++
 arch/sparc/kernel/sys_sparc32.c        | 41 -----------------
 arch/sparc/kernel/systbls.h            | 19 --------
 arch/sparc/kernel/systbls_64.S         |  4 +-
 arch/x86/entry/syscalls/syscall_32.tbl | 12 ++---
 arch/x86/ia32/sys_ia32.c               | 46 +------------------
 arch/x86/include/asm/sys_ia32.h        | 14 ------
 arch/x86/include/asm/unistd.h          |  5 +++
 fs/open.c                              | 52 +++++++++++++++++++++-
 fs/read_write.c                        | 74 +++++++++++++++++++++++++++++--
 include/linux/compat.h                 | 42 ++++++++++++++++++
 mm/readahead.c                         | 81 ++++++++++++++++++++++++----------
 21 files changed, 266 insertions(+), 268 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2018-03-30 15:56 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 16:10 [RFC PATCH 0/6] remove in-kernel syscall invocations (part 3 == compat cruft) Dominik Brodowski
2018-03-18 16:10 ` [RFC PATCH 1/6] fs: provide a generic compat_sys_fallocate() implementation Dominik Brodowski
2018-03-18 16:10   ` Dominik Brodowski
2018-03-18 16:10 ` [RFC PATCH 2/6] fs: provide a generic compat_sys_truncate64() implementation Dominik Brodowski
2018-03-18 16:10   ` Dominik Brodowski
2018-03-18 17:49   ` Al Viro
2018-03-18 18:21   ` Linus Torvalds
2018-03-18 18:21     ` Linus Torvalds
2018-03-19  6:29   ` Kevin Easton
2018-03-19  6:29     ` Kevin Easton
2018-03-18 16:10 ` [RFC PATCH 3/6] fs: provide generic compat_sys_p{read,write}64() implementations Dominik Brodowski
2018-03-18 16:10   ` [RFC PATCH 3/6] fs: provide generic compat_sys_p{read, write}64() implementations Dominik Brodowski
2018-03-18 16:10   ` [RFC PATCH 3/6] fs: provide generic compat_sys_p{read,write}64() implementations Dominik Brodowski
2018-03-18 17:40   ` Linus Torvalds
2018-03-18 17:40     ` [RFC PATCH 3/6] fs: provide generic compat_sys_p{read, write}64() implementations Linus Torvalds
2018-03-18 17:40     ` [RFC PATCH 3/6] fs: provide generic compat_sys_p{read,write}64() implementations Linus Torvalds
2018-03-18 18:05   ` Al Viro
2018-03-18 18:05     ` [RFC PATCH 3/6] fs: provide generic compat_sys_p{read, write}64() implementations Al Viro
2018-03-18 18:05     ` [RFC PATCH 3/6] fs: provide generic compat_sys_p{read,write}64() implementations Al Viro
2018-03-18 16:10 ` [RFC PATCH 4/6] mm: provide generic compat_sys_readahead() implementation Dominik Brodowski
2018-03-18 16:10   ` Dominik Brodowski
2018-03-18 17:40   ` Al Viro
2018-03-18 18:06     ` Linus Torvalds
2018-03-18 18:06       ` Linus Torvalds
2018-03-18 18:18       ` Al Viro
2018-03-19  4:23         ` Al Viro
2018-03-19  9:29           ` Ingo Molnar
2018-03-19  9:29             ` Ingo Molnar
2018-03-19  9:29             ` Ingo Molnar
2018-03-19 23:23             ` Al Viro
2018-03-19 23:23               ` Al Viro
2018-03-19 23:23               ` Al Viro
2018-03-20  8:56               ` Dominik Brodowski
2018-03-20  8:56                 ` Dominik Brodowski
2018-03-20  8:56                 ` Dominik Brodowski
2018-03-20  8:59               ` Ingo Molnar
2018-03-20  8:59                 ` Ingo Molnar
2018-03-20  8:59                 ` Ingo Molnar
2018-03-22  0:15               ` Al Viro
2018-03-22  0:15                 ` Al Viro
2018-03-26  0:40                 ` [RFC] new SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE wrappers Al Viro
2018-03-26  0:40                   ` Al Viro
2018-03-26  0:40                   ` Al Viro
2018-03-26  3:47                   ` Al Viro
2018-03-26  3:47                     ` Al Viro
2018-03-26  3:47                     ` Al Viro
2018-03-26  6:15                     ` Linus Torvalds
2018-03-26  6:15                       ` Linus Torvalds
2018-03-26  6:15                       ` Linus Torvalds
2018-03-26  6:20                       ` Linus Torvalds
2018-03-26  6:20                         ` Linus Torvalds
2018-03-26  6:20                         ` Linus Torvalds
2018-03-26  6:44                       ` John Paul Adrian Glaubitz
2018-03-26  6:44                         ` John Paul Adrian Glaubitz
2018-03-26  6:44                         ` John Paul Adrian Glaubitz
2018-03-27  1:03                         ` Linus Torvalds
2018-03-27  1:03                           ` Linus Torvalds
2018-03-27  1:03                           ` Linus Torvalds
2018-03-27  2:37                           ` John Paul Adrian Glaubitz
2018-03-27  2:37                             ` John Paul Adrian Glaubitz
2018-03-27  2:37                             ` John Paul Adrian Glaubitz
2018-03-27  3:40                             ` Linus Torvalds
2018-03-27  3:40                               ` Linus Torvalds
2018-03-27  3:40                               ` Linus Torvalds
2018-03-27  4:58                               ` John Paul Adrian Glaubitz
2018-03-27  4:58                                 ` John Paul Adrian Glaubitz
2018-03-27  4:58                                 ` John Paul Adrian Glaubitz
2018-03-30 10:58                                 ` Ingo Molnar
2018-03-30 10:58                                   ` Ingo Molnar
2018-03-30 10:58                                   ` Ingo Molnar
2018-03-30 15:54                                   ` Adam Borowski
2018-03-30 15:54                                     ` Adam Borowski
2018-03-30 15:54                                     ` Adam Borowski
2018-03-26  6:24                     ` Dominik Brodowski
2018-03-26  6:24                       ` Dominik Brodowski
2018-03-26  6:24                       ` Dominik Brodowski
2018-03-18 16:10 ` [RFC PATCH 5/6] x86: use _do_fork() in compat_sys_x86_clone() Dominik Brodowski
2018-03-18 16:10 ` [RFC PATCH 6/6] x86: remove compat_sys_x86_waitpid() Dominik Brodowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.