aboutsummaryrefslogtreecommitdiffstatshomepage
AgeCommit message (Collapse)AuthorFilesLines
2026-07-20fscrypt: Fully disallow IV_INO_LBLK_32 with s_blocksize != PAGE_SIZEEric Biggers3-13/+20
FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 with s_blocksize != PAGE_SIZE works only with the fs-layer implementation of file contents encryption, not blk-crypto. This is a problem for standardizing on blk-crypto. Fortunately, no one should be using this combination anyway. It doesn't make sense because the entire point of IV_INO_LBLK_32 is to support inline encryption hardware that is limited to 32-bit DUNs. Thus, fully disallow IV_INO_LBLK_32 with s_blocksize != PAGE_SIZE. Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260713023708.9245-5-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20blk-crypto: Allow control over whether hardware is usedEric Biggers4-4/+27
fscrypt uses inline encryption hardware only when the "inlinecrypt" mount option is given. I'd like to keep that behavior even after standardizing on the blk-crypto API for file contents encryption. That is, the default should continue to be the well-tested CPU-based encryption code, and the use of inline encryption hardware should continue to be an opt-in feature for systems where it's beneficial and has been fully validated (including verifying ciphertext correctness). To support this use case, extend blk_crypto_config with a new flag BLK_CRYPTO_CFG_ALLOW_HW. For now it's always set. Later commits will change that. Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260713023708.9245-4-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20blk-crypto: Fold __blk_crypto_cfg_supported() into its callerEric Biggers3-27/+21
__blk_crypto_cfg_supported() is called only by blk_crypto_config_supported_natively(), so fold it in. Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260713023708.9245-3-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20blk-crypto: Simplify check for fallback supportEric Biggers1-2/+1
Since blk-crypto-fallback supports all blk_crypto_keys except wrapped keys, just check for that condition directly instead of using __blk_crypto_cfg_supported(). With this done, __blk_crypto_cfg_supported() is now used only for the hardware support. Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260713023708.9245-2-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20fscrypt: Remove workaround for bug in gcc 7 and earlierEric Biggers1-15/+2
Since the kernel's minimum gcc version is now 8.1, the workaround for a strange gcc bug in fscrypt_ioctl_set_policy() is no longer needed. Link: https://patch.msgid.link/20260619051008.51223-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20fscrypt: Simplify handling of errors during initcallEric Biggers3-34/+13
Since CONFIG_FS_ENCRYPTION is a bool, not a tristate, fs/crypto/ can only be builtin or absent entirely; it can't be a loadable module. Therefore, the error code that gets returned from the fscrypt_init() initcall is never used. If any part of the initcall does fail, which should never happen, the kernel will be left in a bad state. Following the usual convention for builtin code, just panic the kernel if any of part of the initcall fails. This simplifies the code. This closely mirrors commit e77000ccc531 ("fsverity: simplify handling of errors during initcall"). Link: https://patch.msgid.link/20260619000030.166851-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20fscrypt: Remove FSCRYPT_MODE_MAXEric Biggers4-10/+0
Now that the arrays of per-mode keys in struct fscrypt_master_key have been replaced by a linked list, the definition of FSCRYPT_MODE_MAX doesn't do anything useful. (Previously it was used to size these arrays.) Remove it. Link: https://patch.msgid.link/20260618231404.132829-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20fscrypt: Avoid dynamic allocation in fscrypt_get_devices()Eric Biggers3-56/+44
When a blk_crypto_key starts being used or is evicted, fs/crypto/ calls fscrypt_get_devices() to get the filesystem's list of block devices, then iterates over them and calls blk_crypto_config_supported(), blk_crypto_start_using_key(), or blk_crypto_evict_key() on each one. Currently, the block device pointers are placed in a dynamically allocated array. This dynamic allocation is problematic because: - It can fail, especially at the fscrypt_destroy_inline_crypt_key() call site when it's invoked for inode eviction under direct reclaim. - fscrypt_destroy_inline_crypt_key() doesn't handle the failure. It just zeroizes and frees the blk_crypto_key without calling blk_crypto_evict_key(). That causes a use-after-free. For now, let's fix this in the straightforward and easily-backportable way by switching to an on-stack array. Currently the fscrypt multi-device functionality is used only by f2fs, which has a hardcoded limit of 8 block devices. An on-stack array works fine for that. (Of course, this solution won't scale up to large number of block devices. For that we'd need a different solution, like moving the block device iteration into the filesystem. Or in the case of btrfs, which will only support blk-crypto-fallback, we should make it just call blk-crypto-fallback directly, so the block devices won't be needed.) Fixes: 22e9947a4b2b ("fscrypt: stop holding extra request_queue references") Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260713023708.9245-1-ebiggers%40kernel.org Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260719055602.78828-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20fscrypt: Use lock guards for mutexesEric Biggers3-22/+15
Replace all remaining calls to mutex_lock() and mutex_unlock() in fs/crypto/ with lock guards. No functional change. Link: https://patch.msgid.link/20260618184852.3469301-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20fscrypt: Add missing superblock check in find_or_insert_direct_key()Eric Biggers1-1/+7
The legacy 'fscrypt_direct_keys' table caches master keys that are used by v1 encryption policies that have FSCRYPT_POLICY_FLAG_DIRECT_KEY. It's just a global table for all filesystems (since the keys can be provided by the legacy process-subscribed keyrings mechanism, which makes it difficult to reuse super_block::s_master_keys). The entries in it ('struct fscrypt_direct_key') do contain a super_block pointer, though, for passing to fscrypt_destroy_inline_crypt_key() when the last inode that references the key is evicted. However, when finding the fscrypt_direct_key for an inode, we weren't actually comparing the super_block pointer. As a result, inodes with different super_blocks could point to the same fscrypt_direct_key. That could extend the lifetime of a fscrypt_direct_key beyond the super_block it points to, causing a use-after-free later. Fix this by creating distinct fscrypt_direct_key structs for distinct super_block structs. Note that this problem doesn't exist in the v2 policy equivalent ("per-mode keys"), since the data structures there are per super_block. Fixes: 22e9947a4b2b ("fscrypt: stop holding extra request_queue references") Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260717044303.425265-1-ebiggers%40kernel.org Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20260719033120.122120-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
2026-07-20remoteproc: Remove redundant dev_err()/dev_err_probe()Pan Chuang8-31/+12
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in devm_request_*_irq()"), devm_request_irq() and devm_request_threaded_irq() automatically log detailed error messages on failure. Remove the now-redundant driver-specific dev_err() and dev_err_probe() calls. Signed-off-by: Pan Chuang <panchuang@vivo.com> Acked-by: Paul Cercueil <paul@crapouillou.net> # Ingenic Link: https://lore.kernel.org/r/20260717065224.600593-1-panchuang@vivo.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2026-07-20remoteproc: Add AMD MicroBlaze/V BRAM-based remote processor driverBen Levinsky3-0/+223
Add a remoteproc driver for AMD MicroBlaze/V soft-core processor subsystems instantiated in programmable logic and using dual-port BRAM for firmware storage and execution. The driver parses the firmware memory window from the remoteproc device node's reg property, interprets that address and size in the processor-local address space, and then uses standard devicetree address translation through the parent bus ranges property to obtain the corresponding Linux-visible system physical address. The resulting translated region is registered as the executable remoteproc carveout and coredump segment. The processor is controlled through an active-low reset GPIO and a subsystem clock. The clock is enabled before reset is released, and the processor is kept in reset until firmware loading completes. The firmware-name property is optional, allowing firmware to be assigned later through the remoteproc framework. Firmware images without a resource table are also accepted. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com> Link: https://lore.kernel.org/r/20260714202441.554065-3-ben.levinsky@amd.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2026-07-20dt-bindings: remoteproc: Document AMD MicroBlaze/V BRAM-based rprocBen Levinsky1-0/+105
Describe an AMD MicroBlaze/V BRAM-based remote processor controlled through the remoteproc framework. The binding models a soft-core processor subsystem instantiated in AMD programmable logic and using dual-port BRAM for firmware storage and execution. The remoteproc device is represented as a child node whose reg property describes the firmware memory window in the processor-local address space. The parent bus node provides standard devicetree address translation through ranges so Linux can access the same BRAM through the system physical address space. A clock input feeds the soft-core processor subsystem, and an active-low reset GPIO holds the processor in reset until firmware loading completes. The firmware-name property is optional. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Ben Levinsky <ben.levinsky@amd.com> Link: https://lore.kernel.org/r/20260714202441.554065-2-ben.levinsky@amd.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2026-07-20x86/bugs: Don't use cpu-type matching in cpu_vuln_blacklistPawan Gupta1-8/+17
Thomas Gleixner pointed out that cpu-type is a per-CPU property while hybrid is a system property; conflating the two in the CPU matching infrastructure is wrong. Currently, on a hybrid system x86_match_cpu() matches any cpu-type. This works if the intent is to find the possibility of a cpu-type in a system. But fails if matching for the cpu-type of a given CPU. Borislav posted a cleanup here: https://lore.kernel.org/all/20260703193222.GFakgORjvxwnZTPRnI@fat_crate.local To make way for the cleanup stop matching cpu-type in cpu_vuln_blacklist. RFDS is the only user, so drop the VULNBL_INTEL_TYPE entries and fold their RFDS bit into the base Alder Lake (0x97) and Raptor Lake (0xB7) blacklist entries. For now open-code cpu-type check in vulnerable_to_rfds(). In the future, if more vulnerabilities need cpu-type matching a helper can be added. No functional change intended. Fixes: 722fa0dba74f ("x86/rfds: Exclude P-only parts from the RFDS affected list") Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260708-cpu-type-vuln-v1-1-85c1d3c704db@linux.intel.com
2026-07-20arm64: dts: add devicetree for TQMa91xx on MBa93xxCAMarkus Niebel2-0/+938
This allows using TQMa91xxCA / TQMa91xxLA SoM on MBa93xxCA starter kit. While not having display all other interfaces of this mainboard can be used. Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20dt-bindings: arm: add MBa93xxCA as mainboard for TQMa91xxCA and TQMa91xxLA SOMMarkus Niebel1-2/+4
TQMa91xxLA and TQMa91xxCA are two series of feature compatible SOM using NXP i.MX91 SoC in 11x11 mm package. MBa93xxCA is a starterkit base board usable for TQMa91xxCA and TQMa91xxLA soldered on an adapter board to demonstrate use cases without display but more interfaces. Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20drm/panfrost: Remove unused scheduled_jobs listMaíra Canal2-2/+0
The scheduled_jobs list head was introduced in commit f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") but never used. Remove the dead field and its initialization. Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com> Link: https://patch.msgid.link/20260710121423.2820472-2-mcanal@igalia.com Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
2026-07-20arm64: dts: imx8-ss-audio: Fix LPCG clock indices for ASRC0Frank Li1-4/+4
The LPCG clock indices for ASRC0 and AUD_PLL_DIV0 are swapped. The ASRC0 LPCG provides only IMX_LPCG_CLK_4, so update the ASRC0 clock consumer to use IMX_LPCG_CLK_4 instead of the non-existent IMX_LPCG_CLK_0. Likewise, the AUD_PLL_DIV0 LPCG provides only IMX_LPCG_CLK_0, so update its clock consumer to use IMX_LPCG_CLK_0 instead of the non-existent IMX_LPCG_CLK_4. Fixes: 5125617c7a4d3 ("arm64: dts: imx8qxp: add asrc[0,1], esai0, spdif0 and sai[4,5]") Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20arm64: dts: imx8qm-ss-lsio: add lsio mu8 and mu8bFrank Li1-0/+21
Add mu8 and mu8b mailbox nodes. Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20arm64: dts: imx8qm-ss-audio: add spdif1 nodeFrank Li1-0/+38
Add spdif1 and related lpcg node for imx8qm. Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20arm64: dts: imx8qm-ss-dma: add lpuart4 nodeFrank Li1-0/+15
Add lpuart4 node for imx8qm. Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: imx6ull-engicam-microgea: remove nand-ecc-strength and nand-ecc-step-sizeFrank Li1-2/+0
The nand-ecc-strength and nand-ecc-step-size is bigger than 0. It doesn't make sense to set to 0. Remove it to fix below DTB_CHECKS warnings: arch/arm/boot/dts/nxp/imx/imx6ull-engicam-microgea-bmm.dtb: nand-controller@1806000 (fsl,imx6q-gpmi-nand): nand-ecc-strength: 0 is less than the minimum of 1 Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: imx6ul-isiot: remove undocument property clock-names of fsl,sgtl5000Frank Li1-1/+0
Remove undocument property clock-names of fsl,sgtl5000 to fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/imx/imx6ul-isiot-nand.dtb: codec@a (fsl,sgtl5000): Unevaluated properties are not allowed ('clock-names' was unexpected) from schema $id: http://devicetree.org/schemas/sound/fsl,sgtl5000.yaml Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: imx53-smd: remove undocument property clock-names of ovti,ov5642Frank Li1-1/+0
Remove undocument properties ovti,ov5642 to fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/imx/imx53-smd.dtb: ov5642@3c (ovti,ov5642): 'clock-names' does not match any of the regexes: '^pinctrl-[0-9]+$' from schema $id: http://devicetree.org/schemas/media/i2c/ovti,ov5642.yaml Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: imx6dl-plym2m: change #io-channel-cells to 1 of voltage dividerFrank Li1-2/+2
Change #io-channel-cells to 1 of voltage divider to fix below CHENCK_DTBS warnings: arch/arm/boot/dts/nxp/imx/imx6dl-plym2m.dtb: voltage-divider-vaccu (voltage-divider): #io-channel-cells: 1 was expected from schema $id: http://devicetree.org/schemas/iio/afe/voltage-divider.yaml Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20regulator: mt6358: use regmap helper to read fixed LDO calibrationDaniel Golle1-1/+1
The "fixed" LDOs with output voltage calibration use mt6358_get_buck_voltage_sel as their get_voltage_sel op, but the MT6358_REG_FIXED and MT6366_REG_FIXED entries do not populate da_vsel_reg/da_vsel_mask. The op therefore reads register 0x0 with a zero mask and shifts the result by ffs(0) - 1 = -1, which is undefined behaviour and gets flagged by UBSAN on every boot on MT6366 boards: UBSAN: shift-out-of-bounds in drivers/regulator/mt6358-regulator.c:384:38 shift exponent -1 is negative Call trace: mt6358_get_buck_voltage_sel+0xc8/0x120 regulator_get_voltage_rdev+0x70/0x170 set_machine_constraints+0x504/0xc38 regulator_register+0x324/0xc68 Besides the undefined shift, the returned selector is always 0, so the actual calibration offset programmed in <reg>_ANA_CON0 is never reported. The descriptor already carries the correct vsel_reg/vsel_mask (the ANA_CON0 calibration field), matching the regulator_set_voltage_sel_regmap op already in use. Read the selector back through regulator_get_voltage_sel_regmap instead. Fixes: cf08fa74c716 ("regulator: mt6358: Add output voltage fine tuning to fixed regulators") Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Chen-Yu Tsai <wens@kernel.org> Tested-by: Chen-Yu Tsai <wens@kernel.org> Link: https://patch.msgid.link/dcd98d81dede338c9bbb9700a9613c848b702e49.1784336005.git.daniel@makrotopia.org Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-20ARM: dts: ls1021a-moxa-uc-8410a: remove undocument property default-state of gpio-keysFrank Li1-1/+0
default-state = "on" is wrong copied from gpio-leds nodes. Remove it to fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/ls/ls1021a-moxa-uc-8410a.dtb: gpio-keys (gpio-keys): pushbtn-key: Unevaluated properties are not allowed ('default-state' was unexpected) from schema $id: http://devicetree.org/schemas/input/gpio-keys.yaml Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: ls1021a-moxa-uc-8410a: replace spansion,s25fl164k with jedec,spi-norFrank Li1-1/+1
spansion,s25fl164k (drivers/mtd/spi-nor/spansion.c) can be identified with the READ ID opcode (0x9F). Replace spansion,s25fl164k with jedec,spi-nor to fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/ls/ls1021a-moxa-uc-8410a.dtb: /soc/spi@1550000/flash@0: failed to match any schema with compatible: ['spansion,s25fl064l', 'spansion,s25fl164k'] So no other known DTB user this dts file and it is fine to broken potential back compatibility since spansion,s25fl164k already support by use jedec,spi-nor since 2015 commit 413780d7d7040 ("mtd: spi-nor: Add support for Spansion S25FL164K") Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: ls1021a-moxa-uc-8410a: use compatible string ethernet-phy-ieee802.3-c22Frank Li1-3/+3
Replace marvell,88e1118 with ethernet-phy-ieee802.3-c22. In drivers/net/mdio/of_mdio.c /* The following is a list of PHY compatible strings which appear in * some DTBs. The compatible string is never matched against a PHY * driver, so is pointless. We only expect devices which are not PHYs * to have a compatible string, so they can be matched to an MDIO * driver. Encourage users to upgrade their DT blobs to remove these. */ static const struct of_device_id whitelist_phys[] Fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/ls/ls1021a-moxa-uc-8410a.dtb: /soc/mdio@2d24000/ethernet-phy@0: failed to match any schema with compatible: ['marvell,88e1118'] No other known DTB user this dts file. Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: ls1021a-twr: add power-supply for lcd panelFrank Li1-0/+1
Add power-supply for lcd panel to fix below CHECK_DTBS warnings: arch/arm/boot/dts/nxp/ls/ls1021a-twr.dtb: panel (nec,nl4827hc19-05b): 'power-supply' is a required property Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: ls1021a-moxa-uc-8410a: add led suffix to fix CHECK_DTBS warningsFrank Li1-10/+10
Add led suffix to fix below CHECK_DTBS warnings: ls1021a-moxa-uc-8410a.dtb: leds (gpio-leds): 'beeper', ... do not match any of the regexes: '(^led-[0-9a-f]$|led)', '^pinctrl-[0-9]+$' Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20ARM: dts: imx53-ard: change node name eim-cs1 to eim-cs1-busFrank Li1-1/+1
Change node name eim-cs1 to eim-cs1-bus to fix below CHECK_DTS warnings: arch/arm/boot/dts/nxp/imx/imx53-ard.dtb: eim-cs1@f4000000 (fsl,eim-bus): $nodename:0: 'eim-cs1@f4000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' from schema $id: http://devicetree.org/schemas/simple-bus.yaml Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20dt-bindings: soc: imx: Add fsl,eim-busFrank Li1-1/+3
Add the fsl,eim-bus compatible strings for i.MX51 variants. These compatibles are only intended for existing legacy chips (more than 15 years old) and will not be used for new device trees. Fix below CHECK_DTBS warnings arch/arm/boot/dts/nxp/imx/imx53-ard.dtb: /eim-cs1@f4000000: failed to match any schema with compatible: ['fsl,eim-bus', 'simple-bus'] Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Frank Li <Frank.Li@nxp.com>
2026-07-20drm/xe/madvise: Skip invalidation for purgeable state updatesArvind Yadav1-2/+17
Purgeable state updates only change VMA/BO metadata. They do not zap PTEs when switching between DONTNEED and WILLNEED. PTEs are zapped later if the BO is actually purged. xe_vm_invalidate_madvise_range() waits on the VM dma-resv before checking vma->skip_invalidation. Since purgeable madvise marks all affected VMAs to skip invalidation, this wait is unnecessary and can stall on unrelated in-flight work. Skip the invalidate path entirely for purgeable state updates. v2: - Replace inline 'args->type != DRM_XE_VMA_ATTR_PURGEABLE_STATE' check with a small helper madvise_range_needs_invalidation(). (Himal) Suggested-by: Matthew Brost <matthew.brost@intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Signed-off-by: Arvind Yadav <arvind.yadav@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patch.msgid.link/20260526135447.2973029-1-arvind.yadav@intel.com Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Fixes: ada7486c5668 ("drm/xe: Implement madvise ioctl for xe") Cc: <stable@vger.kernel.org> # v6.18+ (cherry picked from commit 134377098b9c14abd31c3bcac00c9653f0f0c4c3) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
2026-07-20kcsan: avoid unintended access checking in NMIsMarco Elver1-2/+10
If a watcher deliberately disables interrupts (either by user choice, or because we're dealing with a scoped reordered access) to avoid detecting any data races in interrupts, NMIs are still able to fire. When we set up a watchpoint on a scoped reordered access, we disabled interrupts because the same CPU cannot observe reordering of its own accesses. To ensure we observe no false positives from NMIs, disable access checking for interrupt contexts as well. Fixes: 69562e4983d9 ("kcsan: Add core support for a subset of weak memory modeling") Signed-off-by: Marco Elver <elver@google.com>
2026-07-20ASoC: max98090: fix missing IS_ERR() before PTR_ERR() on mclk lookupUday Khare1-2/+3
In max98090_probe(), the -EPROBE_DEFER check after devm_clk_get() is broken due to a missing IS_ERR() guard. The code intends to return -EPROBE_DEFER only when the clock lookup fails with that specific error. However, without IS_ERR() the check: if (PTR_ERR(max98090->mclk) == -EPROBE_DEFER) is called unconditionally, including when devm_clk_get() succeeds and returns a valid pointer. Calling PTR_ERR() on a valid pointer reinterprets its address as a signed long; the result is arbitrary and is almost never equal to -EPROBE_DEFER, so the check silently does nothing in the success case. When devm_clk_get() fails with any error other than -EPROBE_DEFER the check is also skipped, leaving max98090->mclk holding an error pointer with no indication to the caller. This means a deferred probe will never actually be triggered for this device, and any non-EPROBE_DEFER clock error is silently swallowed with the error pointer left in the mclk field. Fix this by adding the missing IS_ERR() guard around the PTR_ERR() call, matching the pattern already used in the sibling max98088 and wm8960 drivers. Fixes: b10ab7b838bd ("ASoC: max98090: Add master clock handling") Signed-off-by: Uday Khare <udaykhare77@gmail.com> Link: https://patch.msgid.link/20260720104254.14948-1-udaykhare77@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-20Add missing git branch info for cifs and ksmbd to MAINTAINERS fileSteve French1-2/+2
cifs client and ksmbd server were missing the git branch info in the MAINTAINERS file. They just were showing the git tree. Signed-off-by: Steve French <stfrench@microsoft.com>
2026-07-20NFS: Decrement refcounts if allocating nfs_free_stateid_data failsAnna Schumaker1-7/+13
I noticed that we were immediately exiting this function if the allocation fails, leaving the client and server object refcounts bumped. Fix this by creating a common exit point to clean up dangling references. Fixes: 576acc259146 ("nfs4: take a reference on the nfs_client when running FREE_STATEID") Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-07-20NFS: Pin the 'struct nfs_server' during a FREE_STATEID callAnna Schumaker1-0/+5
Dan Aloni reports that he was able to hit a use-after-free bug if a FREE_STATEID operation gets delayed for whatever reason. Fix this by bumping the refcount of the 'struct nfs_server' object for the duration of the FREE_STATEID so it doesn't get cleaned up from underneath us while operations are still in flight. Reported-by: Dan Aloni <dan.aloni@vastdata.com> Fixes: 7c1d5fae4a87 ("NFSv4: Convert nfs41_free_stateid to use an asynchronous RPC call") Tested-by: Dan Aloni <dan.aloni@vastdata.com> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-07-20bpftool: Skip prog/map that disappears while looking it up by nameJiayuan Chen1-0/+4
Looking up a prog or map by name walks the whole id space. There is a window between bpf_prog_get_next_id()/bpf_map_get_next_id() and getting an fd for that id in which an unrelated object can be freed, and the lookup then fails with ENOENT and aborts the whole command. Skip such ids and keep walking, the same way do_show() already does. Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Link: https://lore.kernel.org/bpf/20260720071520.396363-1-jiayuan.chen@linux.dev Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-20ASoC: max98095: fix missing IS_ERR() before PTR_ERR() on mclk lookupUday Khare1-2/+3
In max98095_probe(), the -EPROBE_DEFER check after devm_clk_get() is broken due to a missing IS_ERR() guard. The code intends to return -EPROBE_DEFER only when the clock lookup fails with that specific error. However, without IS_ERR() the check: if (PTR_ERR(max98095->mclk) == -EPROBE_DEFER) is called unconditionally, including when devm_clk_get() succeeds and returns a valid pointer. Calling PTR_ERR() on a valid pointer reinterprets its address as a signed long; the result is arbitrary and is almost never equal to -EPROBE_DEFER, so the check silently does nothing in the success case. When devm_clk_get() fails with any error other than -EPROBE_DEFER the check is also skipped, leaving max98095->mclk holding an error pointer with no indication to the caller. This means a deferred probe will never actually be triggered for this device, and any non-EPROBE_DEFER clock error is silently swallowed with the error pointer left in the mclk field. Fix this by adding the missing IS_ERR() guard around the PTR_ERR() call, matching the pattern already used in the sibling max98088 and wm8960 drivers. Fixes: e3048c3d2be5 ("ASoC: max98095: Add master clock handling") Signed-off-by: Uday Khare <udaykhare77@gmail.com> Link: https://patch.msgid.link/20260720103950.14474-1-udaykhare77@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-20USB: serial: io_ti: reject oversized boot-mode firmwarePengpeng Hou1-0/+6
do_boot_mode() copies the firmware payload, excluding its four-byte prefix, into a fixed 15.5 KiB staging buffer. check_fw_sanity() already proves that the image contains its seven-byte header and validates the declared image length and checksum, but it does not impose this boot-mode destination limit. Reject images whose payload does not fit before allocating and filling the staging buffer. Fixes: d12b219a228e ("edgeport-ti: use request_firmware()") Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Signed-off-by: Johan Hovold <johan@kernel.org>
2026-07-20drm/hyperv: Move MODULE_DEVICE_TABLE to the device_id arraysUwe Kleine-König (The Capable Hub)1-2/+2
It matches the usual coding style to have the MODULE_DEVICE_TABLE macro directly after the respective arrays. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> Link: https://patch.msgid.link/7f9d4a239c76b6bb384048ea5591a21ed87d9b0e.1782925276.git.u.kleine-koenig@baylibre.com
2026-07-20drm/hyperv: Explicitly set subvendor and subdevice for pci match arrayUwe Kleine-König (The Capable Hub)1-2/+2
.subvendor and .subdevice were set to 0 implicitly, so only devices with these two values set to 0 in hardware can probe automatically. Make this requirement explicit. While touching this array item, also make use of the pci macro designed for that case. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> Link: https://patch.msgid.link/019450ffb519d02821364afca32b9f48bcd8d2b6.1782925276.git.u.kleine-koenig@baylibre.com
2026-07-20drm/hyperv: Unregister pci driver in error path before module unloadUwe Kleine-König (The Capable Hub)1-1/+5
The pci driver must not kept registered if the module is unloaded after vmbus_driver_register() fails. So check the return value of vmbus_driver_register() and unregister the pci driver on failure. Fixes: 76c56a5affeb ("drm/hyperv: Add DRM driver for hyperv synthetic video device") Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> Link: https://patch.msgid.link/4b7dbf00ce4ff664b7d5dd74b2f39d8d87c1ade9.1782925276.git.u.kleine-koenig@baylibre.com
2026-07-20hwmon: occ: validate poll response sensor blocksPengpeng Hou1-8/+30
The OCC poll response parser walks a counted list of sensor data blocks. It used the static backing-array capacity as the parse boundary, but a transport response makes only data_length bytes current and valid. A truncated response can therefore make the parser consume a block header or block extent outside the current response. Use data_length as the parent boundary, prove the fixed poll header and each current block header before reading them, and prove the complete block before advancing. Keep parsed sensor metadata local until the complete response has passed validation, then publish it. Propagate malformed-response errors before publishing the OCC as active. Fixes: aa195fe49b03 ("hwmon (occ): Parse OCC poll response") Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://lore.kernel.org/r/20260720115826.14813-1-pengpeng@iscas.ac.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-07-20ovpn: use monotonic clock for peer keepalive timeoutsMarco Baffo2-4/+4
Replace ktime_get_real_seconds() with the monotonic ktime_get_boottime_seconds() to ensure the keepalive mechanism is robust against system clock modifications. Right now, the driver uses ktime_get_real_seconds() to track peer timeouts, relying on the system wall-clock. An administrative time adjustment or an NTP sync that steps the clock forward can cause `now' to instantly exceed `last_recv + timeout'. When this occurs, the driver artificially expires healthy peers. Depending on the OpenVPN user-space configuration, this triggers a premature tunnel restart (if --keepalive or --ping-restart is used) or a complete disconnection of the client (if --ping-exit is used). Fixes: 3ecfd9349f40 ("ovpn: implement keepalive mechanism") Signed-off-by: Marco Baffo <marco@mandelbit.com> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2026-07-20USB: serial: mxuport: validate firmware header sizePengpeng Hou1-0/+7
mxuport_probe() reads version bytes at fixed offsets after request_firmware() succeeds. Firmware loading success does not prove that the blob reaches the highest version offset. Reject short firmware images before reading the version bytes. This is source-level parser hardening; no affected device or crash was observed. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Fixes: ee467a1f2066 ("USB: serial: add Moxa UPORT 12XX/14XX/16XX driver") Signed-off-by: Johan Hovold <johan@kernel.org>
2026-07-20media: bcm2835-unicam: Fix pipeline wrong validation for unpacked formatsEugen Hristev1-1/+2
The commit 08f9794d9b79 ("media: bcm2835-unicam: Fix RGB format / mbus code association") introduced a check to see whether the format requested is the same as the fourcc in the format list. However, this breaks the case when userspace requested an unpacked fourcc, e.g. RG10. Unicam can work with or without unpacking pixels, e.g. pRAA or RG10, depending on what userspace requests. In the unpacking case, a dedicated register is being set. If the userspace requests pRAA, this works, because the check validates the pipeline: v4l2-ctl -d /dev/video0 --set-fmt-video=width=3280,height=2464,pixelformat=pRAA \ --stream-mmap --stream-count=1 --stream-to=frame.raw but, with v4l2-ctl -d /dev/video0 --set-fmt-video=width=3280,height=2464,pixelformat=RG10 \ --stream-mmap --stream-count=1 --stream-to=frame.raw unicam complains at validation level: image: format mismatch: 0x300f <=> RG10 little-endian (0x30314752) This should work, because MEDIA_BUS_FMT_SRGGB10_1X10 can be packed into either RG10 or pRAA depending on the packing register. To fix this, modified the condition check to also allow in the case when requested format (fmt->pixelformat) is equal to fmtinfo->unpacked_fourcc. Fixes: 08f9794d9b79 ("media: bcm2835-unicam: Fix RGB format / mbus code association") Cc: stable@vger.kernel.org Signed-off-by: Eugen Hristev <ehristev@kernel.org> Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> [Sakari Ailus: Added Cc: stable.] Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2026-07-20timers/migration: Fix bad line kernel-doc warning in struct tmigr_cpuBabanpreet Singh1-1/+1
Running kernel-doc on timer_migration.h reports: Warning: kernel/time/timer_migration.h:105 bad line: The empty line separating the @available paragraph from the @idle member documentation in the struct tmigr_cpu kernel-doc block lacks the " *" line prefix that kernel-doc requires on every line inside a block. The header is not scanned by the build-time kernel-doc checks, so the warning only shows up when kernel-doc is invoked on the file directly. Add the missing prefix. The empty line was introduced when the @available documentation was expanded by commit 45a13ba52c82 ("timers/migration: Update stale @online doc to @available"). No functional change. Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Assisted-by: Claude:claude-sonnet-5 Link: https://patch.msgid.link/20260717035947.7-1-bbnpreetsingh@gmail.com