# 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-sparc64-full-2016.08-613-ge98b4dd/bin/sparc64-linux-gcc --version # < git log --format=%s --max-count=1 642e7fd23353e22290e3d51719fcb658dc252342 # < make -s -j 10 ARCH=sparc O=/kisskb/build/linus_sparc-allmodconfig_sparc64 CROSS_COMPILE=/opt/cross/kisskb/br-sparc64-full-2016.08-613-ge98b4dd/bin/sparc64-linux- allmodconfig # Added to kconfig CONFIG_64BIT=n # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_HAVE_FTRACE_MCOUNT_RECORD=n # Added to kconfig CONFIG_SAMPLES=n # Added to kconfig CONFIG_MODULE_SIG=n # yes \n | make -s -j 10 ARCH=sparc O=/kisskb/build/linus_sparc-allmodconfig_sparc64 CROSS_COMPILE=/opt/cross/kisskb/br-sparc64-full-2016.08-613-ge98b4dd/bin/sparc64-linux- oldconfig yes: standard output: Broken pipe yes: write error # make -s -j 10 ARCH=sparc O=/kisskb/build/linus_sparc-allmodconfig_sparc64 CROSS_COMPILE=/opt/cross/kisskb/br-sparc64-full-2016.08-613-ge98b4dd/bin/sparc64-linux- In file included from /kisskb/src/arch/sparc/include/asm/cacheflush.h:11:0, from /kisskb/src/drivers/android/binder.c:54: /kisskb/src/arch/sparc/include/asm/cacheflush_32.h:40:37: warning: 'struct page' declared inside parameter list void sparc_flush_page_to_ram(struct page *page); ^ /kisskb/src/arch/sparc/include/asm/cacheflush_32.h:40:37: warning: its scope is only this definition or declaration, which is probably not what you want In file included from /kisskb/src/arch/sparc/include/asm/cacheflush.h:11:0, from /kisskb/src/drivers/android/binder_alloc.c:20: /kisskb/src/arch/sparc/include/asm/cacheflush_32.h:40:37: warning: 'struct page' declared inside parameter list void sparc_flush_page_to_ram(struct page *page); ^ /kisskb/src/arch/sparc/include/asm/cacheflush_32.h:40:37: warning: its scope is only this definition or declaration, which is probably not what you want /kisskb/src/drivers/char/tpm/tpm2-cmd.c: In function 'tpm2_unseal_trusted': /kisskb/src/drivers/char/tpm/tpm2-cmd.c:733:2: warning: 'blob_handle' may be used uninitialized in this function [-Wmaybe-uninitialized] tpm2_flush_context_cmd(chip, blob_handle, TPM_TRANSMIT_UNLOCKED); ^ In file included from /kisskb/src/arch/sparc/include/asm/cmpxchg.h:7:0, from /kisskb/src/arch/sparc/include/asm/atomic_32.h:17, from /kisskb/src/arch/sparc/include/asm/atomic.h:7, from /kisskb/src/include/linux/atomic.h:5, from /kisskb/src/arch/sparc/include/asm/smp_32.h:25, from /kisskb/src/arch/sparc/include/asm/smp.h:7, from /kisskb/src/arch/sparc/include/asm/switch_to_32.h:5, from /kisskb/src/arch/sparc/include/asm/switch_to.h:7, from /kisskb/src/arch/sparc/include/asm/ptrace.h:120, from /kisskb/src/arch/sparc/include/asm/thread_info_32.h:19, from /kisskb/src/arch/sparc/include/asm/thread_info.h:7, from /kisskb/src/include/linux/thread_info.h:38, from /kisskb/src/include/asm-generic/preempt.h:5, from ./arch/sparc/include/generated/asm/preempt.h:1, from /kisskb/src/include/linux/preempt.h:81, from /kisskb/src/include/linux/spinlock.h:51, from /kisskb/src/include/linux/wait.h:9, from /kisskb/src/include/linux/wait_bit.h:8, from /kisskb/src/include/linux/fs.h:6, from /kisskb/src/fs/ocfs2/file.c:27: /kisskb/src/fs/ocfs2/file.c: In function 'ocfs2_file_write_iter': /kisskb/src/arch/sparc/include/asm/cmpxchg_32.h:28:22: warning: value computed is not used [-Wunused-value] #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ^ /kisskb/src/fs/ocfs2/file.c:2386:3: note: in expansion of macro 'xchg' xchg(&iocb->ki_complete, saved_ki_complete); ^ /kisskb/src/drivers/input/joystick/analog.c:176:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp] #warning Precise timer not defined for this architecture. ^ In file included from /kisskb/src/include/linux/printk.h:7:0, from /kisskb/src/include/linux/kernel.h:14, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/rculist.h:10, from /kisskb/src/include/linux/sched/signal.h:5, from /kisskb/src/drivers/net/usb/hso.c:55: /kisskb/src/drivers/net/usb/hso.c: In function 'hso_serial_set_termios': /kisskb/src/include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 4 has type 'tcflag_t {aka long unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ /kisskb/src/include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^ /kisskb/src/include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ /kisskb/src/drivers/net/usb/hso.c:115:3: note: in expansion of macro 'pr_info' pr_info("[%d:%s] " fmt, \ ^ /kisskb/src/drivers/net/usb/hso.c:1404:3: note: in expansion of macro 'hso_dbg' hso_dbg(0x16, "Termios called with: cflags new[%d] - old[%d]\n", ^ /kisskb/src/include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 5 has type 'tcflag_t {aka long unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ /kisskb/src/include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^ /kisskb/src/include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ /kisskb/src/drivers/net/usb/hso.c:115:3: note: in expansion of macro 'pr_info' pr_info("[%d:%s] " fmt, \ ^ /kisskb/src/drivers/net/usb/hso.c:1404:3: note: in expansion of macro 'hso_dbg' hso_dbg(0x16, "Termios called with: cflags new[%d] - old[%d]\n", ^ In file included from /kisskb/src/include/linux/printk.h:7:0, from /kisskb/src/include/linux/kernel.h:14, from /kisskb/src/include/asm-generic/bug.h:18, from /kisskb/src/arch/sparc/include/asm/bug.h:25, from /kisskb/src/include/linux/bug.h:5, from /kisskb/src/include/linux/thread_info.h:12, from /kisskb/src/arch/sparc/include/asm/current.h:15, from /kisskb/src/include/linux/sched.h:12, from /kisskb/src/include/linux/uaccess.h:5, from /kisskb/src/drivers/sbus/char/oradax.c:36: /kisskb/src/drivers/sbus/char/oradax.c: In function 'dax_devmap': /kisskb/src/include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ /kisskb/src/include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^ /kisskb/src/include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ /kisskb/src/drivers/sbus/char/oradax.c:56:32: note: in expansion of macro 'pr_info' #define dax_info(fmt, ...) pr_info("%s: " fmt "\n", __func__, ##__VA_ARGS__) ^ /kisskb/src/drivers/sbus/char/oradax.c:60:7: note: in expansion of macro 'dax_info' dax_info(fmt, ##__VA_ARGS__); \ ^ /kisskb/src/drivers/sbus/char/oradax.c:389:2: note: in expansion of macro 'dax_dbg' dax_dbg("len=0x%lx, flags=0x%lx", len, vma->vm_flags); ^ /kisskb/src/include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ /kisskb/src/include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^ /kisskb/src/include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ /kisskb/src/drivers/sbus/char/oradax.c:56:32: note: in expansion of macro 'pr_info' #define dax_info(fmt, ...) pr_info("%s: " fmt "\n", __func__, ##__VA_ARGS__) ^ /kisskb/src/drivers/sbus/char/oradax.c:60:7: note: in expansion of macro 'dax_info' dax_info(fmt, ##__VA_ARGS__); \ ^ /kisskb/src/drivers/sbus/char/oradax.c:397:3: note: in expansion of macro 'dax_dbg' dax_dbg("len(%lu) != DAX_MMAP_LEN(%d)", len, DAX_MMAP_LEN); ^ /kisskb/src/drivers/sbus/char/oradax.c: In function 'dax_lock_pages': /kisskb/src/drivers/sbus/char/oradax.c:468:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] *err_va = (u64)ccbp->out; ^ /kisskb/src/drivers/sbus/char/oradax.c:478:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] *err_va = (u64)ccbp->pri; ^ /kisskb/src/drivers/sbus/char/oradax.c:488:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] *err_va = (u64)ccbp->sec; ^ /kisskb/src/drivers/sbus/char/oradax.c:498:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] *err_va = (u64)ccbp->tbl; ^ /kisskb/src/drivers/sbus/char/oradax.c: In function 'dax_preprocess_usr_ccbs': /kisskb/src/drivers/sbus/char/oradax.c:851:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ccbp->ca = (void *)ctx->ca_buf_ra + ca_offset; ^ In file included from /kisskb/src/include/linux/printk.h:7:0, from /kisskb/src/include/linux/kernel.h:14, from /kisskb/src/include/asm-generic/bug.h:18, from /kisskb/src/arch/sparc/include/asm/bug.h:25, from /kisskb/src/include/linux/bug.h:5, from /kisskb/src/include/linux/thread_info.h:12, from /kisskb/src/arch/sparc/include/asm/current.h:15, from /kisskb/src/include/linux/sched.h:12, from /kisskb/src/include/linux/uaccess.h:5, from /kisskb/src/drivers/sbus/char/oradax.c:36: /kisskb/src/drivers/sbus/char/oradax.c: In function 'dax_ccb_exec': /kisskb/src/include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ /kisskb/src/include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH' #define KERN_INFO KERN_SOH "6" /* informational */ ^ /kisskb/src/include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^ /kisskb/src/drivers/sbus/char/oradax.c:56:32: note: in expansion of macro 'pr_info' #define dax_info(fmt, ...) pr_info("%s: " fmt "\n", __func__, ##__VA_ARGS__) ^ /kisskb/src/drivers/sbus/char/oradax.c:60:7: note: in expansion of macro 'dax_info' dax_info(fmt, ##__VA_ARGS__); \ ^ /kisskb/src/drivers/sbus/char/oradax.c:880:2: note: in expansion of macro 'dax_dbg' dax_dbg("args: ccb_buf_len=%ld, idx=%d", count, idx); ^ In file included from /kisskb/src/arch/sparc/include/asm/cmpxchg.h:7:0, from /kisskb/src/arch/sparc/include/asm/atomic_32.h:17, from /kisskb/src/arch/sparc/include/asm/atomic.h:7, from /kisskb/src/include/linux/atomic.h:5, from /kisskb/src/arch/sparc/include/asm/smp_32.h:25, from /kisskb/src/arch/sparc/include/asm/smp.h:7, from /kisskb/src/arch/sparc/include/asm/switch_to_32.h:5, from /kisskb/src/arch/sparc/include/asm/switch_to.h:7, from /kisskb/src/arch/sparc/include/asm/ptrace.h:120, from /kisskb/src/arch/sparc/include/asm/thread_info_32.h:19, from /kisskb/src/arch/sparc/include/asm/thread_info.h:7, from /kisskb/src/include/linux/thread_info.h:38, from /kisskb/src/include/asm-generic/preempt.h:5, from ./arch/sparc/include/generated/asm/preempt.h:1, from /kisskb/src/include/linux/preempt.h:81, from /kisskb/src/include/linux/spinlock.h:51, from /kisskb/src/include/linux/seqlock.h:36, from /kisskb/src/include/linux/time.h:6, from /kisskb/src/include/linux/stat.h:19, from /kisskb/src/include/linux/module.h:10, from /kisskb/src/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:30: /kisskb/src/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_xdp_setup': /kisskb/src/arch/sparc/include/asm/cmpxchg_32.h:28:22: warning: value computed is not used [-Wunused-value] #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) ^ /kisskb/src/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:9957:4: note: in expansion of macro 'xchg' xchg(&adapter->rx_ring[i]->xdp_prog, adapter->xdp_prog); ^ /kisskb/src/drivers/tty/serial/sunzilog.c:1132:13: warning: 'sunzilog_putchar' defined but not used [-Wunused-function] static void sunzilog_putchar(struct uart_port *port, int ch) ^ WARNING: EXPORT symbol "__lshrdi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_write_enter" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ashldi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ndelay" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__udelay" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ashrdi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_read_try" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__muldi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__divdi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "bzero_1page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_read_enter" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_read_exit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__copy_1page" [vmlinux] version generation failed, symbol will not be versioned. kernel: arch/sparc/boot/image is ready kernel: arch/sparc/boot/zImage is ready WARNING: EXPORT symbol "__lshrdi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_write_enter" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ashldi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ndelay" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__udelay" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__ashrdi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_read_try" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__muldi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__divdi3" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "bzero_1page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_read_enter" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "___rw_read_exit" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "empty_zero_page" [vmlinux] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "__copy_1page" [vmlinux] version generation failed, symbol will not be versioned. ERROR: "mdesc_release" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_hvapi_register" [drivers/sbus/char/oradax.ko] undefined! ERROR: "mdesc_get_property" [drivers/sbus/char/oradax.ko] undefined! ERROR: "mdesc_node_by_name" [drivers/sbus/char/oradax.ko] undefined! ERROR: "mdesc_grab" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_ccb_info" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_ccb_submit" [drivers/sbus/char/oradax.ko] undefined! ERROR: "sun4v_ccb_kill" [drivers/sbus/char/oradax.ko] undefined! /kisskb/src/scripts/Makefile.modpost:92: recipe for target '__modpost' failed make[2]: *** [__modpost] Error 1 /kisskb/src/Makefile:1260: recipe for target 'modules' failed make[1]: *** [modules] Error 2 Makefile:146: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 Command 'make -s -j 10 ARCH=sparc O=/kisskb/build/linus_sparc-allmodconfig_sparc64 CROSS_COMPILE=/opt/cross/kisskb/br-sparc64-full-2016.08-613-ge98b4dd/bin/sparc64-linux- ' returned non-zero exit status 2 # rm -rf /kisskb/build/linus_sparc-allmodconfig_sparc64 # Build took: 0:21:20.875854