linux/rust/kernel
Linus Torvalds 7393febcb1 Locking updates for v7.1:
Mutexes:
 
  - Add killable flavor to guard definitions (Davidlohr Bueso)
  - Remove the list_head from struct mutex (Matthew Wilcox)
  - Rename mutex_init_lockep() (Davidlohr Bueso)
 
 rwsems:
 
  - Remove the list_head from struct rw_semaphore and
    replace it with a single pointer (Matthew Wilcox)
  - Fix logic error in rwsem_del_waiter() (Andrei Vagin)
 
 Semaphores:
 
  - Remove the list_head from struct semaphore (Matthew Wilcox)
 
 Jump labels:
 
  - Use ATOMIC_INIT() for initialization of .enabled (Thomas Weißschuh)
  - Remove workaround for old compilers in initializations
    (Thomas Weißschuh)
 
 Lock context analysis changes and improvements:
 
  - Add context analysis for rwsems (Peter Zijlstra)
  - Fix rwlock and spinlock lock context annotations (Bart Van Assche)
  - Fix rwlock support in <linux/spinlock_up.h> (Bart Van Assche)
  - Add lock context annotations in the spinlock implementation
    (Bart Van Assche)
  - signal: Fix the lock_task_sighand() annotation (Bart Van Assche)
  - ww-mutex: Fix the ww_acquire_ctx function annotations
    (Bart Van Assche)
  - Add lock context support in do_raw_{read,write}_trylock()
    (Bart Van Assche)
  - arm64, compiler-context-analysis: Permit alias analysis through
    __READ_ONCE() with CONFIG_LTO=y (Marco Elver)
  - Add __cond_releases() (Peter Zijlstra)
  - Add context analysis for mutexes (Peter Zijlstra)
  - Add context analysis for rtmutexes (Peter Zijlstra)
  - Convert futexes to compiler context analysis (Peter Zijlstra)
 
 Rust integration updates:
 
  - Add atomic fetch_sub() implementation (Andreas Hindborg)
  - Refactor various rust_helper_ methods for expansion (Boqun Feng)
  - Add Atomic<*{mut,const} T> support (Boqun Feng)
  - Add atomic operation helpers over raw pointers (Boqun Feng)
  - Add performance-optimal Flag type for atomic booleans, to avoid
    slow byte-sized RMWs on architectures that don't support them.
    (FUJITA Tomonori)
  - Misc cleanups and fixes (Andreas Hindborg, Boqun Feng,
    FUJITA Tomonori)
 
 LTO support updates:
 
  - arm64: Optimize __READ_ONCE() with CONFIG_LTO=y (Marco Elver)
  - compiler: Simplify generic RELOC_HIDE() (Marco Elver)
 
 Miscellaneous fixes and cleanups by Peter Zijlstra, Randy Dunlap,
 Thomas Weißschuh, Davidlohr Bueso and Mikhail Gavrilov.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmncnGERHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1ig7Q//a3UgHjUe96/zuJIv/X1lt5MU0GHP/m/n
 Rf6c39P0VWV6iupJtZ6gPmtQBQDyqWsnfE9S6PFDW4P/Njn0CGEBhk5bcYiN7dc5
 pN0hfM67rY1Ids2FJo5JVIxw2pNZpZHU4v3dJC84xH1cPwmccHxt3XW67iQnJCY9
 6m7RJ3nUfmNC1qLGKtAFQp3N91hK+BYxqZQ1Wn6a0lRWfmYY7WDs8qrr5N6Ezn7W
 53ZNXXbXUC09iOO/slOZmFD5tDrp5Z1nPYTeOdFnWYC5SoTvkfauTqmfZRN5sFad
 8vRxXHuCsdBthNF+ljobBUhZx9QL4UJMGOJTFVp9dZSj13vI7UNlbfAtwMKM8lsR
 L+v+GSsGdQWwrhzaiz53k6ZuUUDECltjwKFFUBy9RPFMtKkpKsgjW+X6I+SFeTQW
 QAPzaA/fEK45bvSPUcjn09kKKC1EVIjHQ6NvByoVjPABz92PpJgOR0si2PW5F314
 7sKzk4Ra5x8NGDSEiC9uSwB7mIv56/lUq5zuVoz3CB2rehqIpPdeieE8TaXvcmdK
 8otsWYcUXDcj/d6en9XBzb0t3LpQ1TumcOGw3xUJhrSoB4DvmWgW788SbGIKklR9
 KFQLU2USlm4u8JHEFXOAeaDhWME+eCqP5FCq3YTqxLksiA+oYx3Xui1R+5L4yjRs
 bVbp+BIs3N4=
 =aw95
 -----END PGP SIGNATURE-----

