linux/rust/kernel
Linus Torvalds 36808d5e98 Driver core changes for 7.2-rc1
- deferred probe:
   - Fix race where deferred probe timeout work could be permanently
     canceled by using mod_delayed_work()
   - Fix missing jiffies conversion in deferred_probe_extend_timeout()
   - Guard timeout extension with delayed_work_pending() to prevent
     premature firing
   - Use system_percpu_wq instead of the deprecated system_wq
   - Update deferred_probe_timeout documentation
 
 - device:
   - Replace direct struct device bitfield access (can_match, dma_iommu,
     dma_skip_sync, dma_ops_bypass, state_synced, dma_coherent,
     of_node_reused, offline, offline_disabled) with flag-based
     accessors using bit operations
   - Reject devices with unregistered buses
   - Delete unused DEVICE_ATTR_PREALLOC()
   - Add low-level device attribute macros with const show/store
     callbacks, allowing device attributes to reside in read-only memory
   - Move core device attributes to read-only memory
   - Constify group array pointers in driver_add_groups() /
     driver_remove_groups(), struct bus_type, and struct device_driver
 
 - device property:
   - Fix fwnode reference leak in fwnode_graph_get_endpoint_by_id()
   - Initialize all fields of fwnode_handle in fwnode_init()
   - Provide swnode_get()/swnode_put() wrappers around kobject_get/put()
   - Allow passing struct software_node_ref_args pointers directly to
     PROPERTY_ENTRY_REF()
 
 - driver_override:
   - Migrate amba, cdx, vmbus, and rpmsg to the generic driver_override
     infrastructure, fixing a UAF from unsynchronized access to
     driver_override in bus match() callbacks
   - Remove the now-unused driver_set_override()
 
 - firmware loader:
   - Fix recursive lock deadlock in device_cache_fw_images() when async
     work falls back to synchronous execution
   - Fix device reference leak in firmware_upload_register()
 
 - platform:
   - Pass KBUILD_MODNAME through the platform driver registration macro
     to create module symlinks in sysfs for built-in drivers; move
     module_kset initialization to a pure_initcall and tegra cbb
     registration to core_initcall to ensure correct ordering
   - Pass THIS_MODULE implicitly through a coresight_init_driver() macro
 
 - sysfs:
   - Upgrade OOB write detection in sysfs_kf_seq_show() from printk to
     WARN
   - Add return value clamping to sysfs_kf_read()
 
 - Rust:
   - ACPI:
     - Fix missing match data for PRP0001 by exporting
       acpi_of_match_device()
 
   - Auxiliary:
     - Replace drvdata() with dedicated registration data on
       auxiliary_device. drvdata() exposed the driver's bus device
       private data beyond the driver's own scope, creating ordering
       constraints and forcing the data to outlive all registrations
       that access it. Registration data is instead scoped structurally
       to the Registration object, making lifecycle ordering enforced
       by construction rather than convention.
 
   - Rust-native device driver lifetimes (HRT):
     - Allow Rust device drivers to carry a lifetime parameter on their
       bus device private data, tied to the device binding scope -- the
       interval during which a bus device is bound to a driver. Device
       resources like pci::Bar<'a> and IoMem<'a> can be stored directly
       in the driver's bus device private data with a lifetime bounded
       by the binding scope, so the compiler enforces at build time that
       they do not outlive the binding. This removes Devres indirection
       from every access site and eliminates try_access() failure paths
       in destructors.
 
       Bus driver traits use a Generic Associated Type (GAT)
       Data<'bound> to introduce the lifetime on the private data,
       rather than parameterizing the Driver trait itself. Auxiliary
       registration data, where the lifetime is not introduced by a
       trait callback but must be threaded through Registration, uses
       the ForLt trait (a type-level abstraction for types generic over
       a lifetime).
 
 - Misc:
   - Fix DT overlayed devices not probing by reverting the broken
     treewide overlay fix and re-running fw_devlink consumer pickup when
     an overlay is applied to a bound device
   - Use root_device_register() for faux bus root device; add sanity
     check for failed bus init
   - Fix dev_has_sync_state() data race with READ_ONCE() and move it to
     base.h
   - Avoid spurious device_links warning when removing a device while
     its supplier is unbinding
   - Switch ISA bus to dynamic root device
   - Fix suspicious RCU usage in kernfs_put()
   - Remove devcoredump exit callback
   - Constify devfreq_event_class
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCai1lNQAKCRBFlHeO1qrK
 LjX1AP4kEb6SJdvBFlG/IJcG9vyqA7+Cig8OIlx9vEX7e7GvNwEAxL2HltAlAd5Q
 cOIJOlu0uM+j1mn0JyuM9b0WJrxDLAA=
 =E5mG
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-7.2-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core updates from Danilo Krummrich:
 "Deferred probe:
   - Fix race where deferred probe timeout work could be permanently
     canceled by using mod_delayed_work()
   - Fix missing jiffies conversion in deferred_probe_extend_timeout()
   - Guard timeout extension with delayed_work_pending() to prevent
     premature firing
   - Use system_percpu_wq instead of the deprecated system_wq
   - Update deferred_probe_timeout documentation

  device:
   - Replace direct struct device bitfield access (can_match, dma_iommu,
     dma_skip_sync, dma_ops_bypass, state_synced, dma_coherent,
     of_node_reused, offline, offline_disabled) with flag-based
     accessors using bit operations
   - Reject devices with unregistered buses
   - Delete unused DEVICE_ATTR_PREALLOC()
   - Add low-level device attribute macros with const show/store
     callbacks, allowing device attributes to reside in read-only memory
   - Move core device attributes to read-only memory
   - Constify group array pointers in driver_add_groups() /
     driver_remove_groups(), struct bus_type, and struct device_driver

  device property:
   - Fix fwnode reference leak in fwnode_graph_get_endpoint_by_id()
   - Initialize all fields of fwnode_handle in fwnode_init()
   - Provide swnode_get()/swnode_put() wrappers around kobject_get/put()
   - Allow passing struct software_node_ref_args pointers directly to
     PROPERTY_ENTRY_REF()

  driver_override:
   - Migrate amba, cdx, vmbus, and rpmsg to the generic driver_override
     infrastructure, fixing a UAF from unsynchronized access to
     driver_override in bus match() callbacks
   - Remove the now-unused driver_set_override()

  firmware loader:
   - Fix recursive lock deadlock in device_cache_fw_images() when async
     work falls back to synchronous execution
   - Fix device reference leak in firmware_upload_register()

  platform:
   - Pass KBUILD_MODNAME through the platform driver registration macro
     to create module symlinks in sysfs for built-in drivers; move
     module_kset initialization to a pure_initcall and tegra cbb
     registration to core_initcall to ensure correct ordering
   - Pass THIS_MODULE implicitly through a coresight_init_driver() macro

  sysfs:
   - Upgrade OOB write detection in sysfs_kf_seq_show() from printk to
     WARN
   - Add return value clamping to sysfs_kf_read()

  Rust:
   - ACPI:

     Fix missing match data for PRP0001 by exporting
     acpi_of_match_device()

   - Auxiliary:

     Replace drvdata() with dedicated registration data on
     auxiliary_device. drvdata() exposed the driver's bus device private
     data beyond the driver's own scope, creating ordering constraints
     and forcing the data to outlive all registrations that access it.
     Registration data is instead scoped structurally to the
     Registration object, making lifecycle ordering enforced by
     construction rather than convention.

   - Rust-native device driver lifetimes (HRT):

     Allow Rust device drivers to carry a lifetime parameter on their
     bus device private data, tied to the device binding scope -- the
     interval during which a bus device is bound to a driver. Device
     resources like pci::Bar<'a> and IoMem<'a> can be stored directly in
     the driver's bus device private data with a lifetime bounded by the
     binding scope, so the compiler enforces at build time that they do
     not outlive the binding. This removes Devres indirection from every
     access site and eliminates try_access() failure paths in
     destructors.

     Bus driver traits use a Generic Associated Type (GAT) Data<'bound>
     to introduce the lifetime on the private data, rather than
     parameterizing the Driver trait itself. Auxiliary registration
     data, where the lifetime is not introduced by a trait callback but
     must be threaded through Registration, uses the ForLt trait (a
     type-level abstraction for types generic over a lifetime).

  Misc:
   - Fix DT overlayed devices not probing by reverting the broken
     treewide overlay fix and re-running fw_devlink consumer pickup when
     an overlay is applied to a bound device
   - Use root_device_register() for faux bus root device; add sanity
     check for failed bus init
   - Fix dev_has_sync_state() data race with READ_ONCE() and move it to
     base.h
   - Avoid spurious device_links warning when removing a device while
     its supplier is unbinding
   - Switch ISA bus to dynamic root device
   - Fix suspicious RCU usage in kernfs_put()
   - Remove devcoredump exit callback
   - Constify devfreq_event_class"

