[GIT PULL] locking changes for v4.14

From: Ingo Molnar
Date: Mon Sep 04 2017 - 05:15:03 EST


Linus,

Please pull the latest locking-core-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-core-for-linus

# HEAD: d82fed75294229abc9d757f08a4817febae6c4f4 locking/lockdep/selftests: Fix mixed read-write ABBA tests

NOTE: this tree depends on you having merged x86-asm-for-linus first. If that
could not be merged then please disregard this pull request.

The main changes in this cycle were:

- Add 'cross-release' support to lockdep, which allows APIs like completions,
where it's not the 'owner' who releases the lock, to be tracked. It's all
activated automatically under CONFIG_PROVE_LOCKING=y.

- Clean up (restructure) the x86 atomics op implementation to be more readable,
in preparation of KASAN annotations. (Dmitry Vyukov)

- Fix static keys (Paolo Bonzini)

- Add killable versions of down_read() et al (Kirill Tkhai)

- Rework and fix jump_label locking (Marc Zyngier, Paolo Bonzini)

- Rework (and fix) tlb_flush_pending() barriers (Peter Zijlstra)

- Remove smp_mb__before_spinlock() and convert its usages, introduce
smp_mb__after_spinlock() (Peter Zijlstra)

Thanks,

Ingo

------------------>
Boqun Feng (4):
sched/wait: Remove the lockless swait_active() check in swake_up*()
locking/lockdep: Explicitly initialize wq_barrier::done::map
acpi/nfit: Fix COMPLETION_INITIALIZER_ONSTACK() abuse
sched/completion: Avoid unnecessary stack allocation for COMPLETION_INITIALIZER_ONSTACK()

Byungchul Park (15):
locking/lockdep: Refactor lookup_chain_cache()
locking/lockdep: Add a function building a chain between two classes
locking/lockdep: Change the meaning of check_prev_add()'s return value
locking/lockdep: Make check_prev_add() able to handle external stack_trace
locking/lockdep: Implement the 'crossrelease' feature
locking/lockdep: Detect and handle hist_lock ring buffer overwrite
locking/lockdep: Handle non(or multi)-acquisition of a crosslock
locking/lockdep: Make print_circular_bug() aware of crossrelease
locking/lockdep: Apply crossrelease to completions
locking/lockdep: Add 'crossrelease' feature documentation
locking/lockdep: Add a comment about crossrelease_hist_end() in lockdep_sys_exit()
locking/lockdep: Fix the rollback and overwrite detection logic in crossrelease
locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING
locking/lockdep: Reword title of LOCKDEP_CROSSRELEASE config
locking/lockdep: Rename CONFIG_LOCKDEP_COMPLETE to CONFIG_LOCKDEP_COMPLETIONS

Dmitry Vyukov (3):
locking/atomic/x86: Un-macro-ify atomic ops implementation
locking/atomic/x86: Use 's64 *' for 'old' argument of atomic64_try_cmpxchg()
kasan: Allow kasan_check_read/write() to accept pointers to volatiles

Ingo Molnar (8):
Merge branch 'WIP.locking/atomics' into locking/core
Merge branch 'linus' into locking/core, to pick up fixes
Merge branch 'linus' into locking/core, to resolve conflicts
locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS truly non-interactive
Merge branch 'x86/asm' into locking/core
Merge branch 'linus' into locking/core, to pick up fixes
locking/refcounts, x86/asm: Disable CONFIG_ARCH_HAS_REFCOUNT for the time being
Merge branch 'linus' into locking/core, to fix up conflicts

Jiri Slaby (1):
futex: Remove duplicated code and fix undefined behaviour

Kees Cook (1):
locking/refcounts, x86/asm: Implement fast refcount overflow protection

Kirill Tkhai (2):
locking/rwsem-spinlock: Add killable versions of __down_read()
locking/rwsem-xadd: Add killable versions of rwsem_down_read_failed()

Marc Zyngier (4):
jump_label: Move CPU hotplug locking
jump_label: Split out code under the hotplug lock
jump_label: Provide hotplug context variants
clocksource/arm_arch_timer: Use static_branch_enable_cpuslocked()

Nicolas Pitre (1):
futex: Allow for compiling out PI support

Paolo Bonzini (3):
jump_label: Fix concurrent static_key_enable/disable()
jump_label: Do not use unserialized static_key_enabled()
cpuset: Make nr_cpusets private

Peter Zijlstra (17):
locking/atomic: Fix atomic_set_release() for 'funny' architectures
jump_label: Add RELEASE barrier after text changes
Documentation/locking/atomic: Add documents for new atomic_t APIs
mm, locking: Rework {set,clear,mm}_tlb_flush_pending()
overlayfs, locking: Remove smp_mb__before_spinlock() usage
locking: Introduce smp_mb__after_spinlock()
locking: Remove smp_mb__before_spinlock()
locking/lockdep: Rework FS_RECLAIM annotation
locking/lockdep: Avoid creating redundant links
mm, locking: Fix up flush_tlb_pending() related merge in do_huge_pmd_numa_page()
mm, locking/barriers: Clarify tlb_flush_pending() barriers
locking/lockdep/selftests: Add mixed read-write ABBA tests
workqueue/lockdep: 'Fix' flush_work() annotation
locking/lockdep: Fix workqueue crossrelease annotation
Documentation/locking/atomic: Finish the document...
locking/lockdep: Untangle xhlock history save/restore from task independence
locking/lockdep/selftests: Fix mixed read-write ABBA tests

Prateek Sood (1):
locking/osq_lock: Fix osq_lock queue corruption

Waiman Long (1):
locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures

Ying Huang (1):
smp: Avoid using two cache lines for struct call_single_data