Merge tag 'locking-core-2026-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking updates from Ingo Molnar:
 "Mutexes:

   - Add killable flavor to guard definitions (Davidlohr Bueso)

   - Remove the list_head from struct mutex (Matthew Wilcox)

   - Rename mutex_init_lockep() (Davidlohr Bueso)

  rwsems:

   - Remove the list_head from struct rw_semaphore and
     replace it with a single pointer (Matthew Wilcox)

   - Fix logic error in rwsem_del_waiter() (Andrei Vagin)

  Semaphores:

   - Remove the list_head from struct semaphore (Matthew Wilcox)

  Jump labels:

   - Use ATOMIC_INIT() for initialization of .enabled (Thomas Weißschuh)

   - Remove workaround for old compilers in initializations
     (Thomas Weißschuh)

  Lock context analysis changes and improvements:

   - Add context analysis for rwsems (Peter Zijlstra)

   - Fix rwlock and spinlock lock context annotations (Bart Van Assche)

   - Fix rwlock support in <linux/spinlock_up.h> (Bart Van Assche)

   - Add lock context annotations in the spinlock implementation
     (Bart Van Assche)

   - signal: Fix the lock_task_sighand() annotation (Bart Van Assche)

   - ww-mutex: Fix the ww_acquire_ctx function annotations
     (Bart Van Assche)

   - Add lock context support in do_raw_{read,write}_trylock()
     (Bart Van Assche)

   - arm64, compiler-context-analysis: Permit alias analysis through
     __READ_ONCE() with CONFIG_LTO=y (Marco Elver)

   - Add __cond_releases() (Peter Zijlstra)

   - Add context analysis for mutexes (Peter Zijlstra)

   - Add context analysis for rtmutexes (Peter Zijlstra)

   - Convert futexes to compiler context analysis (Peter Zijlstra)

  Rust integration updates:

   - Add atomic fetch_sub() implementation (Andreas Hindborg)

   - Refactor various rust_helper_ methods for expansion (Boqun Feng)

   - Add Atomic<*{mut,const} T> support (Boqun Feng)

   - Add atomic operation helpers over raw pointers (Boqun Feng)

   - Add performance-optimal Flag type for atomic booleans, to avoid
     slow byte-sized RMWs on architectures that don't support them.
     (FUJITA Tomonori)

   - Misc cleanups and fixes (Andreas Hindborg, Boqun Feng, FUJITA
     Tomonori)

  LTO support updates:

   - arm64: Optimize __READ_ONCE() with CONFIG_LTO=y (Marco Elver)

   - compiler: Simplify generic RELOC_HIDE() (Marco Elver)

  Miscellaneous fixes and cleanups by Peter Zijlstra, Randy Dunlap,
  Thomas Weißschuh, Davidlohr Bueso and Mikhail Gavrilov"

* tag 'locking-core-2026-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
  compiler: Simplify generic RELOC_HIDE()
  locking: Add lock context annotations in the spinlock implementation
  locking: Add lock context support in do_raw_{read,write}_trylock()
  locking: Fix rwlock support in <linux/spinlock_up.h>
  lockdep: Raise default stack trace limits when KASAN is enabled
  cleanup: Optimize guards
  jump_label: remove workaround for old compilers in initializations
  jump_label: use ATOMIC_INIT() for initialization of .enabled
  futex: Convert to compiler context analysis
  locking/rwsem: Fix logic error in rwsem_del_waiter()
  locking/rwsem: Add context analysis
  locking/rtmutex: Add context analysis
  locking/mutex: Add context analysis
  compiler-context-analysys: Add __cond_releases()
  locking/mutex: Remove the list_head from struct mutex
  locking/semaphore: Remove the list_head from struct semaphore
  locking/rwsem: Remove the list_head from struct rw_semaphore
  rust: atomic: Update a safety comment in impl of `fetch_add()`
  rust: sync: atomic: Update documentation for `fetch_add()`
  rust: sync: atomic: Add fetch_sub()
  ...