* tag 'driver-core-7.2-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/driver-core/driver-core: (81 commits)
  software node: allow passing reference args to PROPERTY_ENTRY_REF()
  driver core: platform: set mod_name in driver registration
  coresight: pass THIS_MODULE implicitly through a macro
  kernel: param: initialize module_kset in a pure_initcall
  soc/tegra: cbb: Move driver registration from pure_initcall to core_initcall
  firmware_loader: Fix recursive lock in device_cache_fw_images()
  driver core: Use system_percpu_wq instead of system_wq
  driver core: remove driver_set_override()
  rpmsg: use generic driver_override infrastructure
  Drivers: hv: vmbus: use generic driver_override infrastructure
  cdx: use generic driver_override infrastructure
  amba: use generic driver_override infrastructure
  rust: devres: add 'static bound to Devres<T>
  samples: rust: rust_driver_auxiliary: showcase lifetime-bound registration data
  rust: auxiliary: generalize Registration over ForLt
  rust: types: add `ForLt` trait for higher-ranked lifetime support
  gpu: nova-core: separate driver type from driver data
  samples: rust: rust_driver_pci: use HRT lifetime for Bar
  rust: io: make IoMem and ExclusiveIoMem lifetime-parameterized
  rust: pci: make Bar lifetime-parameterized
  ...
