linux/rust/kernel
Linus Torvalds 7be4bc52fd Driver core changes for 7.4-rc1
- core:
 
   - Add TAINT_FORCED_BIND to taint the kernel and driver module before manual
     sysfs bind/unbind operations; make add_taint_module() available to
     driver core and update taint decoding tools and documentation
 
   - Constify device_show/store_*() attribute parameters and adapt x86 MCE and
     perf users to prepare for const dev_ext_attribute instances
 
   - Fix UAF in NUMA access node registration failure handling by dropping
     the device reference with put_device() instead of directly freeing the node
 
 - debugfs:
 
   - Make debugfs_create_str() read-only to eliminate double-free races between
     concurrent writers; reject writable modes; convert interconnect and
     SoundWire users to local file operations with mutex-protected strings
 
 - kobject:
 
   - Fix out-of-bounds access in kobject_action_type() when parsing action
     strings containing embedded NUL bytes
 
   - Fix the kobject_set_name() reference in kset_register() kernel-doc
 
 - Rust:
 
   - DMA:
 
     - Tie Coherent, CoherentBox and CoherentHandle to the device's bound
       lifetime to prevent retaining DMA allocations beyond driver unbind;
       propagate the lifetime through nova-core and the DMA sample driver
 
   - I/O:
 
     - Require explicit base types for registers and replace relative registers
       with typed subregion projections; reimplement register!() as a proc
       macro, support registers using existing types without inline bitfields,
       and convert nova-core, Tyr and the PCI sample; add AsRepr/AsReprMut and
       transmute helpers with deferred size checks for representation
       conversions
 
     - Wrap ResourceSize in a transparent newtype with explicit conversions,
       including checked conversion to usize
 
   - PCI:
 
     - Add typed PCIe extended capability lookup and SR-IOV accessors for the
       First VF Offset and decoded VF BAR addresses and widths, keeping raw
       SR-IOV registers private to preserve PCI core ownership of their state
 
   - scatterlist:
 
     - Honor the device's maximum segment size as well as the DMA mapping limit
       when constructing SG tables
 
     - Return u32 from SGEntry::dma_len() to match the C segment length type
 
   - misc:
 
     - Validate auxiliary DeviceId name length explicitly to improve
       compile-time diagnostics for oversized device ID table entries
 
     - Drop unnecessary 'static bounds from debugfs ScopedDir file creation
       methods to support data containing non-'static references, including DMA
       buffers
 
 - misc:
 
   - Add Johan Hovold as driver core maintainer
 
   - Simplify platform_device_alloc() by returning early on allocation failure
 
   - Fix typos in driver core and kernfs comments
 -----BEGIN PGP SIGNATURE-----
 
 iJEEABYKADkWIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCatNacRsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMiwwLDMACgkQRZR3jtaqyi7YegD8ChAjvp7WireJHjodlAMA
 j2Ty0NLjR8715/Ml/QNxnTUA/1/Auj3pXS5/VesKPp+PU6VVB4IdjjHzuzSY+7sz
 y7wN
 =GYmP
 -----END PGP SIGNATURE-----

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

Pull driver core updates from Danilo Krummrich:
 "Core:

   - Add TAINT_FORCED_BIND to taint the kernel and driver module before
     manual sysfs bind/unbind operations; make add_taint_module()
     available to driver core and update taint decoding tools and
     documentation

   - Constify device_show/store_*() attribute parameters and adapt x86
     MCE and perf users to prepare for const dev_ext_attribute instances

   - Fix UAF in NUMA access node registration failure handling by
     dropping the device reference with put_device() instead of directly
     freeing the node

  debugfs:

   - Make debugfs_create_str() read-only to eliminate double-free races
     between concurrent writers; reject writable modes; convert
     interconnect and SoundWire users to local file operations with
     mutex-protected strings

  kobject:

   - Fix out-of-bounds access in kobject_action_type() when parsing
     action strings containing embedded NUL bytes

   - Fix the kobject_set_name() reference in kset_register() kernel-doc

  Rust:

   - DMA:

      - Tie Coherent, CoherentBox and CoherentHandle to the device's
        bound lifetime to prevent retaining DMA allocations beyond
        driver unbind; propagate the lifetime through nova-core and the
        DMA sample driver

   - I/O:

      - Require explicit base types for registers and replace relative
        registers with typed subregion projections; reimplement
        register!() as a proc macro, support registers using existing
        types without inline bitfields, and convert nova-core, Tyr and
        the PCI sample; add AsRepr/AsReprMut and transmute helpers with
        deferred size checks for representation conversions

      - Wrap ResourceSize in a transparent newtype with explicit
        conversions, including checked conversion to usize

   - PCI:

      - Add typed PCIe extended capability lookup and SR-IOV accessors
        for the First VF Offset and decoded VF BAR addresses and widths,
        keeping raw SR-IOV registers private to preserve PCI core
        ownership of their state

   - scatterlist:

      - Honor the device's maximum segment size as well as the DMA
        mapping limit when constructing SG tables

      - Return u32 from SGEntry::dma_len() to match the C segment length
        type

   - misc:

      - Validate auxiliary DeviceId name length explicitly to improve
        compile-time diagnostics for oversized device ID table entries

      - Drop unnecessary 'static bounds from debugfs ScopedDir file
        creation methods to support data containing non-'static
        references, including DMA buffers

  Misc:

   - Add Johan Hovold as driver core maintainer

   - Simplify platform_device_alloc() by returning early on allocation
     failure

   - Fix typos in driver core and kernfs comments"

* tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (41 commits)
  rust: pci: add extended capability and SR-IOV support
  kobject: Fix the kobj_set_name reference in kset_register() kernel-doc
  rust: io: convert ResourceSize into a transparent newtype
  rust: scatterlist: return u32 from SGEntry::dma_len()
  MAINTAINERS: add myself as driver core maintainer
  debugfs: make debugfs_create_str() read-only
  soundwire: debugfs: replace writable string helper
  interconnect: debugfs: replace writable string helper
  docs: admin-guide: Handle TAINT_FORCED_BIND when parsing /proc/sys/kernel/tainted
  driver core: platform: Simplify platform_device_alloc()
  kobject: fix out-of-bounds access in kobject_action_type()
  rust: scatterlist: honor the device's maximum segment size
  driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
  module: fix up documentation for add_taint() and add_taint_module()
  module: pull out add_taint_module() to be public
  driver core: Constify the signature of device_show/store_*()
  drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
  x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
  rust: auxiliary: validate DeviceId name length
  driver core: fix typos in comments
  ...
2026-10-21 18:53:14 -10:00
..
alloc rust: alloc: allow different error types in KBox::pin_slice 2026-09-29 21:04:59 +02:00
block rust: block: fix GenDisk cleanup paths 2026-05-31 19:45:06 -06:00
debugfs rust: debugfs: drop 'static bound from ScopedDir file creation methods 2026-09-04 17:58:43 +02:00
device
drm drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
fs
gpu
interop
io rust: io: convert ResourceSize into a transparent newtype 2026-10-02 00:07:02 +02:00
iommu drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
irq rust: irq: make Registration compatible with lifetime-bound drivers 2026-08-04 23:30:34 +02:00
list
mm
net rust: net: netlink: validate attribute length before casting to c_int 2026-09-29 12:28:03 +02:00
num rust: num: add cv! macro to create values from constant expressions 2026-10-13 12:33:16 +02:00
pci rust: pci: add extended capability and SR-IOV support 2026-10-13 01:12:58 +02:00
ptr rust: ptr: remove implicit index projection syntax 2026-06-05 10:16:47 +02:00
str
sync Driver core changes for 7.4-rc1 2026-10-21 18:53:14 -10:00
time rust: hrtimer: document handle based design rationale 2026-09-29 09:22:30 +02:00
types rust: types: introduce ForLt base trait for CovariantForLt 2026-07-11 19:42:03 +02:00
.gitignore
acpi.rs rust: driver: store pointers in DeviceId 2026-07-30 22:50:15 +02:00
alloc.rs rust: alloc: add NumaNode::id() accessor 2026-09-29 21:05:08 +02:00
auxiliary.rs rust: auxiliary: validate DeviceId name length 2026-09-11 23:03:48 +02:00
bitfield.rs Driver core changes for 7.4-rc1 2026-10-21 18:53:14 -10:00
bitmap.rs Rust changes for v7.4 2026-10-21 10:20:36 -10:00
bits.rs
block.rs
bug.rs rust: bug: update the SAFETY comment for warn_slowpath_fmt() on UML 2026-10-12 17:31:14 +02:00
build_assert.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
clk.rs
configfs.rs Rust configfs changes for v7.4-rc1 2026-10-16 09:17:46 -07:00
cpu.rs
cpufreq.rs rust: cpufreq: reject NULL from cpufreq_cpu_get() 2026-10-05 09:25:54 +05:30
cpumask.rs
cred.rs
debugfs.rs rust: debugfs: drop 'static bound from ScopedDir file creation methods 2026-09-04 17:58:43 +02:00
device_id.rs rust: mem: add transmute with deferred size check 2026-09-06 13:39:26 +02:00
device.rs Linux 7.2-rc7 2026-08-10 01:20:05 +02:00
devres.rs Linux 7.2 2026-08-20 10:58:44 +10:00
dma.rs rust: dma: tie Coherent and CoherentBox to the device's bound lifetime 2026-09-04 17:58:47 +02:00
driver.rs rust: driver: remove open-coded matching logic 2026-07-30 22:50:15 +02:00
error.rs rust: error: add remaining error codes 2026-08-10 07:57:34 +02:00
faux.rs rust: faux: add Device type with AsBusDevice support 2026-07-12 15:55:51 +02:00
firmware.rs drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
fmt.rs rust: fmt: route {:p} through HashedPtr to prevent address leaks 2026-08-12 11:58:50 +02:00
fs.rs
fwctl.rs fwctl 7.3 pull request 2026-08-19 12:51:36 -07:00
generated_arch_reachable_asm.rs.S
generated_arch_static_branch_asm.rs.S
generated_arch_warn_asm.rs.S
gpu.rs
i2c.rs i2c for v7.3, part 2 2026-08-24 09:07:15 -07:00
id_pool.rs Rust changes for v7.4 2026-10-21 10:20:36 -10:00
impl_flags.rs rust: impl_flags: use bit helper in example 2026-08-10 06:44:10 +02:00
init.rs rust: treewide: replace __pinned_init with raw_[try_]init 2026-08-05 11:36:18 +01:00
interop.rs
interrupt.rs rust: Introduce interrupt module 2026-08-10 12:53:09 +02:00
io.rs rust: io: convert ResourceSize into a transparent newtype 2026-10-02 00:07:02 +02: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 rust: irq: fix C header path in module docs 2026-07-21 00:48:45 +02:00
jump_label.rs rust: jump_label: skip arch-specific asm in testlib builds 2026-08-23 21:27:16 +02:00
Kconfig.test Rust timekeeping changes for v7.4-rc1 2026-10-11 19:23:24 +02:00
kunit.rs rust: kunit: use line!() inside kunit_assert! 2026-10-03 14:04:56 +02:00
lib.rs rust: add pr_*_ratelimited! macros for printing 2026-10-12 07:03:26 +02:00
list.rs rust: kernel: list: fix incorrect pop_back example comment 2026-08-23 21:27:16 +02:00
maple_tree.rs
mem.rs Driver core changes for 7.4-rc1 2026-10-21 18:53:14 -10:00
miscdevice.rs rust: miscdevice: use #[optional] attribute of #[vtable] macro 2026-10-02 21:05:02 +02:00
mm.rs
module_param.rs rust: module_param: support bool parameters 2026-08-06 13:29:03 +02:00
module.rs rust: module: add THIS_MODULE const to ModuleMetadata trait 2026-08-12 09:36:26 +02:00
num.rs rust: num: add cv! macro to create values from constant expressions 2026-10-13 12:33:16 +02:00
of.rs rust: driver: store pointers in DeviceId 2026-07-30 22:50:15 +02:00
opp.rs opp: rust: mark OPP methods as inline 2026-05-25 09:40:52 +05:30
page.rs mm.git review status for mm-hotfixes-stable..mm-stable 2026-06-19 10:14:34 -07:00
pci.rs rust: pci: add extended capability and SR-IOV support 2026-10-13 01:12:58 +02:00
pid_namespace.rs
platform.rs Driver core changes for 7.3-rc1 2026-08-19 10:42:18 -07:00
prelude.rs rust: num: add cv! macro to create values from constant expressions 2026-10-13 12:33:16 +02:00
print.rs rust: print: fix broken _printk Rustdoc link 2026-08-03 08:03:24 +02:00
processor.rs
ptr.rs rust: num: add cv! macro to create values from constant expressions 2026-10-13 12:33:16 +02:00
pwm.rs pwm: Changes for v7.3-rc1 2026-08-19 09:03:59 -07:00
ratelimit.rs rust: add pr_*_ratelimited! macros for printing 2026-10-12 07:03:26 +02:00
rbtree.rs
regulator.rs
revocable.rs rust: revocable: Use LKMM atomics instead of Rust atomics 2026-08-04 05:52:54 -07:00
safety.rs
scatterlist.rs rust: scatterlist: return u32 from SGEntry::dma_len() 2026-10-02 00:06:52 +02:00
security.rs rust: lsm: replace core::mem::zeroed with pin_init::zeroed 2026-09-10 15:00:17 -04:00
seq_file.rs
serdev.rs Driver core changes for 7.3-rc1 2026-08-19 10:42:18 -07:00
sizes.rs rust: sizes: implement SizeConstants for Alignment 2026-10-13 12:52:26 +02:00
soc.rs
std_vendor.rs
str.rs rust: kunit: use line!() inside kunit_assert! 2026-10-03 14:04:56 +02:00
sync.rs rust: sync: move lockdep types to rust/kernel/sync/lockdep.rs 2026-10-12 07:02:12 +02:00
task.rs Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
time.rs rust: time: add Delta::as_jiffies_unsigned() 2026-10-12 07:31:20 +02:00
tracepoint.rs
transmute.rs
types.rs Driver core changes for 7.3-rc1 2026-08-19 10:42:18 -07:00
uaccess.rs rust: dma: tie Coherent and CoherentBox to the device's bound lifetime 2026-09-04 17:58:47 +02:00
usb.rs USB / Thunderbolt changes for 7.3-rc1 2026-08-25 10:44:46 -07:00
workqueue.rs
xarray.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00