summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-08-06gpu: nova-core: update firmware module info for TLV imagesTimur Tabi
Now that nova-core loads the TLV firmware images, update the firmware module info to specify those files. Also remove FIRMWARE_VERSION as it is no longer used. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-9-ttabi@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-06gpu: nova-core: transition fsp to TLV imagesTimur Tabi
Switch the FSP firmware loaders from the legacy ELF32 format to the new TLV format. This change requires the new TLV versions of the r570.144 firmware images. Because we are no longer loading ELF images, we can also delete the ELF parser. Also remove function request_firmware() as this was the last user. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-8-ttabi@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-06gpu: nova-core: transition gen_bootloader to TLV imagesTimur Tabi
Switch the generic bootloader firmware loader from the legacy binary format to the TLV format. This change requires the new TLV versions of the r570.144 firmware images. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-7-ttabi@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-06gpu: nova-core: transition gsp to TLV imagesTimur Tabi
Switch the GSP firmware loader from the legacy binary format to the TLV format. This change requires the new TLV versions of the r570.144 firmware images. Unlike the other TLV firmware images, gsp.tlv contains a pointer to the actual GSP firmware file instead of its contents. This allows each small gsp.tlv file to contain the distinct metadata for each GPU while still allowing the very large gsp.bin to be shared by all GPUs. One key piece of metadata is the signature. The legacy GSP firmware image is an ELF file that contains multiple sections that needed to be parsed, and the driver needed to determine which section is relevant for the GPU. Instead, gsp.tlv contains the pre-processed metadata, so all the driver needs to do is to extract it. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-6-ttabi@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-06gpu: nova-core: transition booter to TLV imagesTimur Tabi
Switch the booter firmware loader from the legacy binary format to the TLV format. This change requires the new TLV versions of the r570.144 firmware images. The new TLV format has all of the metadata needed by Nova encoded as separate tags, eliminating the need to parse legacy firmware headers such as HsHeaderV2 and HsSignatureParams. All of the structs and code for parsing those headers is therefore deleted. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-5-ttabi@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-06gpu: nova-core: add TLV parser for firmware filesTimur Tabi
TLV (type, length, value) files are the new image format used by Nova to encapsulate firmware images and their metadata. Unlike the firmware files for previous versions of the firmware, TLV filenames are not versioned, and they have a .tlv suffix. Add function request_tlv() to load TLV firmware images. Add the Tlv struct and supporting types for parsing TLV firmware images. TLV files begin with a 4-byte magic header, which must be "NVFW" for Nvidia firmware files. This is followed by a sequence of blocks each containing a 4-byte ASCII tag, a 4-byte little-endian length, and a payload padded to a 4-byte boundary. Tlv::new() validates the entire image up front, so that the iterator can subsequently yield blocks without fallible parsing. Also add accessor methods for the various encoded types that will be used by the driver. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-4-ttabi@nvidia.com [ Drop unnecessary payload.is_empty() check in Tlv::new(), use EINVAL instead of ENODATA in Tlv::get_bytes() and add a corresponding TODO comment. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-05selftests: drv-net: hw: reset HDS mode after netkit devmem testsJakub Kicinski
HDS mode has confusing semantics. On GET kernel reports effective mode. On SET kernel expects explicit config. Effective mode on GET means that we know the current state, but we don't know if it's a driver default or user setting. This matter because driver default can change automatically when e.g. XDP is attached. Explicit user setting must not be lost. With that in mind, we can't restore the HDS setting like we restore other NIC config. We should always reset to default ("unknown"). This fixes an issue with tests running after the devmem test not being able to attach XDP, e.g. Exception| File "./xdp_metadata.py", line 105, in test_xdp_rss_hash [...] Exception| net.lib.py.utils.CmdExitFailure: Command failed Exception| CMD: ip link set dev ens9np0 xdpdrv pinned /sys/fs/bpf/xdp_metadata_test/xdp_rss_hash Exception| EXIT: 2 Exception| STDERR: Error: unable to install XDP to device using tcp-data-split. not ok 1 xdp_metadata.test_xdp_rss_hash.tcp Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com> Link: https://patch.msgid.link/20260804151040.2755153-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-06rust: firmware: add request_into_buf()Timur Tabi
Add request_into_buf(), a Rust wrapper around the request_firmware_into_buf() function. This variant loads the firmware image directly into a caller-provided buffer rather than a kernel-allocated one. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-3-ttabi@nvidia.com [ Declare fw as *const to match the FFI out-parameter type and pass &raw mut directly, removing the redundant cast chain. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-05KVM: x86/pmu: Clean up vPMU comments and stray blank linesLike Xu
Tidy up the x86 vPMU emulation code and its selftests by fixing comments that no longer reflect the code along with assorted spelling and grammar mistakes, and by dropping redundant blank lines reported by checkpatch. No functional change intended. Signed-off-by: Like Xu <likexu@tencent.com> Link: https://patch.msgid.link/20260625090155.6326-1-likexu@tencent.com [sean: keep quotes around "hit", shove sequences fix into separate patch] Signed-off-by: Sean Christopherson <seanjc@google.com>
2026-08-05devlink: Expose external flag for PCI SF portsShay Drory
The external flag is part of the PCI SF port attributes, but unlike the PCI PF and PCI VF flavours it was never filled into the port dump, so userspace could not query it directly. Reporting of the external flag was missed for SF ports. Hence, put DEVLINK_ATTR_PORT_EXTERNAL for the PCI SF flavour as well, matching what PCI PF and PCI VF ports already report. $ devlink port show pci/0033:01:00.0/163840 pci/0033:01:00.0/163840: type eth netdev eth1 flavour pcisf controller 1 pfnum 0 sfnum 77 external true splittable false Reviewed-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Shay Drory <shayd@nvidia.com> Link: https://patch.msgid.link/20260803090012.257242-1-shayd@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-06ASoC: cpcap: Use standard ASoC DAI link configuration for voiceMark Brown
Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> says: This series removes the modem-specific voice call support implementation from the cpcap codec driver and moves the DAI configuration towards the standard ASoC DAI link configuration model. The previous implementation added a cpcap-specific .set_tdm_slot() callback and relied on a client driver to locate and configure the codec DAI directly using snd_soc_dai_set_*() APIs. This couples the codec driver to a particular client implementation and bypasses the normal ASoC configuration flow. Instead, the voice DAI configuration can be described by the DAI link and DT, allowing the ASoC core to apply the required format configuration. The series: - removes the old modem-specific voice call support implementation; - makes the cpcap voice DAI format follow the configuration specified by DT. Patch 1 removes the obsolete implementation. Patch 2 updates cpcap to apply the DAI format from the runtime DAI link. Link: https://patch.msgid.link/20260805144434.1290261-1-ivo.g.dimitrov.75@gmail.com
2026-08-06ASoC: codecs: cpcap: set voice DAI format as specified in DTIvaylo Dimitrov
We can have port endpoints with different DAI formats, make sure those are actually set-up Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Link: https://patch.msgid.link/20260805144434.1290261-3-ivo.g.dimitrov.75@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-06ASoC: cpcap: Remove modem-specific voice call supportIvaylo Dimitrov
Revert commit 0dedbde5062d ("ASoC: cpcap: Implement set_tdm_slot for voice call support"). The reverted implementation was added to support a modem driver that directly locates and configures the codec DAI using snd_soc_find_dai() together with snd_soc_dai_set_sysclk(), snd_soc_dai_set_fmt() and snd_soc_dai_set_tdm_slot(). The DAI configuration should instead be provided by the ASoC DAI link, allowing the machine driver or DT to describe the interface rather than having a client driver configure the codec directly. Remove the ad hoc voice call implementation. Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Link: https://patch.msgid.link/20260805144434.1290261-2-ivo.g.dimitrov.75@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-05Merge tag 'nf-next-26-07-31' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Update conncount to use the original tuple after ct lookup to ensure consistent counting, from Fernando F. Mancera. 2) Remove redundant net_device field in info structure that helps parse the flowtable path discovery. 3) Move net_device to flowtable check to the flowtable discovery path parser. This is preparation work to pass the tunnel dst_entry via .fill_forward_path. 4) Update DSA .fill_forward_path to break at the user DSA, since the conduit DSA is not used in the datapath. This slighly simplifies the flowtable path discovery parser. 5) Do not advance index in the path stack prematurely, otherwise it points to uninitialized slots on error. Not an issue currently but it could be once tunnel dst_entry is passed via .fill_forward_path. 6) Pass the tunnel dst_entry via dev_fill_forward_path(). 7) Update ipip and ip6ip6 tunnels to pass the dst_entry through dev_fill_forward_path(). 8) Call skb_valid_dst() before accessing skb_dst() to ensure dst_entry is not a template. 9) Use UNACK timeout when RST packet does not match the expected window while in ESTABLISHED state, the existing approach the CLOSE state timeout which is only 10 seconds. Adopt a more conservative timeout by default for this case. * tag 'nf-next-26-07-31' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next: netfilter: conntrack: tcp: use UNACK timeout for non-closing RST packets netfilter: nf_tables: call skb_valid_dst() before skb_dst() netfilter: flowtable: release tunnel route on error when building forward path net: pass dst via net_device_path in dev_fill_forward_path() net: do not advance stack index from dev_fwd_path() net: dsa: stop at the user device in .fill_forward_path netfilter: flowtable: consolidate flowtable device check netfilter: flowtable: consolidate net_device field in nft_forward_info struct netfilter: conncount: normalize tuple and zone on successful ct lookup ==================== Link: https://patch.msgid.link/20260731153402.851224-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nfJakub Kicinski
Partial pull of the nf-26-07-31 tag Pablo says: ==================== The following patchset contains Netfilter/IPVS fixes net, this includes fixes for ebtables nflog target, ipset hash type, IPVS kthread estimator 1) Prevent IPVS kthread estimator from draining the est_temp_list when netns is being dismantled. From Zhiling Zou. 2) Missing module nflog refcount bump from ebtables nflog target from .checkentry path. Similar dependency exists already in xt_NFLOG and nft_log. From Chengfeng Ye. 3) Use RCU to fix ipset bookkeeping of cidr values on weakly-ordered architectures. From Jozsef Kadlecsik. 4) Use atomic64_t for set->ext_size in ipset to fix parallel inserts and deletes racing on updating it. From Jozsef Kadlecsik. 5) Add small wrappers for hash and bucket size to prepare the update of ipset hash set types to rhashtable, from Florian Westphal. 6) Add mtype_del_cidr_all() and use it to prepare the migration of ipset hash types to rhashtable. From Florian Westphal. 7) Replace existing ipset call_rcu() based destruction with rcu_work api also to ease the transition to rhashtable. Also from Florian. 8) Avoid reading the IPv4 ihl field multiple times to prevent local attacker to cause out-of-bounds write in ip_vs_nat_icmp(), from Julian Anastasov. 9) Restore the checksum validations that could be needed by the IPVS FORWARD hook. Also from Julian. ==================== Link: https://patch.msgid.link/20260731151806.849724-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-06rust: alloc: add Vec::zeroed methodTimur Tabi
Add a constructor for kernel Vec that allocates a vector of a given length with all elements zero-initialized. Memory is allocated with the __GFP_ZERO flag, matching the existing KBox::zeroed() pattern. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260731201017.2580713-2-ttabi@nvidia.com Co-developed-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-08-05Documentation/arch/x86/amd-debugging: Add example for reset registerDaniel Gibson
The amd debugging documentation didn't state how to identify kernel log lines with information from the reset register about the cause of a previous random reboot. Add an example. Suggested-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Daniel Gibson <daniel@gibson.sh> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20260624124326.746525-2-daniel@gibson.sh
2026-08-05KVM: selftests: Test one random GP counter in PMU arch events testcaseSean Christopherson
To significantly reduce the PMU counter test's runtime, without sacrificing test coverage in the aggregate, test a random GP counter in the arch events testcase instead of testing every possible GP counter. Testing every PMC in every run of the test significantly increases the runtime of the test, without providing an equivalent increase in validation coverage, as the odds of a KVM having a bug that only affected a subset of counters and only when testing all other counters are extremely low. Opportunistically clean up kvm_random_u64_in_range() to eliminate unnecessary newlines. Link: https://patch.msgid.link/20260804210046.3413149-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
2026-08-05f2fs: fix to clear dirty flag on folio in error pathChao Yu
If node block is corrupted due to chksum mismatch or inconsistent footer info, it needs to drop clear flag of node folio, in order to persist inconsistent node data to storage. Cc: stable@kernel.org Fixes: b42b179bda9f ("f2fs: fix to do checksum even if inode page is uptodate") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2026-08-05f2fs: avoid unnecessary shrink in f2fs_shrink_scan()Chao Yu
In f2fs_shrink_scan(), let's check if we have already shrinked enough number of memory before calling f2fs_shrink_read_extent_tree(). Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2026-08-05f2fs: fix to return -EFSCORRUPTED in f2fs_get_node_info() correctlyChao Yu
Otherwise, it will cache wrong nat info in cache. Cc: stable@kernel.org Fixes: 3cb396a2c790 ("f2fs: fix to do sanity check on nat entry of quota inode") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2026-08-05Merge branch 'for-7.3/cxl-port-err-prep' into cxl-for-nextDave Jiang
cxl: Rename find_cxl_port() to find_cxl_port_by_dport() cxl: Tighten CPER kfifo registration API and symbol visibility acpi/apei/ghes: Use raw_spinlock_t for CXL CPER work locks cxl/ras: Fix cxl_rch_get_aer_severity() wrong severity register cxl/ras: Fix cxl_rch_get_aer_info() out-of-bounds AER register read
2026-08-05drm/panel-edp: Add pre_unprepare delayHsin-Te Yuan
In eDP power-off timing specifications, T10 defines the minimum delay required between the end of valid video data from the source and panel power-down (main VDD off). Currently, panel-edp only supports the 'disable' delay, which corresponds to T9 (backlight off to end of video data) and runs in panel_edp_disable() while video data is still active. For panels that require a delay after video data has stopped before cutting power, this delay must occur in panel_edp_unprepare() before turning off power rails. Add a 'pre_unprepare' field to struct panel_delay to model T10-min, and delay for this duration in panel_edp_unprepare() before calling pm_runtime_put_sync_suspend(). Additionally, adjust the timing entry for TM156VDXP25 to use delay_200_500_e80_pu100 (enable = 80ms, pre_unprepare = 100ms) to match its panel specification, replacing the previous delay_200_500_e50_d100. Fixes: b9e2d5cdaab0 ("drm/panel-edp: Support NV140FHM-N5B and TM156VDXP25") Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patch.msgid.link/20260803-edp-v1-1-3e92dec1d56c@chromium.org
2026-08-05cxl: Rename find_cxl_port() to find_cxl_port_by_dport()Dan Williams
find_cxl_port() and find_cxl_port_by_uport() are internal port lookup functions that search the CXL bus by dport and uport respectively, but their names do not make the lookup method clear. Rename find_cxl_port() to find_cxl_port_by_dport() to make the lookup method explicit and consistent with find_cxl_port_by_uport(). Both functions remain static to port.c; the upcoming patch that adds the first cross-file caller will widen their scope. Make the same naming change to static helper __find_cxl_port_by_dport(). Co-developed-by: Terry Bowman <terry.bowman@amd.com> Signed-off-by: Terry Bowman <terry.bowman@amd.com> Signed-off-by: Dan Williams <djbw@kernel.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Jonathan Cameron <jic23@kernel.org> Link: https://patch.msgid.link/20260803221810.3685703-6-terry.bowman@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05cxl: Tighten CPER kfifo registration API and symbol visibilityDan Williams
Tighten the CPER protocol error kfifo registration API and symbol visibility. Use EXPORT_SYMBOL_FOR_MODULES() instead of EXPORT_SYMBOL_NS_GPL() for the CPER kfifo registration symbols. This names the consuming module explicitly and gives compile-time enforcement. Drop the work_struct argument from the unregister path. Change the WARN_ONCE condition to a NULL check since there is no caller pointer to compare against anymore. Return void from the registration helpers whose result callers ignore. cxl_cper_register_work() keeps its int return as the only one consumed by a caller. Flag double registration with WARN_ONCE() inside the lock instead of returning an error. Change cxl_ras_init() to void because there is one consumer and one producer so the error return was unnecessary. Remove the now-dead error check in cxl_core_init(). Co-developed-by: Terry Bowman <terry.bowman@amd.com> Signed-off-by: Terry Bowman <terry.bowman@amd.com> Signed-off-by: Dan Williams <djbw@kernel.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260803221810.3685703-5-terry.bowman@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05acpi/apei/ghes: Use raw_spinlock_t for CXL CPER work locksTerry Bowman
The CXL CPER work registration and unregistration helpers acquire cxl_cper_work_lock and cxl_cper_prot_err_work_lock with a spinlock guard(), which leaves local interrupts enabled. The corresponding post paths (cxl_cper_post_event(), cxl_cper_post_prot_err()) execute in hard IRQ context (they are called from the GHES error notification path) and acquire the same locks with an irqsave guard(). If a CPU is holding one of these locks via a spinlock guard() when a GHES interrupt arrives on the same CPU, the IRQ handler spins on the held lock waiting for it to release, while the lock holder is preempted by the IRQ. The result is a deadlock. Convert both locks from spinlock_t to raw_spinlock_t and use guard() at all call sites. On PREEMPT_RT kernels spinlock_t is backed by rt_mutex and sleeping from hard IRQ context is not permitted; raw_spinlock_t is safe in both contexts. Add WARN_ONCE to both register functions to surface double-registration bugs at runtime. Restructure both unregister functions to clear the global work pointer under the lock before calling cancel_work_sync(), closing the window where a CPER interrupt could schedule work on a pointer about to be freed. Add kfifo_reset() after cancel_work_sync() so stale entries are not replayed on next module load. Both kfifos are single-consumer: only one work_struct is registered at a time, enforced by the WARN_ONCE guard in the register functions. kfifo_reset() is safe outside the lock because cancel_work_sync() has already quiesced the consumer, and no new consumer can register until the current module exit completes and a fresh module init runs. Remove the redundant cancel_work_sync() call from cxl_ras_exit() and cxl_pci_driver_exit(). The CPER unregister functions now quiesce the work internally. Reported-by: Sashiko <sashiko@linuxfoundation.org> Signed-off-by: Terry Bowman <terry.bowman@amd.com> Fixes: 5e4a264bf8b5 ("acpi/ghes: Process CXL Component Events") Fixes: 36f257e3b0ba ("acpi/ghes, cxl/pci: Process CXL CPER Protocol Errors") Cc: stable@vger.kernel.org Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Tony Luck <tony.luck@intel.com> Link: https://patch.msgid.link/20260803221810.3685703-4-terry.bowman@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05cxl/ras: Fix cxl_rch_get_aer_severity() wrong severity registerTerry Bowman
cxl_rch_get_aer_severity() classifies RCH Downstream Port uncorrectable errors as fatal or non-fatal by ANDing uncorrectable status with PCI_ERR_ROOT_FATAL_RCV. This is wrong because PCI_ERR_ROOT_FATAL_RCV is a Root Error Status register bit (bit 6), not a severity bit. ANDing it against uncorrectable status tests a reserved bit and produces incorrect severity classification. Fix by ANDing the unmasked uncor_status against uncor_severity. Per PCIe Base Spec r6.0 Section 7.8.4.4, each bit in the Uncorrectable Error Severity register indicates whether the corresponding error is fatal (1) or non-fatal (0). Fixes: 6ac07883dbb5 ("cxl/pci: Add RCH downstream port error logging") Cc: stable@vger.kernel.org Signed-off-by: Terry Bowman <terry.bowman@amd.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Richard Cheng <icheng@nvidia.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260803221810.3685703-3-terry.bowman@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05cxl/ras: Fix cxl_rch_get_aer_info() out-of-bounds AER register readTerry Bowman
cxl_rch_get_aer_info() copies the RCH Downstream Port AER capability from the RCRB MMIO block using a readl() loop bounded by sizeof(struct aer_capability_regs). This struct is a software layout and its embedded struct pcie_tlp_log is larger than the on-wire AER capability. As a result the loop reads past the mapped AER register block. The over-read also populates the software-only tail fields including header_log.header_len. An out-of-range header_len passed to pcie_print_tlp_log() can then loop past the header log buffer and cause a second out-of-bounds read. The read was correct when introduced, but struct pcie_tlp_log has since grown (Header Log and TLP Prefix Log sizes, header_len and flit fields), so sizeof(struct aer_capability_regs) no longer matches the physical AER capability. Bound the read to the physical AER registers, header through the 16 byte Header Log. Zero the destination first so the software-only fields are deterministic. Fixes: 6ac07883dbb5 ("cxl/pci: Add RCH downstream port error logging") Reported-by: Sashiko <sashiko@linuxfoundation.org> Cc: stable@vger.kernel.org Signed-off-by: Terry Bowman <terry.bowman@amd.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20260803221810.3685703-2-terry.bowman@amd.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05clk: rockchip: rk3576: fix source muxes for SPI0..SPI4Alexey Charkov
The TRM defines available source muxes for SPI0..SPI4 as - b00: clk_gpll_div6_src - b01: clk_gpll_div8_src - b10: clk_cpll_div10_src - b11: clk_xin_osc0_func Which doesn't match what the current clock driver implements, making it impossible to derive some SPI clock rates such as 37.125 MHz (which requires clk_gpll_div8_src as the source mux). Add a correct mux definition per TRM and point SPI0..SPI4 clocks at it. Fixes: cc40f5baa91b ("clk: rockchip: Add clock controller for the RK3576") Signed-off-by: Alexey Charkov <alchark@flipper.net> Link: https://patch.msgid.link/20260805-rk3576-spi-clk-v1-1-2f040d0d163b@flipper.net Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2026-08-05clk: rockchip: Add clock controller for the RV1106Simon Glass
Add the clock and reset controller driver for the Rockchip RV1106, based on the vendor kernel from the Luckfox Pico SDK [1] at commit 824b817f8 (a Linux 5.10.160 kernel tree), adapted to the upstream clock framework. The MMC drive and sample phase clocks have their control registers in the GRF region. The CRU provides these clocks itself, using the syscon referenced by the rockchip,grf property as an auxiliary regmap, in the same way as the RK3528. The RV1103 is a package variant of the RV1106 and uses the same CRU. [1] https://github.com/LuckfoxTECH/luckfox-pico Signed-off-by: Simon Glass <sjg@chromium.org> Link: https://patch.msgid.link/20260729133609.3465563-3-sjg@chromium.org Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2026-08-05dt-bindings: clock: rockchip: Add RV1106 CRU supportSimon Glass
Add the clock binding header and schema for the Rockchip RV1106 clock and reset unit. The clock IDs are numbered continuously from 0, in the same way as the RV1103B. The header also covers the MMC drive and sample phase clocks, which the CRU provides using control registers in the GRF region. The RV1103 is a package variant of the RV1106 and uses the same CRU. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260729133609.3465563-2-sjg@chromium.org Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2026-08-05Merge tag 'selinux-pr-20260805' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux fixes from Paul Moore: - Continue to improve the validation of SELinux policies during load - Fix a SELinux regression caused by bpffs changes in v7.2-rc1 - Fix a SELinux preformance regression caused by SELinux changes in v7.2-rc1 * tag 'selinux-pr-20260805' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: check level category sets once at load time selinux: require every boolean value to be defined selinux: reject an unclaimed class value in security_get_classes() selinux: require a class's permission values to cover its permission count selinux: do not cancel a policy conversion that never started selinux: bpf: check SBLABEL_MNT before isec init selinux: reject a class permission count below its inherited common selinux: reject a permission value exceeding the class permission count
2026-08-05bpf: Check sk_state before sk_protocol in bpf_tcp_*_syncookieLuxiao Xu
bpf_tcp_gen_syncookie and bpf_tcp_check_syncookie accept a socket pointer 'sk' with argument type ARG_PTR_TO_BTF_ID_SOCK_COMMON. However, they access sk->sk_protocol without validating whether 'sk' represents a full socket. Fix this issue by checking sk->sk_state != TCP_LISTEN before inspecting sk->sk_protocol in both bpf_tcp_gen_syncookie and bpf_tcp_check_syncookie. Since mini-sockets are never in the TCP_LISTEN state, the condition short-circuits and prevents dereferencing fullsock-specific fields. Fixes: 399040847084 ("bpf: add helper to check for a valid SYN cookie") Fixes: 70d66244317e ("bpf: add bpf_tcp_gen_syncookie helper") Reported-by: Vega <vega@nebusec.ai> Signed-off-by: Luxiao Xu <rakukuip@gmail.com> Signed-off-by: Ren Wei <enjou1224z@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://lore.kernel.org/bpf/6218aa3534d0d2d3f448fde70a8dc2769d7a8201.1785823138.git.rakukuip@gmail.com
2026-08-05Merge branch 'for-7.3/cxl-misc' into cxl-for-nextDave Jiang
cxl/test: Assign one mock memdev a full-width serial number cxl/core: Format the memdev serial number as unsigned in TP_printk cxl/pmem: Format the nvdimm serial number as unsigned decimal
2026-08-05cxl/test: Assign one mock memdev a full-width serial numberAlison Schofield
Mock memdev serial numbers have historically been derived from pdev->id, leaving them single-digit. As a result they never exercised either the decimal-vs-hex security-key lookup or unsigned formatting of large serial numbers. Give one mock memdev a full-width serial with bit 63 set. This mirrors real hardware (for example, Montage devices) and provides a test device that exposes both the hexadecimal-vs-decimal and signed-vs- unsigned formatting differences. pdev->id 7 is unused by the auto-region topology so the larger serial does not affect existing tests. This enables adding a new test case to cxl-security.sh that verify auto-unlock using a mock device whose serial exposes both formatting differences. Signed-off-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/3e569a748fce4424b8622032fbffc298d92153b9.1784924949.git.alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05cxl/core: Format the memdev serial number as unsigned in TP_printkAlison Schofield
The CXL memdev serial number is a u64 PCIe Device Serial Number, but the tracepoints format it with %lld. Devices whose vendor OUI sets bit 63 therefore appear with negative serial numbers in formatted trace output. Note that the trace data itself is already stored correctly as u64. Format the TP_printk serial as unsigned decimal, %llu, to match the underlying value. Signed-off-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/46651395b6c1e552ae2c4fecf3058a062eb0c3f0.1784924949.git.alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05cxl/pmem: Format the nvdimm serial number as unsigned decimalAlison Schofield
The CXL NVDIMM security passphrase key description and the nvdimm 'id' sysfs attribute are both derived from the CXL device serial number, but the serial number is not formatted consistently. The key description is formatted in hexadecimal while the 'id' attribute is formatted in decimal. As a result, ndctl stores the key using a decimal description while the kernel later looks it up using a hexadecimal description. For serial numbers of 10 and above, the descriptions no longer match, preventing automatic unlock after reboot. The decimal formatting has a second problem: both the key description and the 'id' attribute use the signed %lld format for a u64 PCIe Device Serial Number. Devices whose vendor OUI sets bit 63, such as Montage CXL devices, appear with negative decimal serial numbers. Format the security key description and 'id' attribute as unsigned decimal, %llu, and document that the 'id' attribute is an unsigned decimal value. The key lookup mismatch was exposed by CXL unit test cxl-security.sh when cxl_test mock serial numbers were extended to 10 and above. A work around is described for ndctl load-key users here: https://github.com/pmem/ndctl/issues/299 Cc: stable@vger.kernel.org Fixes: b5807c80b5bc ("cxl: add dimm_id support for __nvdimm_create()") Acked-by: Dan Williams <djbw@kernel.org> Signed-off-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/2c673a5ba0a8fa93ad160578e193bd556091fa95.1784924949.git.alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-08-05Merge branch 'html' into docs-mwJonathan Corbet
The current sidebar in the HTML version of the documentation does not display the section titles because the toctree directives in the top-level index.rst document do not contain ":caption:" properties. Replacing the current section titles by ":caption:" properties would not allow having text between those and the table of contents. To workaround this issue, add the ":caption:" properties in the toctree calls which makes them show up in the sidebar, but hide them from the index page with a custom CSS addition. Additionally, make the section titles in the sidebar bold to make them stand-out. This makes the overall structure of the documentation clearer from the sidebar directly. PS: This is how I've implemented this in the Yocto Project documentation[1] where I faced the same issue. See also the index.rst file[2] (which was by the way inspired by the kernel's own index.rst) and CSS addition[3]. [1]: https://docs.yoctoproject.org/dev/ [2]: https://git.yoctoproject.org/yocto-docs/tree/documentation/index.rst [3]: https://git.yoctoproject.org/yocto-docs/tree/documentation/sphinx-static/theme_overrides.css#n106 [jc: I tweaked the CSS slightly, any problems there are my fault]
2026-08-05Documentation: html: adjust sidebar section titles stylingAntonin Godard
Now that section titles are displayed in the sidebar, make them bold to have them stand out compared to the subsection titles, and decrease their bottom margin to group them with their subsections. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Tested-by: Randy Dunlap <rdunlap@infradead.org> [jc: tweaked the sidebar CSS slightly] Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260804-show-sections-in-sidebar-v2-2-a68d23bbc79d@bootlin.com>
2026-08-05drm/nouveau: Wire up dmem cgroupsNatalie Vock
Userspace can now make use of memory protection via dmem cgroups. Let nouveau benefit from this as well by registering the vram region with the dmem cgroup controller. This patch adapts the approach amdgpu and Xe have taken for enabling dmem cgroups. Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260410081322.5577-1-natalie.vock@gmx.de
2026-08-05Documentation: html: show sections in the sidebarAntonin Godard
The current sidebar in the HTML version of the documentation does not display the section titles because the toctree directives in the top-level index.rst document do not contain ":caption:" properties. Replacing the current section titles by ":caption:" properties would not allow having text between those and the table of contents. To workaround this issue, add the ":caption:" properties in the toctree calls which makes them show up in the sidebar, but hide them from the index page with a custom CSS addition. Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260804-show-sections-in-sidebar-v2-1-a68d23bbc79d@bootlin.com>
2026-08-05checkpatch.pl: adapt to new Assisted-by: formatJeff Layton
There is a new format for the 'Assisted-by:' tag. Change checkpatch.pl to just check that it has a value rather than testing for a specific format. Assisted-by: LLM Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260804-checkpatch-v1-1-27f29c79a46f@kernel.org>
2026-08-05MAINTAINERS: update Traditional Chinese documentation maintainersChen-Yu Yeh
The zh_TW translation has been unmaintained for about two years: the listed maintainer has been unreachable, and because no active maintainer was listed, get_maintainer.pl did not point contributors at anyone who could actually pick up a patch. My own zh_TW patch sat on the list for five weeks for exactly that reason. Following the discussion in [1] and the plan in [2], list the people who have stepped up to carry zh_TW forward, with a shift in focus towards Taiwanese Mandarin terminology rather than a plain simplified-to-traditional conversion. Move Hu Haowen to CREDITS and drop his personal repository links, which are no longer reachable. The current translation is built on his work, but MAINTAINERS is a list of who to contact, and the listed address has not answered zh_TW mail for about two years, which is what made zh_TW hard to contribute to in the first place. zh_TW stays a separate entry and is maintained separately from zh_CN; the two may share a tree for pull requests, but the review and terminology work is independent. [1] https://lore.kernel.org/linux-doc/<20260603082531.263115-1-chenyou910331@gmail.com>/ [2] https://lore.kernel.org/linux-doc/<amcZ5SI3-Hzw4HkJ@wyuan.org>/ Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com> Acked-by: Dongliang Mu <dzm91@hust.edu.cn> Acked-by: Weijie Yuan <wy@wyuan.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260804201012.110713-1-chenyou910331@gmail.com>
2026-08-05bpf: Harden bloom filter sizing and indexing on 32-bit kernelsJérémy Jean
bloom_map_alloc() has two 32-bit-specific problems when the computed bitmap reaches the U32_MAX fallback case. First, BITS_TO_BYTES(U32_MAX) is evaluated with 32-bit arithmetic. The addition performed by DIV_ROUND_UP wraps, so the map allocates only the fixed-size bloom filter object while keeping bitset_mask == U32_MAX. Subsequent updates can then write past the allocated object. Second, fixing only the allocation size is not sufficient. The bloom hash is a u32, but set_bit() takes a signed long bit number and x86 test_bit() eventually feeds the index to variable_test_bit(long, ...). On 32-bit kernels, hashes in [0x80000000, U32_MAX] therefore become negative bit offsets. x86 bt/bts with a memory operand interpret those offsets relative to the supplied base, so a map with bitset_mask == U32_MAX can read or write before bloom->bitset even after allocating the full 512 MiB bitmap. Keep the U32_MAX fallback, but split each hash into a word pointer and an in-word bit number before calling test_bit() or set_bit(). The bitops argument is then always in [0, BITS_PER_LONG - 1], while BIT_WORD(h) still selects the intended word in the full bitmap. Compute the bitset size from (u64)bitset_mask + 1 before passing the final size to bpf_map_area_alloc(). This fixes the original under-allocation and keeps the allocated storage consistent with the addressable bitset. Exploitation note: local privilege escalation is possible on a 32-bit x86 kernel using the under-allocation bug from a binary with CAP_BPF. Fixes: 9330986c0300 ("bpf: Add bloom filter map implementation") Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/bpf/20260805060228.2703051-1-Jeremy.Jean@oss.cyber.gouv.fr Assisted-by: Codex:gpt-5
2026-08-05Merge branch 'bpf-fix-sleepable-check-for-tracing-lsm-prog'Andrii Nakryiko
Leon Hwang says: ==================== bpf: Fix sleepable check for tracing/lsm prog When CONFIG_FUNCTION_ERROR_INJECTION is disabled, a sleepable tracing prog is allowed to attach to '__x64_'-alike prefix symbols. It is because the verifier does not verify whether the symbol is a kernel function or a bpf prog. That said, a sleepable tracing prog is allowed to attach to a bpf prog target whose name has '__x64_'-alike prefix. For example, a sleepable fentry prog attaches to a '__x64_sys_nop' XDP prog, and copies buffer from a user pointer with bpf_copy_from_user() helper. After attaching the XDP prog to lo interface, the kernel BUG could be triggered by 'ping -c 1 -W 1 127.0.0.1': [ 3.460756] BUG: sleeping function called from invalid context at kernel/bpf/trampoline.c:1324 Fix it by disallowing sleepable prog always when its target btf is not kernel's btf. Changes: v3 -> v4: * Move btf check outside of 'switch (prog->type)'. (per Andrii) * v3: https://lore.kernel.org/bpf/20260804145710.43062-1-leon.hwang@linux.dev/ v2 -> v3: * Use btf_is_kernel() instead of passing 'tgt_prog'. (per Andrii) * v2: https://lore.kernel.org/bpf/20260725132624.78373-1-leon.hwang@linux.dev/ v1 -> v2: * Drop redundant 'prog->sleepable' check. (per Viktor) * Collect Acked-by from Viktor, Thanks. * v1: https://lore.kernel.org/bpf/20260724141422.10463-1-leon.hwang@linux.dev/ ==================== Link: https://patch.msgid.link/20260805150810.34907-1-leon.hwang@linux.dev Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
2026-08-05selftests/bpf: Verify rejection of sleepable tracing progLeon Hwang
Add a test to verify that the sleepable tracing prog cannot attach to a '__x64_sys' prefix prog target. When CONFIG_FUNCTION_ERROR_INJECTION is disabled, without the fix, the test would trigger the BUG: [ 3.460756] BUG: sleeping function called from invalid context at kernel/bpf/trampoline.c:1324 Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20260805150810.34907-3-leon.hwang@linux.dev
2026-08-05bpf: Fix sleepable check for tracing/lsm progLeon Hwang
When CONFIG_FUNCTION_ERROR_INJECTION is disabled, a sleepable tracing prog is allowed to attach to '__x64_'-alike prefix symbols. It is because the verifier does not verify whether the symbol is a kernel function or a bpf prog. That said, a sleepable tracing prog is allowed to attach to a bpf prog target whose name has '__x64_'-alike prefix. For example, a sleepable fentry prog attaches to a '__x64_sys_nop' XDP prog, and copies buffer from a user pointer with bpf_copy_from_user() helper. After attaching the XDP prog to lo interface, the kernel BUG could be triggered by 'ping -c 1 -W 1 127.0.0.1': [ 3.460756] BUG: sleeping function called from invalid context at kernel/bpf/trampoline.c:1324 Fix it by disallowing sleepable prog always when its target btf is not a kernel's btf. Fixes: 16d9c5660692 ("bpf: Always allow sleepable programs on syscalls") Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Viktor Malik <vmalik@redhat.com> Link: https://lore.kernel.org/bpf/20260805150810.34907-2-leon.hwang@linux.dev
2026-08-05Merge branch 'bpf-disable-preemption-in-stack-map-code'Andrii Nakryiko
Jiri Olsa says: ==================== bpf: Disable preemption in stack map code hi, we need to disable preemption for get_perf_callchain and keep it disabled as long as we are accessing its returned trace entries buffer. This patchset refactors both bpf_get_stack and bpf_get_stackid helpers as suggested by Andrii [1] before applying the actual preemption fix. Note the initial fix was sent by Tao Chen [2], but there was no follow up on this since February, hence this post. thanks, jirka v1: https://lore.kernel.org/bpf/20260720085351.655075-1-jolsa@kernel.org/ v2: https://lore.kernel.org/bpf/20260729083807.1588544-1-jolsa@kernel.org/ v3 changes: - pass flags rgument to callchain_finalize [sashiko] - renamed err label to out in bpf_get_stackid_pe [sashiko] - used scoped_guard in bpf_get_stackid [Leon] - replaced trace->nr modification from *_pe helpers with length argument (new patches 11,12) [Andrii] v2 changes: - removed several unused functions arguments [sashiko] - restore trace-nr value fix in bpf_get_stack_pe [sashiko] - kept rcu locking together with preemption disable in __bpf_get_stack [sashiko] - clear buf on error paths in __bpf_get_task_stack [sashiko] [1] https://lore.kernel.org/bpf/CAEf4BzZwvAUgLwz-M0Y_NJLTmedyY9U6s7LrSmn751hQdTP4Uw@mail.gmail.com/ [2] https://lore.kernel.org/bpf/20260206090653.1336687-1-chen.dylane@linux.dev/ --- ==================== Link: https://patch.msgid.link/20260803210149.296496-1-jolsa@kernel.org Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
2026-08-05bpf: Avoid changing callchain in bpf_get_stackid_peJiri Olsa
There's no need to modify the trace object bpf_get_stackid_pe, we just need to pass the needed callchain length in separate argument. This way we can have callchain pointers const and remove the trace->nr modification and restoration. Assisted-by: Codex:GPT-5.5 Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20260803210149.296496-13-jolsa@kernel.org
2026-08-05bpf: Avoid changing callchain in bpf_get_stack_peJiri Olsa
There's no need to modify the trace object bpf_get_stack_pe, we just need to pass the needed callchain length in separate argument. This way we can have callchain pointers const and remove the trace->nr modification and restoration. Assisted-by: Codex:GPT-5.5 Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20260803210149.296496-12-jolsa@kernel.org