2026-06-15 12:41:17 +05:30
..
alloc Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
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 unsound initialization in drm::Device::new 2026-05-03 14:04:57 +02:00
fs rust: fs: add file::Offset type alias 2025-11-05 00:05:38 +01:00
gpu rust: gpu: Add GPU buddy allocator bindings 2026-03-23 21:41:47 +01:00
interop rust: interop: Add list module for C linked list interface 2026-03-23 20:29:28 +01:00
io Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
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: rename zap_page_range_single() to zap_vma_range() 2026-04-05 13:53:15 -07:00
net rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
num rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
pci rust: pci: make Bar lifetime-parameterized 2026-05-27 16:24:23 +02:00
ptr rust: ptr: remove implicit index projection syntax 2026-06-05 10:16:47 +02:00
str rust: str: add radix prefixed integer parsing functions 2025-11-03 14:40:45 +01:00
sync rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
time hrtimer: add usage examples to documentation 2026-03-23 08:31:00 +01:00
types rust: types: add ForLt trait for higher-ranked lifetime support 2026-05-27 16:24:59 +02:00
.gitignore
acpi.rs rust: acpi: replace core::mem::zeroed with pin_init::zeroed 2025-10-27 20:27:05 +01:00
alloc.rs rust: alloc: cleanup imports and use "kernel vertical" style 2026-05-20 17:34:17 +02:00
auxiliary.rs rust: auxiliary: generalize Registration over ForLt 2026-05-27 16:27:28 +02:00
bitfield.rs rust: bitfield: Add KUnit tests for bitfield 2026-06-09 04:13:07 +02:00
bitmap.rs rust: tests: add Kconfig for KUnit test 2026-06-08 02:30:33 +02: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: make build_assert module the home of related macros 2026-06-10 09:07:13 +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
cpufreq.rs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
cpumask.rs rust: cpumask: rename methods of Cpumask for clarity and consistency 2026-01-27 11:21:23 +05:30
cred.rs
debugfs.rs rust: debugfs: Use kernel Atomic type in docs example 2026-01-19 15:02:46 +01:00
device_id.rs rust: device_id: replace incorrect word in safety documentation 2025-12-29 14:09:18 +01:00
device.rs rust: device: make Core and CoreInternal lifetime-parameterized 2026-05-27 16:22:42 +02:00
devres.rs rust: devres: add 'static bound to Devres<T> 2026-05-29 01:06:10 +02:00
dma.rs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
driver.rs Merge patch series "rust: device: Higher-Ranked Lifetime Types for device drivers" 2026-05-29 00:38:54 +02:00
error.rs rust: error: replace match + panic in const context with const expect 2026-05-28 11:08:27 +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: use vertical import style 2026-05-20 00:47:24 +02:00
fs.rs
generated_arch_reachable_asm.rs.S
generated_arch_static_branch_asm.rs.S
generated_arch_warn_asm.rs.S
gpu.rs rust: gpu: Add GPU buddy allocator bindings 2026-03-23 21:41:47 +01:00
i2c.rs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
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: inline some init methods 2026-06-09 04:13:21 +02:00
interop.rs rust: interop: Add list module for C linked list interface 2026-03-23 20:29:28 +01:00
io.rs rust: io: introduce write_reg and LocatedRegister 2026-03-17 20:04:11 +01:00
ioctl.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
iov.rs
irq.rs
jump_label.rs
Kconfig.test rust: bitfield: Add KUnit tests for bitfield 2026-06-09 04:13:07 +02:00
kunit.rs rust: tests: add Kconfig for KUnit test 2026-06-08 02:30:33 +02:00
lib.rs rust: extract bitfield! macro from register! 2026-06-09 04:12:51 +02: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
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
opp.rs opp: rust: mark OPP methods as inline 2026-05-25 09:40:52 +05:30
page.rs rust: page: use the "kernel vertical" imports style 2026-06-10 09:07:12 +02:00
pci.rs rust: pci: make Driver trait lifetime-parameterized 2026-05-27 16:23:10 +02:00
pid_namespace.rs
platform.rs driver core: platform: set mod_name in driver registration 2026-06-08 23:28:24 +02:00
prelude.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +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
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: str: clean unused import for Rust >= 1.98 2026-06-10 09:07:13 +02:00
sync.rs rust: sync: Replace kernel::c_str! with C-Strings 2026-01-28 09:25:44 +01:00
task.rs Char/Misc/IIO/and others driver updates for 7.1-rc1 2026-04-24 13:23:50 -07: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: add ForLt trait for higher-ranked lifetime support 2026-05-27 16:24:59 +02:00
uaccess.rs Char/Misc/IIO/and others driver updates for 7.1-rc1 2026-04-24 13:23:50 -07:00
usb.rs rust: usb: make Driver trait lifetime-parameterized 2026-05-27 16:23:51 +02:00
workqueue.rs rust: workqueue: use new sync::aref path for imports 2026-03-26 15:45:34 +00:00
xarray.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00