2026-04-14 12:36:25 -07:00
..
alloc rust: alloc: simplify with `NonNull::add()` now that it is stable 2026-04-07 10:00:24 +02:00
block rust: block: update `const_refs_to_static` MSRV TODO comment 2026-04-07 10:00:24 +02:00
debugfs Driver core changes for 7.0-rc1 2026-02-11 17:43:59 -08:00
device rust: device: replace `kernel::c_str!` with C-Strings 2025-12-22 17:30:24 +01:00
drm rust/drm: Fix Registration::{new,new_foreign_owned}() docs 2026-01-23 14:18:07 -05:00
fs rust: fs: add file::Offset type alias 2025-11-05 00:05:38 +01:00
io rust: io: introduce `write_reg` and `LocatedRegister` 2026-03-17 20:04:11 +01:00
iommu rust: iommu: fix `srctree` link warning 2026-01-22 09:19:30 +01:00
irq rust: irq: move 'static bounds to traits 2026-03-03 20:33:26 +01:00
list Locking updates for v7.1: 2026-04-14 12:36:25 -07:00
mm mm: introduce VMA flags bitmap type 2025-11-29 10:41:09 -08:00
net rust: net: replace `kernel::c_str!` with C-Strings 2026-01-05 16:32:39 -08:00
num Driver core changes for 7.1-rc1 2026-04-13 19:03:11 -07:00
pci rust: pci: io: remove overloaded Io methods of ConfigSpace 2026-03-17 20:02:09 +01:00
ptr rust: ptr: add projection infrastructure 2026-03-07 23:06:17 +01:00
str rust: str: add radix prefixed integer parsing functions 2025-11-03 14:40:45 +01:00
sync Locking updates for v7.1: 2026-04-14 12:36:25 -07:00
time hrtimer: add usage examples to documentation 2026-03-23 08:31:00 +01:00
.gitignore
acpi.rs rust: acpi: replace `core::mem::zeroed` with `pin_init::zeroed` 2025-10-27 20:27:05 +01:00
alloc.rs Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
auxiliary.rs Linux 6.19-rc7 2026-01-26 13:23:52 +01:00
bitmap.rs rust: bitmap: add BitmapVec::new_inline() 2025-11-26 11:25:35 -05:00
bits.rs rust: bits: always inline functions using build_assert with arguments 2026-01-18 20:40:11 +01:00
block.rs
bug.rs rust: bug: Support DEBUG_BUGVERBOSE_DETAILED option 2026-01-30 05:18:17 +01:00
build_assert.rs rust: rework `build_assert!` documentation 2026-03-30 02:03:52 +02:00
clk.rs rust: clk: implement Send and Sync 2026-04-03 11:57:35 +02:00
configfs.rs rust: configfs: replace `kernel::c_str!` with C-Strings 2026-01-15 09:26:49 +01:00
cpu.rs rust: kernel: cpu: mark `CpuId::current()` inline 2025-09-14 23:58:45 +02:00
cpufreq.rs cpufreq: Pass the policy to cpufreq_driver->adjust_perf() 2026-04-02 11:30:24 -05:00
cpumask.rs rust: cpumask: rename methods of Cpumask for clarity and consistency 2026-01-27 11:21:23 +05:30
cred.rs Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
debugfs.rs rust: debugfs: Use kernel Atomic type in docs example 2026-01-19 15:02:46 +01:00
device.rs Linux 6.19-rc7 2026-01-26 13:23:52 +01:00
device_id.rs rust: device_id: replace incorrect word in safety documentation 2025-12-29 14:09:18 +01:00
devres.rs rust: devres: embed struct devres_node directly 2026-03-18 00:47:14 +01:00
dma.rs rust: dma: use pointer projection infra for `dma_{read,write}` macro 2026-03-07 23:06:20 +01:00
driver.rs Linux 6.19-rc7 2026-01-26 13:23:52 +01:00
error.rs rust: error: clarify that `from_err_ptr` can return `Ok(NULL)` 2026-04-03 11:56:56 +02:00
faux.rs rust: faux: use "kernel vertical" style for imports 2026-01-07 19:56:00 +01:00
firmware.rs rust: firmware: replace `kernel::c_str!` with C-Strings 2025-11-17 00:53:47 +01:00
fmt.rs rust: fmt: Fix grammar in Adapter description 2026-01-04 23:51:35 +01:00
fs.rs
generated_arch_reachable_asm.rs.S
generated_arch_static_branch_asm.rs.S
generated_arch_warn_asm.rs.S
i2c.rs rust: i2c: Update ARef and AlwaysRefCounted imports to use sync::aref 2026-03-15 20:30:29 +01:00
id_pool.rs rust: id_pool: do not immediately acquire new ids 2025-12-02 14:17:09 -05:00
impl_flags.rs rust: add `impl_flags!` macro for defining common bitflag operations 2026-02-02 08:09:11 +01:00
init.rs rust: init: use `#[default_error(err)]` for the initializer macros 2026-01-17 10:51:42 +01:00
io.rs rust: io: introduce `write_reg` and `LocatedRegister` 2026-03-17 20:04:11 +01:00
ioctl.rs
iov.rs
irq.rs
jump_label.rs
kunit.rs rust: kunit: fix warning when !CONFIG_PRINTK 2026-03-02 10:01:15 -07:00
lib.rs Driver core changes for 7.1-rc1 2026-04-13 19:03:11 -07:00
list.rs rust: list: hide macros from top-level kernel doc 2026-03-27 12:15:47 +01:00
maple_tree.rs rust: maple_tree: rcu_read_lock() in destructor to silence lockdep 2025-12-23 11:23:15 -08:00
miscdevice.rs rust: redefine `bindings::compat_ptr_ioctl` in Rust 2026-01-16 14:54:11 +01:00
mm.rs rust: mm: update ARef and AlwaysRefCounted imports from sync::aref 2025-09-13 16:55:15 -07:00
module_param.rs Modules changes for v6.19-rc1 2025-12-06 08:27:07 -08:00
net.rs
num.rs rust: num: add Bounded integer wrapping type 2025-11-19 00:22:24 +01:00
of.rs rust: of: use `core::ffi::CStr` method names 2025-09-16 09:26:59 +02:00
opp.rs Rust changes for v6.19 2025-12-03 14:16:49 -08:00
page.rs rust: Return Option from page_align and ensure no usize overflow 2025-12-29 15:32:53 +01:00
pci.rs rust: pci: re-export ConfigSpace 2026-02-01 22:18:24 +01:00
pid_namespace.rs
platform.rs Linux 6.19-rc7 2026-01-26 13:23:52 +01:00
prelude.rs rust: remove `RUSTC_HAS_SLICE_AS_FLATTENED` and simplify code 2026-04-07 10:00:23 +02:00
print.rs rust: print: Add pr_*_once macros 2026-01-30 05:47:05 +01:00
processor.rs
ptr.rs Rust timekeeping changes for v7.1 2026-04-08 10:44:11 +02:00
pwm.rs rust: pwm: Simplify to_result call sites and unsafe blocks 2026-01-20 18:49:58 +01:00
rbtree.rs Rust changes for v6.20 / v7.0 2026-02-10 11:53:01 -08:00
regulator.rs rust: regulator: do not assume that regulator_get() returns non-null 2026-03-24 13:08:21 +00:00
revocable.rs
safety.rs rust: safety: introduce `unsafe_precondition_assert!` macro 2026-02-02 08:10:48 +01:00
scatterlist.rs rust: scatterlist: Update ARef imports to use sync::aref 2025-12-18 17:25:45 +01:00
security.rs rust_binder: add Rust Binder driver 2025-09-19 09:40:46 +02:00
seq_file.rs rust: seq_file: replace `kernel::c_str!` with C-Strings 2026-01-29 15:32:40 +01:00
sizes.rs rust: sizes: add SizeConstants trait for device address space constants 2026-04-07 12:57:50 +02:00
soc.rs rust: Add soc_device support 2025-12-28 12:43:56 +01:00
std_vendor.rs
str.rs Rust timekeeping changes for v7.1 2026-04-08 10:44:11 +02:00
sync.rs rust: sync: Replace `kernel::c_str!` with C-Strings 2026-01-28 09:25:44 +01:00
task.rs rust: task: use `as_char_ptr` instead of `as_ptr().cast()` 2026-03-10 23:52:21 +01:00
time.rs rust: time: make ClockSource unsafe trait 2026-03-23 08:29:48 +01:00
tracepoint.rs
transmute.rs rust: transmute: simplify code with Rust 1.80.0 `split_at_*checked()` 2026-04-07 10:00:24 +02:00
types.rs rust: types: remove temporary re-exports of ARef and AlwaysRefCounted 2026-03-15 20:30:29 +01:00
uaccess.rs rust: uaccess: add UserSliceWriter::write_slice_file() 2025-11-05 00:35:37 +01:00
usb.rs rust: usb: Update AlwaysRefCounted imports to use sync::aref 2026-03-15 20:30:29 +01:00
workqueue.rs rust: pin-init: add pin projections to `#[pin_data]` 2025-09-11 23:26:20 +02:00
xarray.rs rust: kernel: mark as `#[inline]` all `From::from()`s for `Error` 2026-03-27 12:49:00 +01:00