linux/rust/kernel/sync
Linus Torvalds 764e77d868 Locking updates for v7.2:
Futex updates:
 
  - Optimize futex hash bucket access patterns (Peter Zijlstra)
 
  - Large series to address the robust futex unlock race for real,
    by Thomas Gleixner:
 
     "The robust futex unlock mechanism is racy in respect
      to the clearing of the robust_list_head::list_op_pending
      pointer because unlock and clearing the pointer are not
      atomic. The race window is between the unlock and clearing the
      pending op pointer. If the task is forced to exit in this
      window, exit will access a potentially invalid pending op
      pointer when cleaning up the robust list. That happens if
      another task manages to unmap the object containing the lock
      before the cleanup, which results in an UAF. In the worst case
      this UAF can lead to memory corruption when unrelated content
      has been mapped to the same address by the time the access
      happens.
 
      User space can't solve this problem without help from the kernel.
      This series provides the kernel side infrastructure to help it
      along:
 
       1) Combined unlock, pointer clearing, wake-up for the
          contended case
 
       2) VDSO based unlock and pointer clearing helpers with a
          fix-up function in the kernel when user space was interrupted
          within the critical section.
 
     ... with help by André Almeida:
 
      - Add a note about robust list race condition (André Almeida)
      - Add self-tests for robust release operations (André Almeida)
 
 Context analysis updates:
 
  - Implement context analysis for 'struct rt_mutex'.
    (Bart Van Assche)
  - Bump required Clang version to 23 (Marco Elver)
 
 Guard infrastructure updates:
 
  - Series to remove NULL check from unconditional guards
    (Dmitry Ilvokhin)
 
 Lockdep updates:
 
  - Restore self-test migrate_disable() and sched_rt_mutex
    state on PREEMPT_RT (Karl Mehltretter)
 
 Membarriers updates:
 
  - Use per-CPU mutexes for targeted commands (Aniket Gattani)
  - Modernize membarrier_global_expedited with cleanup guards
    (Aniket Gattani)
  - Add rseq stress test for CFS throttle interactions (Aniket Gattani)
 
 percpu-rwsems updates:
 
  - Extract __percpu_up_read() to optimize inlining overhead
    (Dmitry Ilvokhin)
 
 Seqlocks updates:
 
  - Allow UBSAN_ALIGNMENT to fail optimizing (Heiko Carstens)
 
 Lock tracing:
 
  - Add contended_release tracepoint to sleepable locks
    such as mutexes, percpu-rwsems, rtmutexes, rwsems
    and semaphores. (Dmitry Ilvokhin)
 
 MAINTAINERS updates:
 
  - MAINTAINERS: Add RUST [SYNC] entry (Boqun Feng)
 
 Misc updates and fixes by Randy Dunlap, YE WEI-HONG,
 Fabricio Parra, Dmitry Ilvokhin and Peter Zijlstra.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmoujYURHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1jQFw//SNo1zxqGJuVudIWTpk5hUbWO6La9dc2C
 2RW4lMNM551AaGFK6V01u1hD7dBZkWBqER+f3+CMtkqi734pAevTfkYJOitnGOOX
 YZicGqTufV+Q+hcEiHAY3ADF6384SiyvAGNHL5wk3eLqC+Raug0f0cNt4opzFvr7
 I6vRcW02JQMRKBe50+Aoa5zg7ymmbqaH0KkiPvfY5UFl38MKABhkY1izA9o+/Q/S
 1/joNo5iQ3Ciqf6tn76vTg4Xiz7napikHB5LfWxorgmQo7FEdUY54GGMaa8aBOPi
 EfgIV9p+qOJhmWn4H1HgVSYlnUn3tJICYnVVCruXWXD+pzITS+F5qSQ3p25F3VIt
 c3jh3NaVW71pR/Sbj4zGvf8QguJL340RGJs/e5qcj91pjOSCH5B75ruNgFgYK9Lv
 iRi6dnHBBHxaN57YHTOrhphvjyfc0L7i6cGyJgHJWwyi0y3XBYlNuP/VLPuwquKl
 anK86hlkl9W4kO0OOukD1xhfuRv7066EdJc3iWWlp9yz+yI5xDGuV4FhvEHRoy38
 R9VY2bwzgZrW/NkodHIb95+W30qEmeq2z1W4wiBu+mf1JnyW2g/n8jKkc6AINMpI
 VGcom3MdinxjUtmybZT9Fx0SzBYCc+aRPkh7lPV7eXdZAWufxUO/6eVKiHBQ2HUO
 RFDkOZU0r+c=
 =gpHw
 -----END PGP SIGNATURE-----

Merge tag 'locking-core-2026-06-14' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip

Pull locking updates from Ingo Molnar:
 "Futex updates:

   - Optimize futex hash bucket access patterns (Peter Zijlstra)

   - Large series to address the robust futex unlock race for real, by
     Thomas Gleixner:

      "The robust futex unlock mechanism is racy in respect to the
       clearing of the robust_list_head::list_op_pending pointer because
       unlock and clearing the pointer are not atomic.

       The race window is between the unlock and clearing the pending op
       pointer. If the task is forced to exit in this window, exit will
       access a potentially invalid pending op pointer when cleaning up
       the robust list.

       That happens if another task manages to unmap the object
       containing the lock before the cleanup, which results in an UAF.

       In the worst case this UAF can lead to memory corruption when
       unrelated content has been mapped to the same address by the time
       the access happens.

       User space can't solve this problem without help from the kernel.
       This series provides the kernel side infrastructure to help it
       along:

        1) Combined unlock, pointer clearing, wake-up for the
           contended case

        2) VDSO based unlock and pointer clearing helpers with a
           fix-up function in the kernel when user space was interrupted
           within the critical section.

      ... with help by André Almeida:

        - Add a note about robust list race condition (André Almeida)
        - Add self-tests for robust release operations (André Almeida)

  Context analysis updates:

   - Implement context analysis for 'struct rt_mutex'. (Bart Van Assche)
   - Bump required Clang version to 23 (Marco Elver)

  Guard infrastructure updates:

   - Series to remove NULL check from unconditional guards (Dmitry
     Ilvokhin)

  Lockdep updates:

   - Restore self-test migrate_disable() and sched_rt_mutex state on
     PREEMPT_RT (Karl Mehltretter)

  Membarriers updates:

   - Use per-CPU mutexes for targeted commands (Aniket Gattani)
   - Modernize membarrier_global_expedited with cleanup guards (Aniket
     Gattani)
   - Add rseq stress test for CFS throttle interactions (Aniket Gattani)

  percpu-rwsems updates:

   - Extract __percpu_up_read() to optimize inlining overhead (Dmitry
     Ilvokhin)

  Seqlocks updates:

   - Allow UBSAN_ALIGNMENT to fail optimizing (Heiko Carstens)

  Lock tracing:

   - Add contended_release tracepoint to sleepable locks such as
     mutexes, percpu-rwsems, rtmutexes, rwsems and semaphores (Dmitry
     Ilvokhin)

  MAINTAINERS updates:

   - MAINTAINERS: Add RUST [SYNC] entry (Boqun Feng)

  Misc updates and fixes by Randy Dunlap, YE WEI-HONG, Fabricio Parra,
  Dmitry Ilvokhin and Peter Zijlstra"

* tag 'locking-core-2026-06-14' of gitolite.kernel.org:pub/scm/linux/kernel/git/tip/tip: (36 commits)
  locking: Add contended_release tracepoint to sleepable locks
  locking/percpu-rwsem: Extract __percpu_up_read()
  tracing/lock: Remove unnecessary linux/sched.h include
  futex: Optimize futex hash bucket access patterns
  rust: sync: completion: Mark inline complete_all and wait_for_completion
  MAINTAINERS: Add RUST [SYNC] entry
  cleanup: Specify nonnull argument index
  selftests: futex: Add tests for robust release operations
  Documentation: futex: Add a note about robust list race condition
  x86/vdso: Implement __vdso_futex_robust_try_unlock()
  x86/vdso: Prepare for robust futex unlock support
  futex: Provide infrastructure to plug the non contended robust futex unlock race
  futex: Add robust futex unlock IP range
  futex: Add support for unlocking robust futexes
  futex: Cleanup UAPI defines
  x86: Select ARCH_MEMORY_ORDER_TSO
  uaccess: Provide unsafe_atomic_store_release_user()
  futex: Provide UABI defines for robust list entry modifiers
  futex: Move futex related mm_struct data into a struct
  futex: Make futex_mm_init() void
  ...
2026-06-15 14:21:14 +05:30
..
arc rust: provide proper code documentation titles 2024-10-07 21:39:57 +02:00
atomic rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
lock rust: sync: add #[must_use] to GlobalGuard and GlobalLock::try_lock 2026-06-04 22:22:33 +02:00
arc.rs rust: sync: add UniqueArc::as_ptr 2026-06-09 04:13:21 +02:00
aref.rs rust: aref: use the "kernel vertical" imports style 2026-06-10 09:07:13 +02:00
atomic.rs rust: sync: atomic: Update documentation for fetch_add() 2026-03-08 11:06:51 +01:00
barrier.rs rust: sync: Add memory barriers 2025-09-15 09:38:34 +02:00
completion.rs rust: sync: completion: Mark inline complete_all and wait_for_completion 2026-06-09 10:28:06 +02:00
condvar.rs Rust changes for v6.19 2025-12-03 14:16:49 -08:00
lock.rs rust: sync: Inline various lock related methods 2026-01-10 10:53:46 +08:00
locked_by.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
poll.rs Scheduler updates for v6.17: 2025-07-29 17:42:52 -07:00
rcu.rs rust: sync: rcu: Mark Guard methods as inline 2025-05-16 09:00:54 -04:00
refcount.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
set_once.rs rust: sync: set_once: Implement Send and Sync 2026-01-09 19:01:40 +08:00