Documentation/atomic_bitops.txt | 66 ++
Documentation/atomic_t.txt | 242 +++++
Documentation/locking/crossrelease.txt | 874 +++++++++++++++++
Documentation/memory-barriers.txt | 101 +-
Documentation/static-keys.txt | 20 +
.../translations/ko_KR/memory-barriers.txt | 5 +-
arch/Kconfig | 12 +
arch/alpha/include/asm/futex.h | 26 +-
arch/arc/include/asm/atomic.h | 2 +
arch/arc/include/asm/futex.h | 40 +-
arch/arm/include/asm/futex.h | 26 +-
arch/arm64/include/asm/futex.h | 26 +-
arch/arm64/include/asm/spinlock.h | 11 +-
arch/frv/include/asm/futex.h | 3 +-
arch/frv/kernel/futex.c | 27 +-
arch/hexagon/include/asm/atomic.h | 2 +
arch/hexagon/include/asm/futex.h | 38 +-
arch/ia64/include/asm/futex.h | 25 +-
arch/metag/include/asm/atomic_lock1.h | 2 +
arch/microblaze/include/asm/futex.h | 38 +-
arch/mips/include/asm/futex.h | 25 +-
arch/mips/kernel/smp.c | 6 +-
arch/openrisc/include/asm/futex.h | 39 +-
arch/parisc/include/asm/atomic.h | 2 +
arch/parisc/include/asm/futex.h | 26 +-
arch/powerpc/include/asm/barrier.h | 7 -
arch/powerpc/include/asm/futex.h | 26 +-
arch/powerpc/include/asm/spinlock.h | 3 +
arch/s390/include/asm/futex.h | 23 +-
arch/sh/include/asm/futex.h | 26 +-
arch/sparc/include/asm/atomic_32.h | 2 +
arch/sparc/include/asm/futex_64.h | 26 +-
arch/tile/include/asm/atomic_32.h | 2 +
arch/tile/include/asm/futex.h | 40 +-
arch/x86/Kconfig | 2 +
arch/x86/include/asm/asm.h | 6 +
arch/x86/include/asm/atomic.h | 69 +-
arch/x86/include/asm/atomic64_32.h | 81 +-
arch/x86/include/asm/atomic64_64.h | 73 +-
arch/x86/include/asm/cmpxchg.h | 2 +-
arch/x86/include/asm/futex.h | 40 +-
arch/x86/include/asm/refcount.h | 109 +++
arch/x86/mm/extable.c | 42 +
arch/xtensa/include/asm/futex.h | 27 +-
block/blk-softirq.c | 2 +-
drivers/acpi/nfit/core.c | 2 +-
drivers/block/null_blk.c | 2 +-
drivers/clocksource/arm_arch_timer.c | 6 +-
drivers/cpuidle/coupled.c | 10 +-
drivers/gpu/drm/i915/i915_debugfs.c | 5 +-
drivers/net/ethernet/cavium/liquidio/lio_main.c | 2 +-
drivers/net/ethernet/cavium/liquidio/octeon_droq.h | 2 +-
fs/overlayfs/readdir.c | 4 +-
fs/userfaultfd.c | 25 +-
include/asm-generic/atomic64.h | 2 +
include/asm-generic/futex.h | 50 +-
include/linux/atomic.h | 3 +
include/linux/blkdev.h | 2 +-
include/linux/completion.h | 47 +-
include/linux/cpuset.h | 6 -
include/linux/futex.h | 7 +-
include/linux/irqflags.h | 24 +-
include/linux/jump_label.h | 33 +-
include/linux/kasan-checks.h | 10 +-
include/linux/kernel.h | 7 +
include/linux/lockdep.h | 165 +++-
include/linux/mm_types.h | 95 +-
include/linux/netdevice.h | 2 +-
include/linux/refcount.h | 4 +
include/linux/rwsem-spinlock.h | 1 +
include/linux/rwsem.h | 1 +
include/linux/sched.h | 12 +-
include/linux/sched/mm.h | 8 +
include/linux/smp.h | 8 +-
include/linux/spinlock.h | 41 +-
init/Kconfig | 7 +-
kernel/cgroup/cpuset.c | 7 +
kernel/exit.c | 1 +
kernel/fork.c | 4 +
kernel/futex.c | 61 ++
kernel/jump_label.c | 104 +-
kernel/locking/lockdep.c | 1008 ++++++++++++++++----
kernel/locking/lockdep_internals.h | 2 +
kernel/locking/lockdep_proc.c | 4 +
kernel/locking/lockdep_states.h | 1 -
kernel/locking/osq_lock.c | 13 +
kernel/locking/qspinlock_paravirt.h | 24 +-
kernel/locking/rtmutex_common.h | 29 +
kernel/locking/rwsem-spinlock.c | 37 +-
kernel/locking/rwsem-xadd.c | 33 +-
kernel/panic.c | 12 +
kernel/sched/completion.c | 11 +
kernel/sched/core.c | 4 +-
kernel/sched/sched.h | 2 +-
kernel/sched/swait.c | 6 -
kernel/smp.c | 32 +-
kernel/up.c | 2 +-
kernel/workqueue.c | 53 +-
lib/Kconfig.debug | 18 +
lib/locking-selftest.c | 123 ++-
mm/huge_memory.c | 12 +-
mm/kasan/kasan.c | 4 +-
mm/page_alloc.c | 49 +-
mm/slab.h | 6 +-
mm/slob.c | 6 +-
mm/vmscan.c | 13 +-
net/ipv4/udp.c | 3 +-
net/ipv6/udp.c | 3 +-
108 files changed, 3460 insertions(+), 1112 deletions(-)