# git rev-parse -q --verify 642e7fd23353e22290e3d51719fcb658dc252342^{commit} 642e7fd23353e22290e3d51719fcb658dc252342 already have revision, skipping fetch # git checkout -q -f -B kisskb 642e7fd23353e22290e3d51719fcb658dc252342 # git clean -qxdf # < git log -1 # commit 642e7fd23353e22290e3d51719fcb658dc252342 # Merge: 2103596 c9a2119 # Author: Linus Torvalds # Date: Mon Apr 2 21:22:12 2018 -0700 # # Merge branch 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux # # Pull removal of in-kernel calls to syscalls from Dominik Brodowski: # "System calls are interaction points between userspace and the kernel. # Therefore, system call functions such as sys_xyzzy() or # compat_sys_xyzzy() should only be called from userspace via the # syscall table, but not from elsewhere in the kernel. # # At least on 64-bit x86, it will likely be a hard requirement from # v4.17 onwards to not call system call functions in the kernel: It is # better to use use a different calling convention for system calls # there, where struct pt_regs is decoded on-the-fly in a syscall wrapper # which then hands processing over to the actual syscall function. This # means that only those parameters which are actually needed for a # specific syscall are passed on during syscall entry, instead of # filling in six CPU registers with random user space content all the # time (which may cause serious trouble down the call chain). Those # x86-specific patches will be pushed through the x86 tree in the near # future. # # Moreover, rules on how data may be accessed may differ between kernel # data and user data. This is another reason why calling sys_xyzzy() is # generally a bad idea, and -- at most -- acceptable in arch-specific # code. # # This patchset removes all in-kernel calls to syscall functions in the # kernel with the exception of arch/. On top of this, it cleans up the # three places where many syscalls are referenced or prototyped, namely # kernel/sys_ni.c, include/linux/syscalls.h and include/linux/compat.h" # # * 'syscalls-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: (109 commits) # bpf: whitelist all syscalls for error injection # kernel/sys_ni: remove {sys_,sys_compat} from cond_syscall definitions # kernel/sys_ni: sort cond_syscall() entries # syscalls/x86: auto-create compat_sys_*() prototypes # syscalls: sort syscall prototypes in include/linux/compat.h # net: remove compat_sys_*() prototypes from net/compat.h # syscalls: sort syscall prototypes in include/linux/syscalls.h # kexec: move sys_kexec_load() prototype to syscalls.h # x86/sigreturn: use SYSCALL_DEFINE0 # x86: fix sys_sigreturn() return type to be long, not unsigned long # x86/ioport: add ksys_ioperm() helper; remove in-kernel calls to sys_ioperm() # mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead() # mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() # mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() # fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate() # fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls # fs: add ksys_truncate() wrapper; remove in-kernel calls to sys_truncate() # fs: add ksys_sync_file_range helper(); remove in-kernel calls to syscall # kernel: add ksys_setsid() helper; remove in-kernel call to sys_setsid() # kernel: add ksys_unshare() helper; remove in-kernel calls to sys_unshare() # ... # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-gcc --version # < git log --format=%s --max-count=1 642e7fd23353e22290e3d51719fcb658dc252342 # < make -s -j 48 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- defconfig # make -s -j 48 ARCH=mips O=/kisskb/build/linus_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- FIT description: Linux 4.16.0-g642e7fd Created: Tue Apr 3 18:19:44 2018 Image 0 (kernel@0) Description: Linux 4.16.0-g642e7fd Created: Tue Apr 3 18:19:44 2018 Type: Kernel Image Compression: gzip compressed Data Size: 4405879 Bytes = 4302.62 kB = 4.20 MB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x8087b320 Hash algo: sha1 Hash value: 5e1cba5ee5cf6cb9500bd28ec485b7e59184485a Image 1 (fdt@boston) Description: img,boston Device Tree Created: Tue Apr 3 18:19:44 2018 Type: Flat Device Tree Compression: uncompressed Data Size: 3602 Bytes = 3.52 kB = 0.00 MB Architecture: MIPS Hash algo: sha1 Hash value: dabc84017c5ea1c23fdb5a4b25d185bdf81faa6a Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Tue Apr 3 18:19:44 2018 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 kB = 0.00 MB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Completed OK # rm -rf /kisskb/build/linus_mips-defconfig_mipsel # Build took: 0:01:41.086538