GKI (arm64) relevant 44 out of 185 changes, affecting 54 files +634/-365
b32411f045 dm: add missing unlock on in dm_keyslot_evict() [1 file, +2/-1]
61e0fc3312 fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio() [1 file, +2/-2]
14ee85b748 firmware: arm_scmi: Fix timeout checks on polling path [1 file, +8/-5]
98cd7ed927 sch_htb: make htb_deactivate() idempotent [1 file, +6/-9]
35be4c0cdf gre: Fix again IPv6 link-local address generation. [1 file, +9/-6]
c33927f385 can: gw: fix RCU/BH usage in cgw_create_job() [1 file, +90/-59]
4555c4a13a wifi: mac80211: fix the type of status_code for negotiated TID to Link Mapping [2 files, +7/-7]
64385c0d02 erofs: ensure the extra temporary copy is valid for shortened bvecs [1 file, +14/-17]
b37e54259c bpf: Scrub packet on bpf_redirect_peer [1 file, +1/-0]
bb8f86f40e net: export a helper for adding up queue stats [2 files, +56/-19]
302a0cd0bb Input: xpad - fix Share button on Xbox One controllers [1 file, +20/-15]
bf239d3835 Input: xpad - add support for 8BitDo Ultimate 2 Wireless Controller [1 file, +1/-0]
38bb0170d6 Input: xpad - fix two controller table values [1 file, +2/-2]
2910019b04 mm: vmalloc: support more granular vrealloc() sizing [2 files, +25/-7]
6166c3cf40 mm/huge_memory: fix dereferencing invalid pmd migration entry [1 file, +8/-3]
b543a5a73b mm/userfaultfd: fix uninitialized output field for -EAGAIN race [1 file, +22/-6]
7f37e31483 io_uring: ensure deferred completions are flushed for multishot [1 file, +8/-0]
abbc99e898 arm64: cpufeature: Move arm64_use_ng_mappings to the .data section to prevent wrong idmap generation [1 file, +8/-1]
d66a22f6a4 memblock: Accept allocated memory before use in memblock_double_array() [1 file, +8/-1]
d63851049f module: ensure that kobject_put() is safe for module type kobjects [1 file, +3/-1]
75f23e49ad usb: gadget: f_ecm: Add get_status callback [1 file, +7/-0]
d1c8fa4c6e usb: gadget: Use get_status callback to set remote wakeup capability [1 file, +5/-7]
3366a19948 usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition [1 file, +1/-1]
5ad298d6d4 usb: typec: ucsi: displayport: Fix NULL pointer access [1 file, +2/-0]
afe8849597 types: Complement the aligned types with signed 64-bit one [2 files, +3/-1]
02a77b3020 loop: Use bdev limit helpers for configuring discard [1 file, +4/-4]
722f6dece7 loop: Simplify discard granularity calc [1 file, +1/-2]
0558ce095b loop: Fix ABBA locking race [1 file, +15/-15]
5e1470b276 loop: refactor queue limits updates [1 file, +20/-16]
a781ffe410 loop: factor out a loop_assign_backing_file helper [1 file, +10/-10]
184b147b9f loop: Add sanity check for read/write_iter [1 file, +23/-0]
19fa2a4830 nvme: unblock ctrl state transition for firmware update [1 file, +2/-1]
3edac2949e io_uring/sqpoll: Increase task_work submission batch size [1 file, +1/-1]
cd010271a9 do_umount(): add missing barrier before refcount checks in sync case [1 file, +2/-1]
2482f7705b io_uring: always arm linked timeouts prior to issue [1 file, +15/-35]
564d25b1a6 mm: page_alloc: don't steal single pages from biggest buddy [1 file, +34/-46]
16bae58f73 mm: page_alloc: speed up fallbacks in rmqueue_bulk() [1 file, +80/-33]
86b37810fa sched/eevdf: Fix se->slice being set to U64_MAX and resulting crash [1 file, +1/-3]
2a3915e861 arm64: insn: Add support for encoding DSB [2 files, +38/-23]
ec5bca57af arm64: proton-pack: Expose whether the platform is mitigated by firmware [2 files, +6/-0]
f2aebb8ec6 arm64: proton-pack: Expose whether the branchy loop k value [2 files, +6/-0]
38c345fd54 arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs [3 files, +52/-5]
e5f5100f1c arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users [1 file, +3/-0]
2176530849 arm64: proton-pack: Add new CPUs 'k' values for branch mitigation [2 files, +3/-0]
Changes in 6.12.29
dm: add missing unlock on in dm_keyslot_evict()
fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio()
Revert "btrfs: canonicalize the device path before adding it"
arm64: dts: imx8mm-verdin: Link reg_usdhc2_vqmmc to usdhc2
firmware: arm_scmi: Fix timeout checks on polling path
can: mcan: m_can_class_unregister(): fix order of unregistration calls
s390/pci: Fix missing check for zpci_create_device() error return
wifi: cfg80211: fix out-of-bounds access during multi-link element defragmentation
vfio/pci: Align huge faults to order
s390/pci: Fix duplicate pci_dev_put() in disable_slot() when PF has child VFs
can: mcp251xfd: mcp251xfd_remove(): fix order of unregistration calls
can: rockchip_canfd: rkcanfd_remove(): fix order of unregistration calls
ksmbd: prevent rename with empty string
ksmbd: prevent out-of-bounds stream writes by validating *pos
ksmbd: Fix UAF in __close_file_table_ids
openvswitch: Fix unsafe attribute parsing in output_userspace()
ksmbd: fix memory leak in parse_lease_state()
s390/entry: Fix last breaking event handling in case of stack corruption
sch_htb: make htb_deactivate() idempotent
virtio_net: xsk: bind/unbind xsk for tx
virtio-net: free xsk_buffs on error in virtnet_xsk_pool_enable()
gre: Fix again IPv6 link-local address generation.
net: ethernet: mtk_eth_soc: reset all TX queues on DMA free
net: ethernet: mtk_eth_soc: do not reset PSE when setting FE
can: m_can: m_can_class_allocate_dev(): initialize spin lock on device probe
can: mcp251xfd: fix TDC setting for low data bit rates
can: gw: fix RCU/BH usage in cgw_create_job()
wifi: mac80211: fix the type of status_code for negotiated TID to Link Mapping
ice: Initial support for E825C hardware in ice_adapter
ice: use DSN instead of PCI BDF for ice_adapter index
erofs: ensure the extra temporary copy is valid for shortened bvecs
ipvs: fix uninit-value for saddr in do_output_route4
netfilter: ipset: fix region locking in hash types
bpf: Scrub packet on bpf_redirect_peer
net: dsa: b53: allow leaky reserved multicast
net: dsa: b53: keep CPU port always tagged again
net: dsa: b53: fix clearing PVID of a port
net: dsa: b53: fix flushing old pvid VLAN on pvid change
net: dsa: b53: fix VLAN ID for untagged vlan on bridge leave
net: dsa: b53: always rejoin default untagged VLAN on bridge leave
net: dsa: b53: do not allow to configure VLAN 0
net: dsa: b53: do not program vlans when vlan filtering is off
net: dsa: b53: fix toggling vlan_filtering
net: dsa: b53: fix learning on VLAN unaware bridges
net: dsa: b53: do not set learning and unicast/multicast on up
fbnic: Fix initialization of mailbox descriptor rings
fbnic: Gate AXI read/write enabling on FW mailbox
fbnic: Actually flush_tx instead of stalling out
fbnic: Improve responsiveness of fbnic_mbx_poll_tx_ready
fbnic: Pull fbnic_fw_xmit_cap_msg use out of interrupt context
fbnic: Do not allow mailbox to toggle to ready outside fbnic_mbx_poll_tx_ready
net: export a helper for adding up queue stats
virtio-net: fix total qstat values
Input: cyttsp5 - ensure minimum reset pulse width
Input: cyttsp5 - fix power control issue on wakeup
Input: mtk-pmic-keys - fix possible null pointer dereference
Input: xpad - fix Share button on Xbox One controllers
Input: xpad - add support for 8BitDo Ultimate 2 Wireless Controller
Input: xpad - fix two controller table values
Input: synaptics - enable InterTouch on Dynabook Portege X30-D
Input: synaptics - enable InterTouch on Dynabook Portege X30L-G
Input: synaptics - enable InterTouch on Dell Precision M3800
Input: synaptics - enable SMBus for HP Elitebook 850 G1
Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5
rust: clean Rust 1.88.0's `unnecessary_transmutes` lint
objtool/rust: add one more `noreturn` Rust function for Rust 1.87.0
rust: clean Rust 1.88.0's warning about `clippy::disallowed_macros` configuration
staging: iio: adc: ad7816: Correct conditional logic for store mode
staging: bcm2835-camera: Initialise dev in v4l2_dev
staging: axis-fifo: Remove hardware resets for user errors
staging: axis-fifo: Correct handling of tx_fifo_depth for size validation
x86/mm: Eliminate window where TLB flushes may be inadvertently skipped
mm: fix folio_pte_batch() on XEN PV
mm: vmalloc: support more granular vrealloc() sizing
mm/huge_memory: fix dereferencing invalid pmd migration entry
mm/userfaultfd: fix uninitialized output field for -EAGAIN race
selftests/mm: compaction_test: support platform with huge mount of memory
selftests/mm: fix a build failure on powerpc
KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception
drm/amd/display: Shift DMUB AUX reply command if necessary
io_uring: ensure deferred completions are flushed for multishot
iio: adc: ad7606: fix serial register access
iio: adc: rockchip: Fix clock initialization sequence
iio: adis16201: Correct inclinometer channel resolution
iio: imu: inv_mpu6050: align buffer for timestamp
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo
drm/v3d: Add job to pending list if the reset was skipped
drm/xe: Add page queue multiplier
drm/amdgpu/vcn: using separate VCN1_AON_SOC offset
drm/amd/display: Fix invalid context error in dml helper
drm/amd/display: more liberal vmin/vmax update for freesync
drm/amd/display: Fix the checking condition in dmub aux handling
drm/amd/display: Remove incorrect checking in dmub aux handler
drm/amd/display: Fix wrong handling for AUX_DEFER case
drm/amd/display: Copy AUX read reply data whenever length > 0
drm/amdgpu/hdp4: use memcfg register to post the write for HDP flush
drm/amdgpu/hdp5.2: use memcfg register to post the write for HDP flush
drm/amdgpu/hdp5: use memcfg register to post the write for HDP flush
drm/amdgpu/hdp6: use memcfg register to post the write for HDP flush
drm/amdgpu/hdp7: use memcfg register to post the write for HDP flush
usb: uhci-platform: Make the clock really optional
smb: client: Avoid race in open_cached_dir with lease breaks
xen: swiotlb: Use swiotlb bouncing if kmalloc allocation demands it
xenbus: Use kref to track req lifetime
accel/ivpu: Increase state dump msg timeout
arm64: cpufeature: Move arm64_use_ng_mappings to the .data section to prevent wrong idmap generation
clocksource/i8253: Use raw_spinlock_irqsave() in clockevent_i8253_disable()
memblock: Accept allocated memory before use in memblock_double_array()
module: ensure that kobject_put() is safe for module type kobjects
x86/microcode: Consolidate the loader enablement checking
ocfs2: fix the issue with discontiguous allocation in the global_bitmap
ocfs2: switch osb->disable_recovery to enum
ocfs2: implement handshaking with ocfs2 recovery thread
ocfs2: stop quota recovery before disabling quotas
usb: dwc3: gadget: Make gadget_wakeup asynchronous
usb: cdnsp: Fix issue with resuming from L1
usb: cdnsp: fix L1 resume issue for RTL_REVISION_NEW_LPM version
usb: gadget: f_ecm: Add get_status callback
usb: gadget: tegra-xudc: ACK ST_RC after clearing CTRL_RUN
usb: gadget: Use get_status callback to set remote wakeup capability
usb: host: tegra: Prevent host controller crash when OTG port is used
usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs
usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition
usb: typec: ucsi: displayport: Fix NULL pointer access
USB: usbtmc: use interruptible sleep in usbtmc_read
usb: usbtmc: Fix erroneous get_stb ioctl error returns
usb: usbtmc: Fix erroneous wait_srq ioctl return
usb: usbtmc: Fix erroneous generic_read ioctl return
iio: accel: adxl367: fix setting odr for activity time update
iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer.
types: Complement the aligned types with signed 64-bit one
iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64
iio: adc: dln2: Use aligned_s64 for timestamp
MIPS: Fix MAX_REG_OFFSET
riscv: misaligned: Add handling for ZCB instructions
loop: Use bdev limit helpers for configuring discard
loop: Simplify discard granularity calc
loop: Fix ABBA locking race
loop: refactor queue limits updates
loop: factor out a loop_assign_backing_file helper
loop: Add sanity check for read/write_iter
drm/panel: simple: Update timings for AUO G101EVN010
nvme: unblock ctrl state transition for firmware update
riscv: misaligned: factorize trap handling
riscv: misaligned: enable IRQs while handling misaligned accesses
drm/xe/tests/mocs: Update xe_force_wake_get() return handling
drm/xe/tests/mocs: Hold XE_FORCEWAKE_ALL for LNCF regs
io_uring/sqpoll: Increase task_work submission batch size
do_umount(): add missing barrier before refcount checks in sync case
Revert "um: work around sched_yield not yielding in time-travel mode"
rust: allow Rust 1.87.0's `clippy::ptr_eq` lint
rust: clean Rust 1.88.0's `clippy::uninlined_format_args` lint
io_uring: always arm linked timeouts prior to issue
Bluetooth: btmtk: Remove resetting mt7921 before downloading the fw
Bluetooth: btmtk: Remove the resetting step before downloading the fw
mm: page_alloc: don't steal single pages from biggest buddy
mm: page_alloc: speed up fallbacks in rmqueue_bulk()
sched/eevdf: Fix se->slice being set to U64_MAX and resulting crash
arm64: insn: Add support for encoding DSB
arm64: proton-pack: Expose whether the platform is mitigated by firmware
arm64: proton-pack: Expose whether the branchy loop k value
arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs
arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users
arm64: proton-pack: Add new CPUs 'k' values for branch mitigation
x86/bpf: Call branch history clearing sequence on exit
x86/bpf: Add IBHF call at end of classic BPF
x86/bhi: Do not set BHI_DIS_S in 32-bit mode
x86/speculation: Simplify and make CALL_NOSPEC consistent
x86/speculation: Add a conditional CS prefix to CALL_NOSPEC
x86/speculation: Remove the extra #ifdef around CALL_NOSPEC
Documentation: x86/bugs/its: Add ITS documentation
x86/its: Enumerate Indirect Target Selection (ITS) bug
x86/its: Add support for ITS-safe indirect thunk
x86/its: Add support for ITS-safe return thunk
x86/its: Enable Indirect Target Selection mitigation
x86/its: Add "vmexit" option to skip mitigation on some CPUs
x86/its: Add support for RSB stuffing mitigation
x86/its: Align RETs in BHB clear sequence to avoid thunking
x86/ibt: Keep IBT disabled during alternative patching
x86/its: Use dynamic thunks for indirect branches
selftest/x86/bugs: Add selftests for ITS
x86/its: Fix build errors when CONFIG_MODULES=n
x86/its: FineIBT-paranoid vs ITS
Linux 6.12.29
Change-Id: I00ff9cc212474331d43028ec90a190dcd1dfa697
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This is needed by Rust Binder in the range allocator, and by upcoming
GPU drivers during firmware initialization.
Panics in the kernel are best avoided when possible, so an error is
returned if the index is out of bounds. An error type is used rather
than just returning Option<T> to let callers handle errors with ?.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250502-vec-methods-v5-6-06d20ad9366f@google.com
[ Remove `# Panics` section; `Vec::remove() handles the error properly.`
- Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Bug: 414994413
(cherry picked from commit 294a7ecbdf0a5d65c6df1287c5d56241e9331cf2
https://github.com/Rust-for-Linux/linux.git alloc-next)
Change-Id: I80a8925910f234cccd325614634aa8a12e85ea1c
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
This adds a common Vec method called `retain` that removes all elements
that don't match a certain condition. Rust Binder uses it to find all
processes that match a given pid.
The stdlib retain method takes &T rather than &mut T and has a separate
retain_mut for the &mut T case. However, this is considered an API
mistake that can't be fixed now due to backwards compatibility. There's
no reason for us to repeat that mistake.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250502-vec-methods-v5-5-06d20ad9366f@google.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Bug: 414994413
(cherry picked from commit 9f140894e72735f034fdc0e963d0550ef03c6f44
https://github.com/Rust-for-Linux/linux.git alloc-next)
Change-Id: I1a126b3a847142eaa90794789280abb91e000b58
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
This is like the stdlib method drain, except that it's hard-coded to use
the entire vector's range. Rust Binder uses it in the range allocator to
take ownership of everything in a vector in a case where reusing the
vector is desirable.
Implementing `DrainAll` in terms of `slice::IterMut` lets us reuse some
nice optimizations in core for the case where T is a ZST.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250502-vec-methods-v5-4-06d20ad9366f@google.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Bug: 414994413
(cherry picked from commit 088bf14a886e1e746c961a862ebccbb76d7cbd4e
https://github.com/Rust-for-Linux/linux.git alloc-next)
Change-Id: I65ab0823980a15a0c18f960f9ab7ff6fa621c06a
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
This introduces a new method called `push_within_capacity` for appending
to a vector without attempting to allocate if the capacity is full. Rust
Binder will use this in various places to safely push to a vector while
holding a spinlock.
The implementation is moved to a push_within_capacity_unchecked method.
This is preferred over having push() call push_within_capacity()
followed by an unwrap_unchecked() for simpler unsafe.
Panics in the kernel are best avoided when possible, so an error is
returned if the vector does not have sufficient capacity. An error type
is used rather than just returning Result<(),T> to make it more
convenient for callers (i.e. they can use ? or unwrap).
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250502-vec-methods-v5-3-06d20ad9366f@google.com
[ Remove public visibility from `Vec::push_within_capacity_unchecked()`.
- Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Bug: 414994413
(cherry picked from commit 9def0d0a2a1c62d7970f4ce5ad5557968c98f637
https://github.com/Rust-for-Linux/linux.git alloc-next)
Change-Id: Ib01be654536651a8189b28fddc9f8f332ffbcbfb
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Document the invariant that the vector's length is always less than or
equal to its capacity. This is already implied by these other
invariants:
- `self.len` always represents the exact number of elements stored in
the vector.
- `self.layout` represents the absolute number of elements that can be
stored within the vector without re-allocation.
but it doesn't hurt to spell it out. Note that the language references
`self.capacity` rather than `self.layout.len` as the latter is zero for
a vector of ZSTs.
Update a safety comment touched by this patch to correctly reference
`realloc` rather than `alloc` and replace "leaves" with "leave" to
improve grammar.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Link: https://lore.kernel.org/r/20250416-vec-set-len-v4-1-112b222604cd@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Bug: 414994413
(cherry picked from commit 47a17a63f9e23f7e8f39d0965bcda8fee6c322f8
https://github.com/Rust-for-Linux/linux.git alloc-next)
Change-Id: Ie6a0d80271a65126b37d50c525a3757fcedb0a38
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Steps on the way to 6.12.18
Resolves merge conflicts in:
rust/kernel/types.rs
scripts/Makefile.build
Change-Id: I1a0d7a30074e2532f53b9c9d4cf0e8346d57ffef
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
[Re-resolved rust/kernel/types.rs <mmaurer@google.com>]
Signed-off-by: Matthew Maurer <mmaurer@google.com>
commit 93e602310f87b7b515b86a8f919cc0799387e5c3 upstream.
Currently, we can't implement `FromIterator`. There are a couple of
issues with this trait in the kernel, namely:
- Rust's specialization feature is unstable. This prevents us to
optimize for the special case where `I::IntoIter` equals `Vec`'s
`IntoIter` type.
- We also can't use `I::IntoIter`'s type ID either to work around this,
since `FromIterator` doesn't require this type to be `'static`.
- `FromIterator::from_iter` does return `Self` instead of
`Result<Self, AllocError>`, hence we can't properly handle allocation
failures.
- Neither `Iterator::collect` nor `FromIterator::from_iter` can handle
additional allocation flags.
Instead, provide `IntoIter::collect`, such that we can at least convert
`IntoIter` into a `Vec` again.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20241004154149.93856-19-dakr@kernel.org
[ Added newline in documentation, changed case of section to be
consistent with an existing one, fixed typo. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 1d1d223aa3b37c34271aefc2706340d0843bfcb2 upstream.
Implement `IntoIterator` for `Vec`, `Vec`'s `IntoIter` type, as well as
`Iterator` for `IntoIter`.
`Vec::into_iter` disassembles the `Vec` into its raw parts; additionally,
`IntoIter` keeps track of a separate pointer, which is incremented
correspondingly as the iterator advances, while the length, or the count
of elements, is decremented.
This also means that `IntoIter` takes the ownership of the backing
buffer and is responsible to drop the remaining elements and free the
backing buffer, if it's dropped.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20241004154149.93856-18-dakr@kernel.org
[ Fixed typos. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 2aac4cd7dae3d7bb0e0ddec2561b2ee4cbe6c8f6 upstream.
`Vec` provides a contiguous growable array type with contents allocated
with the kernel's allocators (e.g. `Kmalloc`, `Vmalloc` or `KVmalloc`).
In contrast to Rust's stdlib `Vec` type, the kernel `Vec` type considers
the kernel's GFP flags for all appropriate functions, always reports
allocation failures through `Result<_, AllocError>` and remains
independent from unstable features.
[ This patch starts using a new unstable feature, `inline_const`, but
it was stabilized in Rust 1.79.0, i.e. the next version after the
minimum one, thus it will not be an issue. - Miguel ]
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20241004154149.93856-17-dakr@kernel.org
[ Cleaned `rustdoc` unescaped backtick warning, added a couple more
backticks elsewhere, fixed typos, sorted `feature`s, rewrapped
documentation lines. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>