]> Git Repo - linux.git/commitdiff
Merge tag 'core-entry-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Wed, 5 Aug 2020 04:00:11 +0000 (21:00 -0700)
committerLinus Torvalds <[email protected]>
Wed, 5 Aug 2020 04:00:11 +0000 (21:00 -0700)
Pull generic kernel entry/exit code from Thomas Gleixner:
 "Generic implementation of common syscall, interrupt and exception
  entry/exit functionality based on the recent X86 effort to ensure
  correctness of entry/exit vs RCU and instrumentation.

  As this functionality and the required entry/exit sequences are not
  architecture specific, sharing them allows other architectures to
  benefit instead of copying the same code over and over again.

  This branch was kept standalone to allow others to work on it. The
  conversion of x86 comes in a seperate pull request which obviously is
  based on this branch"

* tag 'core-entry-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  entry: Correct __secure_computing() stub
  entry: Correct 'noinstr' attributes
  entry: Provide infrastructure for work before transitioning to guest mode
  entry: Provide generic interrupt entry/exit code
  entry: Provide generic syscall exit function
  entry: Provide generic syscall entry functionality
  seccomp: Provide stub for __secure_computing()

1  2 
arch/Kconfig
include/linux/seccomp.h
kernel/Makefile

diff --combined arch/Kconfig
index 943aac2f3ebef42ff2dbf72ed3e7cfc3c5d51287,852a527f418f930ef6ed3e0d5fc1a65247650aa7..2af32236aaa8a1cec45aefd168014bada59fca08
@@@ -27,6 -27,9 +27,9 @@@ config HAVE_IMA_KEXE
  config HOTPLUG_SMT
        bool
  
+ config GENERIC_ENTRY
+        bool
  config OPROFILE
        tristate "OProfile system profiling"
        depends on PROFILING
@@@ -754,6 -757,13 +757,6 @@@ config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_L
        depends on MMU
        select ARCH_HAS_ELF_RANDOMIZE
  
 -config HAVE_COPY_THREAD_TLS
 -      bool
 -      help
 -        Architecture provides copy_thread_tls to accept tls argument via
 -        normal C parameter passing, rather than extracting the syscall
 -        argument from pt_regs.
 -
  config HAVE_STACK_VALIDATION
        bool
        help
diff --combined include/linux/seccomp.h
index 881c90b6aa25a9094dfdebb60cee4541722cb00f,51f234b6d28f744ad7ce01e05513d4c550950379..02aef2844c38ebb736b47ca689c5637a265e8e78
                                         SECCOMP_FILTER_FLAG_NEW_LISTENER | \
                                         SECCOMP_FILTER_FLAG_TSYNC_ESRCH)
  
 +/* sizeof() the first published struct seccomp_notif_addfd */
 +#define SECCOMP_NOTIFY_ADDFD_SIZE_VER0 24
 +#define SECCOMP_NOTIFY_ADDFD_SIZE_LATEST SECCOMP_NOTIFY_ADDFD_SIZE_VER0
 +
  #ifdef CONFIG_SECCOMP
  
  #include <linux/thread_info.h>
 +#include <linux/atomic.h>
  #include <asm/seccomp.h>
  
  struct seccomp_filter;
@@@ -34,7 -29,6 +34,7 @@@
   */
  struct seccomp {
        int mode;
 +      atomic_t filter_count;
        struct seccomp_filter *filter;
  };
  
@@@ -64,9 -58,11 +64,11 @@@ static inline int seccomp_mode(struct s
  
  struct seccomp { };
  struct seccomp_filter { };
+ struct seccomp_data;
  
  #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
  static inline int secure_computing(void) { return 0; }
+ static inline int __secure_computing(const struct seccomp_data *sd) { return 0; }
  #else
  static inline void secure_computing_strict(int this_syscall) { return; }
  #endif
@@@ -88,10 -84,10 +90,10 @@@ static inline int seccomp_mode(struct s
  #endif /* CONFIG_SECCOMP */
  
  #ifdef CONFIG_SECCOMP_FILTER
 -extern void put_seccomp_filter(struct task_struct *tsk);
 +extern void seccomp_filter_release(struct task_struct *tsk);
  extern void get_seccomp_filter(struct task_struct *tsk);
  #else  /* CONFIG_SECCOMP_FILTER */
 -static inline void put_seccomp_filter(struct task_struct *tsk)
 +static inline void seccomp_filter_release(struct task_struct *tsk)
  {
        return;
  }
diff --combined kernel/Makefile
index 23f189743c73c1f7d202ad0e71f04f1e8b289165,fde2000d0d0d0515bcba304e8d04f4cce2983612..bdeb77e270427378542a9b0e58cb24c9b06874df
@@@ -12,7 -12,6 +12,7 @@@ obj-y     = fork.o exec_domain.o panic.
            notifier.o ksysfs.o cred.o reboot.o \
            async.o range.o smpboot.o ucount.o
  
 +obj-$(CONFIG_BPFILTER) += usermode_driver.o
  obj-$(CONFIG_MODULES) += kmod.o
  obj-$(CONFIG_MULTIUSER) += groups.o
  
@@@ -49,6 -48,7 +49,7 @@@ obj-y += irq
  obj-y += rcu/
  obj-y += livepatch/
  obj-y += dma/
+ obj-y += entry/
  
  obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o
  obj-$(CONFIG_FREEZER) += freezer.o
@@@ -126,7 -126,6 +127,7 @@@ obj-$(CONFIG_WATCH_QUEUE) += watch_queu
  
  obj-$(CONFIG_SYSCTL_KUNIT_TEST) += sysctl-test.o
  
 +CFLAGS_stackleak.o += $(DISABLE_STACKLEAK_PLUGIN)
  obj-$(CONFIG_GCC_PLUGIN_STACKLEAK) += stackleak.o
  KASAN_SANITIZE_stackleak.o := n
  KCSAN_SANITIZE_stackleak.o := n
This page took 0.070721 seconds and 4 git commands to generate.