Commit 168829ad authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking updates from Ingo Molnar:
 "The main changes in this cycle were:

   - A comprehensive rewrite of the robust/PI futex code's exit handling
     to fix various exit races. (Thomas Gleixner et al)

   - Rework the generic REFCOUNT_FULL implementation using
     atomic_fetch_* operations so that the performance impact of the
     cmpxchg() loops is mitigated for common refcount operations.

     With these performance improvements the generic implementation of
     refcount_t should be good enough for everybody - and this got
     confirmed by performance testing, so remove ARCH_HAS_REFCOUNT and
     REFCOUNT_FULL entirely, leaving the generic implementation enabled
     unconditionally. (Will Deacon)

   - Other misc changes, fixes, cleanups"

* 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
  lkdtm: Remove references to CONFIG_REFCOUNT_FULL
  locking/refcount: Remove unused 'refcount_error_report()' function
  locking/refcount: Consolidate implementations of refcount_t
  locking/refcount: Consolidate REFCOUNT_{MAX,SATURATED} definitions
  locking/refcount: Move saturation warnings out of line
  locking/refcount: Improve performance of generic REFCOUNT_FULL code
  locking/refcount: Move the bulk of the REFCOUNT_FULL implementation into the <linux/refcount.h> header
  locking/refcount: Remove unused refcount_*_checked() variants
  locking/refcount: Ensure integer operands are treated as signed
  locking/refcount: Define constants for saturation and max refcount values
  futex: Prevent exit livelock
  futex: Provide distinct return value when owner is exiting
  futex: Add mutex around futex exit
  futex: Provide state handling for exec() as well
  futex: Sanitize exit state handling
  futex: Mark the begin of futex exit explicitly
  futex: Set task::futex_state to DEAD right after handling futex exit
  futex: Split futex_mm_release() for exit/exec
  exit/exec: Seperate mm_release()
  futex: Replace PF_EXITPIDONE with a state
  ...
parents 1ae78780 500543c5
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
@@ -892,27 +892,6 @@ config STRICT_MODULE_RWX
config ARCH_HAS_PHYS_TO_DMA
	bool

config ARCH_HAS_REFCOUNT
	bool
	help
	  An architecture selects this when it has implemented refcount_t
	  using open coded assembly primitives that provide an optimized
	  refcount_t implementation, possibly at the expense of some full
	  refcount state checks of CONFIG_REFCOUNT_FULL=y.

	  The refcount overflow check behavior, however, must be retained.
	  Catching overflows is the primary security concern for protecting
	  against bugs in reference counts.

config REFCOUNT_FULL
	bool "Perform full reference count validation at the expense of speed"
	help
	  Enabling this switches the refcounting infrastructure from a fast
	  unchecked atomic_t implementation to a fully state checked
	  implementation, which can be (slightly) slower but provides protections
	  against various use-after-free conditions that can be used in
	  security flaw exploits.

config HAVE_ARCH_COMPILER_H
	bool
	help
+0 −1
Original line number Diff line number Diff line
@@ -117,7 +117,6 @@ config ARM
	select OLD_SIGSUSPEND3
	select PCI_SYSCALL if PCI
	select PERF_USE_VMALLOC
	select REFCOUNT_FULL
	select RTC_LIB
	select SYS_SUPPORTS_APM_EMULATION
	# Above selects are sorted alphabetically; please add new ones
+0 −1
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ config ARM64
	select PCI_SYSCALL if PCI
	select POWER_RESET
	select POWER_SUPPLY
	select REFCOUNT_FULL
	select SPARSE_IRQ
	select SWIOTLB
	select SYSCTL_EXCEPTION_TRACE
+0 −1
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ CONFIG_OPROFILE=m
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_STATIC_KEYS_SELFTEST=y
CONFIG_REFCOUNT_FULL=y
CONFIG_LOCK_EVENT_COUNTS=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
+0 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ config X86
	select ARCH_HAS_PMEM_API		if X86_64
	select ARCH_HAS_PTE_DEVMAP		if X86_64
	select ARCH_HAS_PTE_SPECIAL
	select ARCH_HAS_REFCOUNT
	select ARCH_HAS_UACCESS_FLUSHCACHE	if X86_64
	select ARCH_HAS_UACCESS_MCSAFE		if X86_64 && X86_MCE
	select ARCH_HAS_SET_MEMORY
Loading