summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-07-29selftests/net: test PACKET_IGNORE_OUTGOINGJoe Damato
Test that setsockopt PACKET_IGNORE_OUTGOING: - works with valid values (0 and 1), - rejects values outside of that range, and When enabled for a loopback sniffer, it only produces 1 copy of the packet (rx) instead of two copies (tx and rx). Use sll_pkttype to check the direction of the packet to ensure the correct packet is sniffed. Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260728160935.4128982-6-joe@dama.to Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29selftests/net: psock_snd: Verify sll_pkttypeJoe Damato
Extend do_rx() to take an expected packet type. Existing callers pass -1 to skip the check. Signed-off-by: Joe Damato <joe@dama.to> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260728160935.4128982-5-joe@dama.to Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29selftests/net: psock_snd: unify on recvmsg()Joe Damato
Don't maintain two RX paths in do_rx(). Unify on recvmsg() and pass aux data only when needed. No functional change. Signed-off-by: Joe Damato <joe@dama.to> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260728160935.4128982-4-joe@dama.to Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29selftests/net: psock: Generalize stats checkJoe Damato
Generalize stats check code so that callers can specify the expected packets. Signed-off-by: Joe Damato <joe@dama.to> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260728160935.4128982-3-joe@dama.to Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29selftests/net: psock: Generalize psock bindJoe Damato
Generalize packet socket binding so that types other than ETH_P_IP can be used. Signed-off-by: Joe Damato <joe@dama.to> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20260728160935.4128982-2-joe@dama.to Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29netlink: specs: nl80211: fix TOOD -> TODOShaikh Kamaluddin
Fix spelling error reported by codespell in description strings: TOOD -> TODO. Attribute names are untouched. No functional change. Signed-off-by: Shaikh Kamaluddin <shaikhkamal2012@gmail.com> Reviewed-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260728154142.12133-1-shaikhkamal2012@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29riscv: vdso: Only try to install vDSO when presentThomas Weißschuh
vdso.so.dbg is only built with CONFIG_MMU. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202607090258.iSAUYlO1-lkp@intel.com/ Fixes: f157d411a9eb ("riscv: add missing vdso_install target") Fixes: 3edf39916977 ("vDSO, kbuild: Provide vDSO debug variants at runtime") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20260709-riscv-install-vdso-v1-1-0ba4345419ca@linutronix.de Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-07-29sctp: validate Adaptation Indication parameter lengthCharles Vosburgh
The Adaptation Layer Indication parameter contains a fixed 32-bit Adaptation Code Point after its parameter header. However, sctp_verify_param() accepts a header-only parameter because the generic parameter walker only requires the header to be present. sctp_process_param() then reads adaptation_ind beyond the declared parameter. When the malformed parameter is last in an INIT, the read starts at the receive skb tail, and the value is copied into the state cookie returned in the INIT ACK. This may disclose four receive-buffer tail bytes. Require the declared parameter length to match the fixed structure size and abort the association through the existing invalid parameter length path otherwise. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Charles Vosburgh <trilobyte777@gmail.com> Acked-by: Xin Long <lucien.xin@gmail.com> Link: https://patch.msgid.link/20260727-sctp-adaptation-length-v1-1-0ab58b2810a5@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29MAINTAINERS: make Luiz a maintainer and myself reviewer for Realtek DSAAlvin Šipraga
I have changed jobs and therefore no longer have access to hardware using Realtek Ethernet switches. Luiz has kindly agreed to take up the role of maintainer, while I will stick around as a reviewer. Also update .mailmap so that mails to my old company email stop bouncing. Use my new work email for Analog Devices Inc. instead. Signed-off-by: Alvin Šipraga <alvin.sipraga@analog.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Acked-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Link: https://patch.msgid.link/20260727-realtek-maintainers-v1-1-ab501adc0cdb@analog.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-30regulator: tps65185: handle gpiod_get_value_cansleep() error returnsSurendra Singh Chouhan
tps65185_vposneg_enable() evaluated: if (gpiod_get_value_cansleep(data->pgood_gpio) != 1) return -ETIMEDOUT; gpiod_get_value_cansleep() returns 1 if active, 0 if inactive, and a negative error code (e.g. -EIO or -EINVAL) on failure. Evaluating != 1 treats a negative error code as non-equal, swallowing GPIO read errors and masking them as -ETIMEDOUT. Fix this by capturing the return value of gpiod_get_value_cansleep(). If it returns a negative error code, propagate that error immediately; if it returns 0 (inactive), return -ETIMEDOUT. Fixes: b0fc1e770194 ("regulator: Add TPS65185 driver") Signed-off-by: Surendra Singh Chouhan <kr494167@gmail.com> Reviewed-by: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20260724125858.75635-1-kr494167@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-29ipv6: release fib6_null_entry on subtree failureShuangpeng Bai
When adding a source-specific route creates a new subtree, fib6_add() installs fib6_null_entry as the temporary leaf of the new subtree root and takes a fib6_info reference for that holder. If adding the first source leaf fails, the code frees the just allocated subtree root but leaves that hold behind. fib6_null_entry is a per-netns sentinel and is freed directly at netns teardown, so this does not keep the object alive. However, it leaves its visible refcount permanently elevated and can eventually saturate the refcount on repeated failures. Drop the null-entry reference before freeing the unlinked subtree root. Fixes: 5ea715289af6 ("ipv6: broadly use fib6_info_hold() helper") Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://patch.msgid.link/20260727185339.1545169-1-shuangpeng.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29psp: fix NULL genl_sock deref race with concurrent netns teardownKiran Kella
The race occurs between network namespace removal and PSP device unregistration. When a netns is deleted while a PSP device associated with that netns is concurrently being removed, psp_dev_unregister() triggers psp_nl_notify_dev() to send a device change notification. Concurrently, cleanup_net() running in the netns workqueue calls genl_pernet_exit(), which sets net->genl_sock to NULL. If genl_pernet_exit() wins the race, two sites in psp_nl_multicast_per_ns() then dereference the NULL socket and crash: CPU 0 (netns teardown) CPU 1 (PSP device unregister) ====================== ============================= cleanup_net [workqueue] genl_pernet_exit() psp_dev_unregister() net->genl_sock = NULL psp_nl_notify_dev() psp_nl_multicast_per_ns() build_ntf() -> netlink_has_listeners(NULL) /* crash */ genlmsg_multicast_netns() -> nlmsg_multicast_filtered(NULL) /* crash */ Fix by replacing the bare dev_net() calls with maybe_get_net(). maybe_get_net() returns NULL if the namespace is already dying. Holding the reference ensures genl_sock remains valid across both the build_ntf() and genlmsg_multicast_netns() calls. Fixes: 00c94ca2b99e ("psp: base PSP device support") Fixes: 06c2dce2d0f6 ("psp: add new netlink cmd for dev-assoc and dev-disassoc") Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Vikas Gupta <vikas.gupta@broadcom.com> Reviewed-by: Bhargava Marreddy <bhargava.marreddy@broadcom.com> Reviewed-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com> Signed-off-by: Kiran Kella <kiran.kella@broadcom.com> Link: https://patch.msgid.link/20260727101628.502042-1-kiran.kella@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29dibs: fix use-after-free of dmb_node in loopback attach/detach/unregisterHidayath Khan
dibs_lo_attach_dmb(), dibs_lo_detach_dmb() and dibs_lo_unregister_dmb() look up the dmb_node under dmb_ht_lock, drop the lock and only then operate on the node's refcount. Nothing keeps the node alive across that window: __dibs_lo_unregister_dmb() removes the node from the hash table under the write lock and immediately frees it. A concurrent final put can therefore free the node between the lookup and the refcount operation: CPU0 (attach) CPU1 (owner unregisters) read_lock_bh(&dmb_ht_lock) find dmb_node (refcnt == 1) read_unlock_bh(&dmb_ht_lock) refcount_dec_and_test() 1 -> 0 write_lock_bh(&dmb_ht_lock) hash_del(&dmb_node->list) write_unlock_bh(&dmb_ht_lock) kfree(dmb_node) refcount_inc_not_zero(&dmb_node->refcnt) <-- use-after-free The same window exists for the refcount_dec_and_test() calls in the detach and unregister paths. Close the race structurally by making hash table membership and the refcount transitions atomic with respect to each other: - Perform the final refcount_dec_and_test() and hash_del() in a single dmb_ht_lock write-side critical section, in both the unregister and the detach path. Freeing the node still happens after the lock is dropped, which is safe because a node whose refcount reached zero has left the hash table and can no longer be found. - This establishes the invariant that any node found in the hash table holds at least one reference, and that the final reference can only be dropped under the write lock. dibs_lo_attach_dmb() can thus take its reference with a plain refcount_inc() while still holding the read lock; refcount_inc_not_zero() is no longer needed. __dibs_lo_unregister_dmb() no longer touches the hash table and is renamed to dibs_lo_free_dmb() accordingly. Note: commit cc21191b584c ("dibs: Move data path to dibs layer") moved the code to its current location; the race was introduced earlier by commit c3a910f2380f ("net/smc: implement DMB-merged operations of loopback-ism"). Tested SMC-D via ISM and dibs loopback. Cc: stable@vger.kernel.org Fixes: c3a910f2380f ("net/smc: implement DMB-merged operations of loopback-ism") Reported-by: Rahul Chandelkar <rc@rexion.ai> Signed-off-by: Hidayath Khan <hidayath@linux.ibm.com> Reviewed-by: Alexandra Winter <wintera@linux.ibm.com> Link: https://patch.msgid.link/20260727093530.968834-1-hidayath@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29ring-buffer: Fix reader page read offset for remote buffersVincent Donnefort
A page swapped in by __rb_get_reader_page_from_remote() retains its stale read offset, causing subsequent reads to skip events or read past valid data. Fix it. Link: https://patch.msgid.link/20260729133609.4022734-1-vdonnefort@google.com Fixes: fbd1743ecba1 ("ring-buffer: Add non-consuming read for ring-buffer remotes") Signed-off-by: Vincent Donnefort <vdonnefort@google.com> Reviewed-by: Keir Fraser <keirf@google.com> Tested-by: Keir Fraser <keirf@google.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-07-29sctp: auth: discard auth_chunk when skb_clone failsQing Luo
When processing AUTH + COOKIE-ECHO packets, if skb_clone() fails due to memory pressure, chunk->auth_chunk is NULL. The original code still sets chunk->auth = 1 and continues, leaving the COOKIE-ECHO to be processed without a valid auth_chunk for deferred verification. Discard the AUTH chunk early via pdiscard when skb_clone() fails, so that the receive loop can continue processing remaining chunks in the inqueue instead of stalling the entire packet. Signed-off-by: Qing Luo <luoqing@kylinos.cn> Acked-by: Xin Long <lucien.xin@gmail.com> Link: https://patch.msgid.link/20260723061107.384106-1-l1138897701@163.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-29riscv: mm: Fix out-of-bounds page-table walk during memory hot-removeKarl Mehltretter
remove_pud_mapping() and remove_p4d_mapping() obtain a child table base with pud_offset(p4dp, 0) and p4d_offset(pgd, 0), then add the index for addr. RISC-V folds page-table levels at runtime. When a level is folded, its offset helper returns the parent entry itself, but the index can still be nonzero. Adding it walks past the parent table. Sv48 folds P4D, while Sv39 folds both P4D and PUD, so memory hot-remove can descend into unrelated memory and pass an invalid page to __free_pages(). This can trigger: kernel BUG at include/linux/mm.h:1810! VM_BUG_ON_PAGE(page_ref_count(page) == 0) arch_remove_memory+0x1e/0x5c try_remove_memory+0x15e/0x200 remove_memory+0x24/0x3c Only add the index when the corresponding page-table level is enabled, matching p4d_offset() and pud_offset(). Fixes: c75a74f4ba19 ("riscv: mm: Add memory hotplugging support") Assisted-by: Claude:claude-fable-5 Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Link: https://patch.msgid.link/20260729012132.24882-1-kmehltretter@gmail.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-07-30ASoC: ux500: preparation for Card capsulingMark Brown
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says: I will post Card capsuling patch. To makes its review easy, tidyup its drivers to reduce un-related diff as preparation. No functional change, but is preparation for cleanup driver. Link: https://patch.msgid.link/87fr1di08n.wl-kuninori.morimoto.gx@renesas.com
2026-07-30ASoC: ux500: mop500_ab8500: tidyup mop500_ab8500_remove()Kuninori Morimoto
It sets drvdata again in remove(), but it want to remove it. void mop500_ab8500_remove(...) { struct mop500_ab8500_drvdata *drvdata = snd_soc_card_get_drvdata(card); ... snd_soc_card_set_drvdata(card, drvdata); } ^^^^^^^ Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87cxwhi083.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: ux500: mop500: tidyup mop500_of_probe() parameterKuninori Morimoto
mop500.c will be updated when Card capsuling. To makes its review easy, tidyup mop500_of_probe() parameter. No functional change, but is preparation for cleanup driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87ecgxi087.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-29kbuild: rpm-pkg: Preserve BTF sections in kernel modules during debuginfo ↵Yafang Shao
stripping After switching to the kernel's default package scripts for our local kernel RPM builds, we noticed that module BTF entries were missing: $ ls /sys/kernel/btf/ vmlinux <<<< only vmlinux, no module BTF Root cause: find-debuginfo.sh (from the debugedit package) prefers eu-strip over strip when elfutils is installed, which is the common case on RHEL 9. eu-strip removes non-allocated ELF sections, including the .BTF section that contains BPF Type Format information for kernel modules. Without .BTF, BPF tools (bpftool, bcc, bpftrace) cannot resolve kernel types at runtime, and /sys/kernel/btf/<module> entries are not created when modules are loaded. Additionally, since commit 8646db238997 ("libbpf,bpf: Share BTF relocate-related code with kernel"), modules contain a .BTF.base section that maps distilled type IDs to vmlinux types. If .BTF.base is stripped, btf_parse_module() falls back to vmlinux BTF directly, causing type ID mismatches and rejecting the module's BTF entirely. Fix by passing --keep-section .BTF and --keep-section .BTF.base via _find_debuginfo_opts, which adds -K .BTF and -K .BTF.base to the eu-strip/strip command, preserving both sections while allowing normal debuginfo extraction to proceed. After this change, all module BTF files are properly generated: $ ls /sys/kernel/btf/ aesni_intel drm i2c_i801 mfd_core ahci drm_client_lib i2c_mux net_failover backlight drm_kms_helper i2c_smbus pcspkr ccp drm_shmem_helper input_leds qemu_fw_cfg dm_log failover intel_rapl_common sch_fq_codel dm_mirror fat intel_rapl_msr serio_raw dm_mod fuse irqbypass sunrpc dm_region_hash gf128mul iTCO_wdt vfat virtio_balloon virtio_console virtio_dma_buf virtio_gpu virtio_net virtio_rng virtio_blk vmlinux xfs Suggested-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Cc: Alan Maguire <alan.maguire@oracle.com> Link: https://patch.msgid.link/20260728024950.44946-1-laoar.shao@gmail.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2026-07-29dt-bindings: mediatek: cec: Correct the compatibles for mt7623-mt8167Luca Leonardo Scorcia
The HDMI CEC driver for both mt7623 and mt8167 is actually the same as mt8173-cec and the mt7623n.dtsi board include file already uses mt8173-cec compatible as a fallback, but the documentation lists them as separate entries. Correct the binding by adding the correct fallback. This change fixes the following dtbs_check errors: DTC [C] arch/arm/boot/dts/mediatek/mt7623n-rfb-emmc.dtb cec@10012000 (mediatek,mt7623-cec): compatible: ['mediatek,mt7623-cec', 'mediatek,mt8173-cec'] is too long DTC [C] arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dtb cec@10012000 (mediatek,mt7623-cec): compatible: ['mediatek,mt7623-cec', 'mediatek,mt8173-cec'] is too long Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20260624173627.19785-1-l.scorcia@gmail.com/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
2026-07-30ASoC: stm: Drop redundant error messageMark Brown
bui duc phuc <phucduc.bui@gmail.com> says: This series removes redundant error messages across multiple STM32 ASoC drivers. Since core functions already log failures internally, dropping these explicit dev_err() blocks prevents duplicate log messages and cleans up the code. Compile-tested only. Link: https://patch.msgid.link/20260720074044.87528-1-phucduc.bui@gmail.com
2026-07-30ASoC: stm: stm32_spdifrx: Drop redundant error messagesbui duc phuc
Both devm_request_irq() and snd_dmaengine_pcm_register() already log failures internally. Drop the redundant error messages and return the original errors directly. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260720074044.87528-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: stm: stm32_sai_sub: Drop redundant error messagesbui duc phuc
Both devm_request_irq() and snd_dmaengine_pcm_register() already log failures internally. Drop the redundant error messages and return the original errors directly. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260720074044.87528-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: stm: stm32_i2s: Drop redundant error messagesbui duc phuc
Both devm_request_irq() and snd_dmaengine_pcm_register() already log failures internally. Drop the redundant error messages and return the original errors directly. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260720074044.87528-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: stm: stm32_adfsdm: Drop redundant error messagebui duc phuc
devm_snd_soc_register_component() already logs the failure internally. Drop the redundant error message and return the original error directly. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260720074044.87528-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: tlv320aic32x4: clean up driver code formatting and loggingDmitry Torokhov
Clean up coding style, SPDX comments, logging calls, and macro definitions across the tlv320aic32x4 driver files: - Convert SPDX comment blocks to // style in bus and clk drivers. - Replace printk(KERN_ERR/DEBUG ...) calls with dev_err/dev_dbg. - Replace msleep(10) with usleep_range(10000, 20000) in the clock driver. - Parenthesize parameters in AIC32X4_REG macro. - Clean up double blank lines and null pointer checks. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260726010519.117805-7-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: tlv320aic32x4: factor out rate configuration helperDmitry Torokhov
Factor out sample-rate dependent parameter setup and processing block configuration into a separate helper function aic32x4_configure_rate. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260726010519.117805-6-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: tlv320aic32x4: do not make clocks bulk data staticDmitry Torokhov
Declaring local clk_bulk_data structures as static inside functions is bad practice even if the driver is currently a singleton, because it relies on mutable function-static state and interferes with multi-instance safety or clean re-probing. Remove static from the clocks bulk data arrays across the driver. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260726010519.117805-5-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: tlv320aic32x4: move regmap_config into i2c and spi driversDmitry Torokhov
Move regmap_config definitions to be static const structures in tlv320aic32x4-i2c.c and tlv320aic32x4-spi.c instead of dynamically modifying a shared base regmap_config at runtime during probe. Export aic32x4_regmap_pages so both bus drivers can reference page ranges. In addition, validate regmap initialization immediately upon creation in both bus probe routines and remove the redundant error check from core aic32x4_probe. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260726010519.117805-4-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: tlv320aic32x4: consolidate programming functionsDmitry Torokhov
Consolidate setting up of GPIO functions instead of repeating almost the same code block 5 times. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260726010519.117805-3-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: tlv320aic32x4: do not allocate gpio config separatelyDmitry Torokhov
Now that the driver only works with device tree we do not need to keep GPIO config separate from the driver structure. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260726010519.117805-2-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-30ASoC: tlv320aic32x4: remove global header with platform dataDmitry Torokhov
Commit 69d5b62c4bde ("ASoC: codec: tlv320aic32x4: Drop aic32x4_pdata usage") removed support for platform data, but left a global header file with #defines and platform data structure. Move the contents to the driver-private header. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20260726010519.117805-1-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-29apparmor: compressed_data not described in aa_get_data_from_compressedJohn Johansen
Warning: security/apparmor/apparmorfs.c:501 function parameter 'compressed_data' not described in 'aa_get_data_from_compressed' Warning: security/apparmor/apparmorfs.c:501 function parameter 'compressed_data' not described in 'aa_get_data_from_compressed' Warning: security/apparmor/apparmorfs.c:501 function parameter 'compressed_data' not described in 'aa_get_data_from_compressed' Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202607240144.4iqulDF1-lkp@intel.com/ Signed-off-by: John Johansen <john.johansen@canonical.com>
2026-07-29ARM: dts: BCM5301X: EA9200: fix NVRAM sizeRosen Penev
Fixes: [ 0.182121] WARNING: CPU: 0 PID: 1 at drivers/nvmem/brcm_nvram.c:85 brcm_nvram_probe+0x400/0x480 [ 0.182159] Unexpected (big) NVRAM size: 1056112 B Fixes: 90a77291ac09 ("ARM: dts: BCM5301X: R8000 add NVRAM with MAC address for WAN port") Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://lore.kernel.org/r/20260628231049.1248899-1-rosenp@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2026-07-29ARM: dts: BCM5301X: fix PCIe controller 2 second interruptRosen Penev
PCIe controller 2 has interrupts 0-4 mapping to GIC SPI 138-142. The mapping for interrupt 1 was incorrectly set to 138 due to a copy-paste error. Fix it to 139. Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://lore.kernel.org/r/20260725215722.9323-1-rosenp@gmail.com Fixes: 3b3e35b279be ("ARM: dts: BCM5301X: Relicense AXI interrupts code to the GPL 2.0+ / MIT") Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2026-07-30s390/configs: Increase CONFIG_LOCKDEP_CHAINS_BITSChristian Borntraeger
With btrfs and other complex code paths the message BUG_MAX_LOCKDEP_CHAIN_HLOCKS_TOO_LOW is triggered. To avoid disabling lockdep increase CONFIG_LOCKDEP_CHAINS_BITS to 18. Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390: Add support for DCACHE_WORD_ACCESS (again)Heiko Carstens
Implement load_unaligned_zeropad() and enable DCACHE_WORD_ACCESS to speed up string operations in fs/dcache.c and fs/namei.c. With the secure storage access exception cases addressed, add support for DCACHE_WORD_ACCESS again. Tested-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/mm: Use goto statement in do_secure_storage_access()Heiko Carstens
Make do_secure_storage_access() look more like the do_exception() by using a goto statement to get rid of an extra open coded mmap_read_unlock() call. Just cosmetic, no functional change. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/mm: Use handle_fault_error() in do_secure_storage_access()Heiko Carstens
Similar to the normal exception handler use handle_fault_error() which handles accesses from user space and kernel space differently. This also addresses failing kernel accesses via e.g. copy_from_user() to user space: instead of an endless loop, the fixup handling is performed. Even though this could only happen if arch_make_folio_accessible() would permanently fail, which is not realistic. Therefore this is rather a cleanup patch. Acked-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/mm: Remove folio handling for kernel faults in do_secure_storage_access()Heiko Carstens
Remove folio handling for secure storage access exceptions that happen via the kernel mapping. Using folio_try_get() for exceptions via the kernel mapping is racy: for example such an exception may happen on one CPU, while a different CPU frees the corresponding page. Subsequently the page can be part of a folio of different size, before the faulting CPU executes folio_try_get(). This may lead to data corruption. As of now this scenario does not seem to be possible, however with the upcoming load_unaligned_zeropad() this is possible. As a side effect PG_arch_1 is not cleared anymore for such faults via the kernel mapping. However given that this bit is over-indicating it shouldn't matter. Tested-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/mm: Fix handling of vmalloc area in do_secure_storage_access()Heiko Carstens
Secure storage access exceptions in vmalloc area need to be handled separately since virt_to_phys() does not work on such addresses. Given that there cannot be a valid access let such exceptions fail immediately. The kernel will either fixup or crash. Tested-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>> --- Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/mm: Use lock_mm_and_find_vma() in do_secure_storage_access()Heiko Carstens
do_secure_storage_access() uses find_vma() without verifying that the faulting address is within the returned vma. Add this missing check by converting to lock_mm_and_find_vma(). This is not a critical fix, since the worst that could happen is a WARN_ON_ONCE() in folio_walk_start(). Reported-by: sashiko-bot <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/all/20260717093904.E4A421F00A3E@smtp.kernel.org/ Link: https://lore.kernel.org/all/20260717093904.E4A421F00A3E@smtp.kernel.org/ Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/mm: Add missing mm check to do_secure_storage_access()Heiko Carstens
Similar like the normal exception handler the secure storage access exception handler needs to verify if mm is not NULL, which may happen with kernel threads. Reported-by: sashiko-bot <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/all/20260717132345.539A11F00A3A@smtp.kernel.org/ Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>> --- Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30KVM: s390: pv: Use VM_SPARSE area for guest variable storage areaHeiko Carstens
The guest variable storage area is allocated with vmalloc and then donated to the ultravisor. Any kernel access to that area will result in a secure storage access exception (aka fault). This is a problem if such a memory area is read via /proc/kcore. This causes an exception via vread_iter() and results in an unexpected short read. Avoid this by allocating a custom VM_SPARSE area. If such an area is read, vread_iter() returns zeroes for the entire area. Note that the function which frees the area does not update ptes. This is intentional to allow for deferred / lazy pte updates and TLB flushing like the generic vfree() code is doing that. See vunmap_pte_range(). This assumes that s390 will gain full support for lazy_mmu_mode_enable() and lazy_mmu_mode_disable() in the future, since as of now the used ptep_get_and_clear() in vunmap_pte_range() does indeed invalidate and flush every single pte entry, but only for s390. Tested-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/spinlock: Add contention tracepoints to lock slowpathCiunas Bennett
Instrument arch_spin_lock_wait() with trace_contention_begin() and trace_contention_end(). These tracepoints are used by lock contention analysis tools such as perf lock contention to identify contended locks and measure wait times. Both the generic implementation and powerpc emit the same events from their spinlock slow path. Place the tracepoints in arch_spin_lock_wait(), which is only entered when lock acquisition falls back to the contention path. Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Ciunas Bennett <ciunas@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/ipl: Improve readabilityMete Durlu
Use explicit decleration on all shutdown_action/shutdown_trigger declerations and reformat shutdown_actions_list decleration to improve readability. No functional changes. Signed-off-by: Mete Durlu <meted@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/ipl: Use ARRAY_SIZE macroMete Durlu
Use ARRAY_SIZE macro instead of reimplementing it. Signed-off-by: Mete Durlu <meted@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/maccess: Use proper PTE accessors for copying old memoryAlexander Gordeev
Follow the pattern established by commit c33c794828f2 ("mm: ptep_get() conversion") and use proper PTE accessors instead of a direct pointer dereference in memcpy_real_iter(). Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2026-07-30s390/pkey: Rework ioctl functions error pathsHarald Freudenberger
With the pkey rework there was the suggestion to rework the error and free paths of the pkey ioctl functions. The complain was especially to rewrite the failure handling with goto instead of all repeat the nearly same code (kfree(), kfree_sensitive(), memzero_explicit()) for each path. This patch removes all this duplicated code and introduces one code block at the end of the functions which is jumped into via goto out or executed on regular exit. As some helper functions return an error pointer value (which is NOT NULL) make sure on the error path there is not by accident kfree() or similar called on such ptr values. Suggested-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>