6.18.52-rc1 review
Greg Kroah-Hartman
maintainerPATCH 1472/1518 cpufreq/amd-pstate: Grab "amd_pstate_driver_lock" when toggling dynamic_epp
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <[email protected]>
[ Upstream commit 9228169d2ae055ed09a163887fc59a710a5eb73b ]
Concurrently changing driver mode and dynamic_epp with:
echo passive > /sys/devices/system/cpu/amd_pstate/status& echo disable > /sys/devices/system/cpu/amd_pstate/dynamic_epp&
hits the WARN_ON_ONCE() in static_key_disable_cpuslocked() and hangs the system since both sysfs writes are trying to do amd_pstate_change_driver_mode() without any synchronization.
Grab the "amd_pstate_driver_lock" mutex when modifying "dynamic_epp" to prevent the two paths from racing with each other. Add a lockdep assertion for "amd_pstate_driver_lock" in amd_pstate_change_driver_mode() to formalize the dependency.
Since "cppc_mode" is stable under "amd_pstate_driver_lock", only reload the driver when in "AMD_PSTATE_ACTIVE" mode and reject all writes when in passive or guided mode, or if the driver is not loaded, since only active mode operates on EPP.
--- drivers/cpufreq/amd-pstate.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/cpufreq/amd-pstate.c +9 -0
@@ -1576,6 +1576,8 @@ static int amd_pstate_change_driver_mode(int mode) {int ret; +lockdep_assert_held (&amd_pstate_driver_lock); + ret =amd_pstate_unregister_driver (0 );if (ret)return ret;
@@ -1691,6 +1693,13 @@ static ssize_t dynamic_epp_store(struct device *a, struct device_attribute *b,if (ret)return ret; +guard (mutex)(&amd_pstate_driver_lock); + +if (cppc_state !=AMD_PSTATE_ACTIVE ) { +pr_debug ("dynamic_epp can only be toggled in active mode\n" ); +return -EINVAL ; + } +if (dynamic_epp == enabled)return -EINVAL ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1473/1518 cpufreq/amd-pstate: Add POWER_SUPPLY select for dynamic EPP
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <[email protected]>
[ Upstream commit 679343977588781bd3effba79e9644aee4ee046c ]
The dynamic EPP feature uses power_supply_reg_notifier() and power_supply_unreg_notifier() but doesn't declare a dependency on POWER_SUPPLY, causing linker errors when POWER_SUPPLY is not enabled.
Add POWER_SUPPLY to the selects.
--- drivers/cpufreq/Kconfig.x86 | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/Kconfig.x86 +1 -0
@@ -41,6 +41,7 @@ config X86_AMD_PSTATE select ACPI_CPPC_LIB if X86_64 select CPU_FREQ_GOV_SCHEDUTIL if SMP select ACPI_PLATFORM_PROFILE + select POWER_SUPPLY help This driver adds a CPUFreq driver which utilizes a fine grain processor performance frequency control range instead of legacy
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1474/1518 cpufreq/amd-pstate: Fix setting EPP in performance mode
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello (AMD) <[email protected]>
[ Upstream commit 5629eec1a2829871d496f3042884cdc267612f6a ]
EPP 0 is the only supported value in the performance policy. commit 798c47593cca ("cpufreq/amd-pstate: Add support for platform profile class") changed this while adding platform profile support to the dynamic EPP feature, but this actually wasn't necessary since platform profile writes disable manual EPP writes.
Restore allowing writing EPP of 0 when in performance mode.
--- drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/amd-pstate.c +1 -1
@@ -1364,7 +1364,7 @@ static ssize_t store_energy_performance_preference(struct cpufreq_policy *policyelse epp =amd_pstate_get_balanced_epp (policy); -if (cpudata->policy ==CPUFREQ_POLICY_PERFORMANCE ) { +if (epp >0 && cpudata->policy ==CPUFREQ_POLICY_PERFORMANCE ) {pr_debug ("EPP cannot be set under performance policy\n" );return -EBUSY ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1475/1518 selftests: vDSO: getrandom: Fix path to s390 chacha implementation
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit d045e166d3c51b7aec069669bb243e057d80d04f ]
The s390 vDSO source directory was recently moved, but this reference was not updated.
--- tools/testing/selftests/vDSO/vgetrandom-chacha.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/vDSO/vgetrandom-chacha.S +1 -1
@@ -14,7 +14,7 @@ #elif defined(__riscv) && __riscv_xlen == 64 #include "../../../../arch/riscv/kernel/vdso/vgetrandom-chacha.S" #elif defined(__s390x__) -#include "../../../../arch/s390/kernel/vdso64/vgetrandom-chacha.S" +#include "../../../../arch/s390/kernel/vdso/vgetrandom-chacha.S" #elif defined(__x86_64__) #include "../../../../arch/x86/entry/vdso/vgetrandom-chacha.S" #endif
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1476/1518 s390/kexec: Disable stack protector in s390_reset_system()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasily Gorbik <[email protected]>
[ Upstream commit 1623a554c68f352c17d0a358bc62580dc187f06b ]
s390_reset_system() calls set_prefix(0), which switches back to the absolute lowcore. At that point the stack protector canary no longer matches the canary from the lowcore the function was entered with, so the stack check fails.
Mark s390_reset_system() __no_stack_protector. This is safe here since its callers (__do_machine_kdump() and __do_machine_kexec()) are effectively no-return and fall back to disabled_wait() on failure.
--- arch/s390/kernel/ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/ipl.c +1 -1
@@ -2378,7 +2378,7 @@ void __init setup_ipl(void)atomic_notifier_chain_register (&panic_notifier_list, &on_panic_nb); } -void s390_reset_system (void ) +void __no_stack_protector s390_reset_system(void) {/* Disable prefixing */ set_prefix (0 );
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1477/1518 s390/entry: Use lay instead of aghik
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
[ Upstream commit 1c93edfd506ccaf9e9982dfdafc91cd2d444ad63 ]
Use the lay instruction instead of aghik. aghik is only available since z196, therefore compiling the kernel for z10 results in this error:
arch/s390/kernel/entry.S: Assembler messages:
arch/s390/kernel/entry.S:165: Error: Unrecognized opcode: `aghik'
--- arch/s390/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/entry.S +1 -1
@@ -162,7 +162,7 @@ SYM_FUNC_START(__switch_to_asm) stg %r3,__LC_CURRENT(%r13) # store task struct of next stg %r15,__LC_KERNEL_STACK(%r13) # store end of kernel stack lg %r15,__THREAD_ksp(%r1,%r3) # load kernel stack of next - aghik %r4,%r3,__TASK_pid + lay %r4,__TASK_pid(%r3) mvc __LC_CURRENT_PID(4,%r13),0(%r4) # store pid of next ALTERNATIVE "nop", "lpp _LPP_OFFSET(%r13)", ALT_FACILITY(40) #ifdef CONFIG_STACKPROTECTOR
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1478/1518 wifi: mt76: restrict NPU/PPE active checks to MMIO devices
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Devin Wittmayer <[email protected]>
[ Upstream commit 7981aca2bd28a1f7ad7eeab89715442a95b1f72e ]
mt76_npu_device_active() and mt76_ppe_device_active() read dev->mmio.npu and dev->mmio.ppe_dev. The mmio, usb and sdio bus structs share a union in struct mt76_dev, so on USB and SDIO these read unrelated data from the usb/sdio struct, which is non-NULL in practice.
mt76_npu_device_active() then returns true on USB, and mt76_rx_poll_complete() takes the offload path and skips mt76_rx_aggr_reorder(). RX A-MPDU subframes are delivered out of order and the peer's TCP stack treats that as loss: heavy retransmissions and reduced throughput in AP mode. Seen on mt7921u, mt7925u, mt76x2u and mt76x0u.
Gate both helpers on mt76_is_mmio() so they only run for the bus type that owns the mmio union member.
--- drivers/net/wireless/mediatek/mt76/mt76.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76.h +2 -2
@@ -1705,12 +1705,12 @@ static inline int mt76_npu_net_setup_tc(struct ieee80211_hw *hw,static inline bool mt76_npu_device_active (struct mt76_dev *dev) { -return !!rcu_access_pointer (dev->mmio.npu); +return mt76_is_mmio (dev) && !!rcu_access_pointer (dev->mmio.npu); }static inline bool mt76_ppe_device_active (struct mt76_dev *dev) { -return !!rcu_access_pointer (dev->mmio.ppe_dev); +return mt76_is_mmio (dev) && !!rcu_access_pointer (dev->mmio.ppe_dev); } static inline int mt76_npu_send_msg(struct airoha_npu *npu, int ifindex,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1479/1518 wifi: mt76: npu: Add missing rx_token_size initialization
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit 25e3203a2192f2b0d697b2410126bad87e62d4f0 ]
Add missing rx_token_size initialization for NPU offloading.
--- drivers/net/wireless/mediatek/mt76/npu.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/npu.c +1 -0
@@ -457,6 +457,7 @@ int mt76_npu_init(struct mt76_dev *dev, phys_addr_t phy_addr, int type) dev->mmio.npu_type = type;/* NPU offloading requires HW-RRO for RX packet reordering. */ dev->hwrro_mode =MT76_HWRRO_V3_1 ; + dev->rx_token_size =32768 ;rcu_assign_pointer (dev->mmio.npu, npu);rcu_assign_pointer (dev->mmio.ppe_dev, ppe_dev);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1480/1518 wifi: nl80211: fix UHR capability validation
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit a140826caa2c14aa5a9a6990e514c5edbdb7eafd ]
The ieee80211_uhr_capa_size_ok() function returns a boolean, but we need an error code here. Fix that.
--- net/wireless/nl80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/wireless/nl80211.c +3 -1
@@ -372,7 +372,9 @@ static int validate_uhr_capa(const struct nlattr *attr,const u8 *data =nla_data (attr);unsigned int len =nla_len (attr); -return ieee80211_uhr_capa_size_ok (data, len, false); +if (!ieee80211_uhr_capa_size_ok (data, len, false)) +return -EINVAL ; +return 0 ; } static int validate_uhr_operation(const struct nlattr *attr,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1481/1518 perf annotate: Fix build with NO_SLANG=1
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namhyung Kim <[email protected]>
[ Upstream commit 0e6c07a3c30cdc4509fc5e7dc490d4cc6e5c241a ]
The recent change for perf c2c annotate broke build without slang support like below.
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:522:73: error: 'NO_ADDR' undeclared (first use in this function); did you mean 'NR_ADDR'?
522 | key = hist_entry__tui_annotate(he, evsel, NULL, NO_ADDR);
| ^~~~~~~
| NR_ADDRbuiltin-annotate.c:522:73: note: each undeclared identifier is reported only once for each function it appears in
builtin-annotate.c:522:31: error: too many arguments to function 'hist_entry__tui_annotate'
522 | key = hist_entry__tui_annotate(he, evsel, NULL, NO_ADDR);
| ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from util/sort.h:6,
from builtin-annotate.c:28:
util/hist.h:756:19: note: declared here
756 | static inline int hist_entry__tui_annotate(struct hist_entry *he __maybe_unused,
| ^~~~~~~~~~~~~~~~~~~~~~~~
And I noticed that it missed to update the other side of #ifdef HAVE_SLANG_SUPPORT. Let's fix it.
--- tools/perf/util/hist.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/util/hist.h +6 -2
@@ -709,6 +709,8 @@ struct block_hist {struct hist_entry he; }; +#define NO_ADDR 0 +#ifdef HAVE_SLANG_SUPPORT #include "../ui/keysyms.h" void attr_to_script (char *buf,struct perf_event_attr *attr);
@@ -746,14 +748,16 @@ int evlist__tui_browse_hists(struct evlist *evlist __maybe_unused,static inline int __hist_entry__tui_annotate (struct hist_entry *he__maybe_unused ,struct map_symbol *ms__maybe_unused ,struct evsel *evsel__maybe_unused , -struct hist_browser_timer *hbt__maybe_unused ) +struct hist_browser_timer *hbt__maybe_unused , +u64 al_addr__maybe_unused ) {return 0 ; }static inline int hist_entry__tui_annotate (struct hist_entry *he__maybe_unused ,struct evsel *evsel__maybe_unused , -struct hist_browser_timer *hbt__maybe_unused ) +struct hist_browser_timer *hbt__maybe_unused , +u64 al_addr__maybe_unused ) {return 0 ; }
Signature · 1 line
2.53.0
Re: [PATCH 6.18 1481/1518] perf annotate: Fix build with NO_SLANG=1
Quoted 27 lines · Greg Kroah-Hartman
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namhyung Kim <[email protected]>
[ Upstream commit
0e6c07a3c30cdc4509fc5e7dc490d4cc6e5c241a]The recent change for perf c2c annotate broke build without slang support like below.
builtin-annotate.c: In function 'hists__find_annotations':
builtin-annotate.c:522:73: error: 'NO_ADDR' undeclared (first use in this function); did you mean 'NR_ADDR'?522 | key = hist_entry__tui_annotate(he, evsel, NULL, NO_ADDR); | ^~~~~~~ | NR_ADDRbuiltin-annotate.c:522:73: note: each undeclared identifier is reported only once for each function it appears in
builtin-annotate.c:522:31: error: too many arguments to function '
hist_entry__tui_annotate'522 | key = hist_entry__tui_annotate(he, evsel, NULL, NO_ADDR); | ^~~~~~~~~~~~~~~~~~~~~~~~In file included from
util/sort.h:6,
from builtin-annotate.c:28:
util/hist.h:756:19: note: declared here
756 | static inline int hist_entry__tui_annotate(structhist_entry*he__maybe_unused,
| ^~~~~~~~~~~~~~~~~~~~~~~~
Quoted 7 lines
And I noticed that it missed to update the other side of #ifdef
HAVE_SLANG_SUPPORT. Let's fix it.Cc Tianyou Li <[email protected]>Fixes cd3466cd2639783d ("perf c2c: Add annotation support to perf c2c report")Signed-off-by Namhyung Kim <[email protected]>Signed-off-by Sasha Levin <[email protected]>
This appears to be the same patch from [1] that was previously dropped. With this patch applied, I'm seeing the same build error as Jiri Slaby did on the linked thread when !HAVE_SLANG_SUPPORT.
For now I've reverted this commit, but I wanted to surface this upstream as well.
Thanks,
Mitchell
[1]: https://lore.kernel.org/all/2025121754-breeching-aftermost-d10a@gregkh/
Sasha Levin
maintainerRe: [PATCH 6.18 1481/1518] perf annotate: Fix build with NO_SLANG=1
Quoted 3 lines
This appears to be the same patch from [1] that was previously dropped. With this patch applied, I'm seeing the same build error as Jiri Slaby did on the linked thread when !HAVE_SLANG_SUPPORT.
Reverted from 6.18, thanks for catching it.
The commit only adds the fourth parameter to the !HAVE_SLANG_SUPPORT stubs. 6.18 does not carry cd3466cd2639 ("perf c2c: Add annotation support to perf c2c report"), so the HAVE_SLANG_SUPPORT declarations and the only caller still use three arguments, and the patch breaks the NO_SLANG=1 build here instead of fixing it.
Signature · 2 lines
Thanks, Sasha
Greg Kroah-Hartman
maintainerPATCH 1482/1518 phy: renesas: rcar-gen3-usb2: add regulator dependency
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit 3a03a0e47cf2e0ec7ce7ca9e0bf4c59ec537ad09 ]
The driver start registering a regulator, but can still be enabled even when it is unable to call into the regulator subsystem:
aarch64-linux-ld: drivers/phy/renesas/phy-rcar-gen3-usb2.o: in function `rcar_gen3_phy_usb2_probe':
phy-rcar-gen3-usb2.c:(.text+0x2884): undefined reference to `devm_regulator_register'
Add a Kconfig dependency to avoid this configuration.
--- drivers/phy/renesas/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/phy/renesas/Kconfig +1 -0
@@ -29,6 +29,7 @@ config PHY_RCAR_GEN3_USB2 depends on ARCH_RENESAS depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in depends on USB_SUPPORT + depends on REGULATOR select GENERIC_PHY select USB_COMMON help
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1483/1518 scsi: sd: Fix error handling in sd_probe() after large pool creation failure
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Xiuwei <[email protected]>
[ Upstream commit e3cc6ea1a745e7f5d326f919a428b244fa119d8f ]
After device_add(&sdkp->disk_dev) succeeds, sd_large_pool_create() failure must unregister disk_dev and let scsi_disk_release() free sdkp. Going through out_free_index kfree()s an already registered device and leaks the sysfs entry.
--- drivers/scsi/sd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/sd.c +3 -1
@@ -4060,7 +4060,9 @@ static int sd_probe(struct scsi_device *sdp)if (sdp->sector_size >PAGE_SIZE ) {if (sd_large_pool_create ()) { error = -ENOMEM ; - goto out_free_index; +device_unregister (&sdkp->disk_dev); +put_disk (gd); + goto out; } }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1484/1518 pinctrl: airoha: an7583: remove undefined groups from pcm_spi pin function
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit 7b87a686a5ab138b3f8ca3d7e3489d8371c02695 ]
pcm_spi_int, pcm_spi_cs2, pcm_spi_cs3, pcm_spi_cs4 pin groups are not defined, so pcm_spi function can't be applied to these groups.
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/pinctrl/mediatek/pinctrl-airoha.c +2 -4
@@ -900,10 +900,8 @@ static const char *const pcm_spi_groups[] = { "pcm_spi", "pcm_spi_int","pcm_spi_cs2_p156" ,"pcm_spi_cs2_p128" , "pcm_spi_cs3", "pcm_spi_cs4" }; -static const char *const an7583_pcm_spi_groups[] = {"pcm_spi" ,"pcm_spi_int" , -"pcm_spi_rst" ,"pcm_spi_cs1" , -"pcm_spi_cs2" ,"pcm_spi_cs3" , -"pcm_spi_cs4" }; +static const char *const an7583_pcm_spi_groups[] = {"pcm_spi" , +"pcm_spi_rst" ,"pcm_spi_cs1" };static const char *const i2s_groups[] = {"i2s" };static const char *const emmc_groups[] = {"emmc" };static const char *const pnand_groups[] = {"pnand" };
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1485/1518 pinctrl: airoha: an7583: fix phy1_led1 pin function
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit dbe28a2a22a3455d1adbf9fd61d3537603ac3072 ]
phy1_led1 pin function wrongly refers to gpio1 instead of gpio11. Fix it.
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/mediatek/pinctrl-airoha.c +1 -1
@@ -1892,7 +1892,7 @@ static const struct airoha_pinctrl_func_group an7583_phy1_led1_func_group[] = { LAN1_LED_MAPPING_MASK, LAN1_PHY_LED_MAP(0)), AIROHA_PINCTRL_PHY_LED1("gpio10", GPIO_LAN2_LED1_MODE_MASK, LAN2_LED_MAPPING_MASK, LAN2_PHY_LED_MAP(0)), - AIROHA_PINCTRL_PHY_LED1("gpio1", GPIO_LAN3_LED1_MODE_MASK, + AIROHA_PINCTRL_PHY_LED1("gpio11", GPIO_LAN3_LED1_MODE_MASK, LAN3_LED_MAPPING_MASK, LAN3_PHY_LED_MAP(0)), };
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1486/1518 pinctrl: airoha: an7583: fix gpio21 pin group
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit abf92c45cc82e9a01aa581f9fbc790e78250a4d4 ]
gpio21 pin group refers to gpio22 pin, this is wrong.
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/mediatek/pinctrl-airoha.c +1 -1
@@ -767,7 +767,7 @@ static const int an7583_gpio17_pins[] = { 19 };static const int an7583_gpio18_pins[] = {20 };static const int an7583_gpio19_pins[] = {21 };static const int an7583_gpio20_pins[] = {22 }; -static const int an7583_gpio21_pins[] = {24 }; +static const int an7583_gpio21_pins[] = {23 };static const int an7583_gpio23_pins[] = {25 };static const int an7583_gpio24_pins[] = {26 };static const int an7583_gpio25_pins[] = {27 };
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1487/1518 pinctrl: airoha: an7583: fix incorrect led mapping in phy4_led1 pin function
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit a3602577fdfc49c6dc08d67304426d5ef6d7dec6 ]
phy4_led1 pin function maps led incorrectly. It uses the same map as phy3_led1. PHY{X} should map to LAN{N}_PHY_LED_MAP(X-1).
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/mediatek/pinctrl-airoha.c +4 -4
@@ -1920,13 +1920,13 @@ static const struct airoha_pinctrl_func_group an7583_phy3_led1_func_group[] = {static const struct airoha_pinctrl_func_group an7583_phy4_led1_func_group[] = {AIROHA_PINCTRL_PHY_LED1 ("gpio8" ,GPIO_LAN0_LED1_MODE_MASK , -LAN0_LED_MAPPING_MASK ,LAN0_PHY_LED_MAP (2 )), +LAN0_LED_MAPPING_MASK ,LAN0_PHY_LED_MAP (3 )),AIROHA_PINCTRL_PHY_LED1 ("gpio9" ,GPIO_LAN1_LED1_MODE_MASK , -LAN1_LED_MAPPING_MASK ,LAN1_PHY_LED_MAP (2 )), +LAN1_LED_MAPPING_MASK ,LAN1_PHY_LED_MAP (3 )),AIROHA_PINCTRL_PHY_LED1 ("gpio10" ,GPIO_LAN2_LED1_MODE_MASK , -LAN2_LED_MAPPING_MASK ,LAN2_PHY_LED_MAP (2 )), +LAN2_LED_MAPPING_MASK ,LAN2_PHY_LED_MAP (3 )),AIROHA_PINCTRL_PHY_LED1 ("gpio11" ,GPIO_LAN3_LED1_MODE_MASK , -LAN3_LED_MAPPING_MASK ,LAN3_PHY_LED_MAP (2 )), +LAN3_LED_MAPPING_MASK ,LAN3_PHY_LED_MAP (3 )), };static const struct airoha_pinctrl_func en7581_pinctrl_funcs[] = {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1488/1518 pinctrl: airoha: an7583: fix misprint in gpio19 pinconf
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit a7f3e2b7730fc1d6c7431af49e0dc1ee97589795 ]
Pin 21 (gpio19) duplicate pinconf settings of pin 20. Fix it using a proper bit number in the configuration register.
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/mediatek/pinctrl-airoha.c +4 -4
@@ -2063,7 +2063,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_pullup_conf[] = {PINCTRL_CONF_DESC (18 ,REG_GPIO_L_PU ,BIT (16 )),PINCTRL_CONF_DESC (19 ,REG_GPIO_L_PU ,BIT (17 )),PINCTRL_CONF_DESC (20 ,REG_GPIO_L_PU ,BIT (18 )), -PINCTRL_CONF_DESC (21 ,REG_GPIO_L_PU ,BIT (18 )), +PINCTRL_CONF_DESC (21 ,REG_GPIO_L_PU ,BIT (19 )),PINCTRL_CONF_DESC (22 ,REG_GPIO_L_PU ,BIT (20 )),PINCTRL_CONF_DESC (23 ,REG_GPIO_L_PU ,BIT (21 )), PINCTRL_CONF_DESC(24, REG_GPIO_L_PU, BIT(22)),
@@ -2180,7 +2180,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_pulldown_conf[] = {PINCTRL_CONF_DESC (18 ,REG_GPIO_L_PD ,BIT (16 )),PINCTRL_CONF_DESC (19 ,REG_GPIO_L_PD ,BIT (17 )),PINCTRL_CONF_DESC (20 ,REG_GPIO_L_PD ,BIT (18 )), -PINCTRL_CONF_DESC (21 ,REG_GPIO_L_PD ,BIT (18 )), +PINCTRL_CONF_DESC (21 ,REG_GPIO_L_PD ,BIT (19 )),PINCTRL_CONF_DESC (22 ,REG_GPIO_L_PD ,BIT (20 )),PINCTRL_CONF_DESC (23 ,REG_GPIO_L_PD ,BIT (21 )), PINCTRL_CONF_DESC(24, REG_GPIO_L_PD, BIT(22)),
@@ -2297,7 +2297,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e2_conf[] = {PINCTRL_CONF_DESC (18 ,REG_GPIO_L_E2 ,BIT (16 )),PINCTRL_CONF_DESC (19 ,REG_GPIO_L_E2 ,BIT (17 )),PINCTRL_CONF_DESC (20 ,REG_GPIO_L_E2 ,BIT (18 )), -PINCTRL_CONF_DESC (21 ,REG_GPIO_L_E2 ,BIT (18 )), +PINCTRL_CONF_DESC (21 ,REG_GPIO_L_E2 ,BIT (19 )),PINCTRL_CONF_DESC (22 ,REG_GPIO_L_E2 ,BIT (20 )),PINCTRL_CONF_DESC (23 ,REG_GPIO_L_E2 ,BIT (21 )), PINCTRL_CONF_DESC(24, REG_GPIO_L_E2, BIT(22)),
@@ -2414,7 +2414,7 @@ static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e4_conf[] = {PINCTRL_CONF_DESC (18 ,REG_GPIO_L_E4 ,BIT (16 )),PINCTRL_CONF_DESC (19 ,REG_GPIO_L_E4 ,BIT (17 )),PINCTRL_CONF_DESC (20 ,REG_GPIO_L_E4 ,BIT (18 )), -PINCTRL_CONF_DESC (21 ,REG_GPIO_L_E4 ,BIT (18 )), +PINCTRL_CONF_DESC (21 ,REG_GPIO_L_E4 ,BIT (19 )),PINCTRL_CONF_DESC (22 ,REG_GPIO_L_E4 ,BIT (20 )),PINCTRL_CONF_DESC (23 ,REG_GPIO_L_E4 ,BIT (21 )), PINCTRL_CONF_DESC(24, REG_GPIO_L_E4, BIT(22)),
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1489/1518 pinctrl: airoha: an7583: add missed gpio32 pin group
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit 81cc2285cea84e3ed8688d353e1250cf8899c80a ]
gpio32 pin group is missed for an7583 SoC. This patch add it.
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pinctrl/mediatek/pinctrl-airoha.c +2 -0
@@ -777,6 +777,7 @@ static const int an7583_gpio28_pins[] = { 30 };static const int an7583_gpio29_pins[] = {31 };static const int an7583_gpio30_pins[] = {32 };static const int an7583_gpio31_pins[] = {33 }; +static const int an7583_gpio32_pins[] = {34 };static const int an7583_gpio33_pins[] = {35 };static const int an7583_gpio34_pins[] = {36 };static const int an7583_gpio35_pins[] = {37 };
@@ -859,6 +860,7 @@ static const struct pingroup an7583_pinctrl_groups[] = {PINCTRL_PIN_GROUP ("gpio29" , an7583_gpio29),PINCTRL_PIN_GROUP ("gpio30" , an7583_gpio30),PINCTRL_PIN_GROUP ("gpio31" , an7583_gpio31), +PINCTRL_PIN_GROUP ("gpio32" , an7583_gpio32),PINCTRL_PIN_GROUP ("gpio33" , an7583_gpio33),PINCTRL_PIN_GROUP ("gpio34" , an7583_gpio34), PINCTRL_PIN_GROUP("gpio35", an7583_gpio35),
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1490/1518 pinctrl: airoha: Fix AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Chancellor <[email protected]>
[ Upstream commit 0341d1b1ebf10bcbb9f35e174e83dbb21068387d ]
Clang warns (or errors with CONFIG_WERROR=y / W=e):
pinctrl/mediatek/pinctrl-airoha.c:2064:41: error: variable 'an7583_pinctrl_drive_e2_conf' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
2064 | static const struct airoha_pinctrl_conf an7583_pinctrl_drive_e2_conf[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~Due to a typo, an7583_pinctrl_drive_e2_conf is only used within ARRAY_SIZE() (hence no instance of -Wunused-variable), which is evaluated at compile time, so it will not be needed in the final object file.
Fix the .confs assignment for AIROHA_PINCTRL_CONFS_DRIVE_E2 in an7583_pinctrl_match_data to clear up the warning.
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/mediatek/pinctrl-airoha.c +1 -1
@@ -3259,7 +3259,7 @@ static const struct airoha_pinctrl_match_data an7583_pinctrl_match_data = { .num_confs = ARRAY_SIZE(an7583_pinctrl_pulldown_conf), }, [AIROHA_PINCTRL_CONFS_DRIVE_E2] = { - .confs = en7581_pinctrl_drive_e2_conf, + .confs = an7583_pinctrl_drive_e2_conf, .num_confs = ARRAY_SIZE(an7583_pinctrl_drive_e2_conf), }, [AIROHA_PINCTRL_CONFS_DRIVE_E4] = {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1491/1518 pinctrl: airoha: an7581: fix incorrect led mapping in phy4_led1 pin function
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit e20c85c79cc2f45b87eb3dab38d4c641bbf83ed6 ]
phy4_led1 pin function maps led incorrectly. It uses the same map as phy3_led1. PHY{X} should map to LAN{N}_PHY_LED_MAP(X-1).
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/mediatek/pinctrl-airoha.c +4 -4
@@ -1834,13 +1834,13 @@ static const struct airoha_pinctrl_func_group phy3_led1_func_group[] = {static const struct airoha_pinctrl_func_group phy4_led1_func_group[] = {AIROHA_PINCTRL_PHY_LED1 ("gpio43" ,GPIO_LAN0_LED1_MODE_MASK , -LAN0_LED_MAPPING_MASK ,LAN0_PHY_LED_MAP (2 )), +LAN0_LED_MAPPING_MASK ,LAN0_PHY_LED_MAP (3 )),AIROHA_PINCTRL_PHY_LED1 ("gpio44" ,GPIO_LAN1_LED1_MODE_MASK , -LAN1_LED_MAPPING_MASK ,LAN1_PHY_LED_MAP (2 )), +LAN1_LED_MAPPING_MASK ,LAN1_PHY_LED_MAP (3 )),AIROHA_PINCTRL_PHY_LED1 ("gpio45" ,GPIO_LAN2_LED1_MODE_MASK , -LAN2_LED_MAPPING_MASK ,LAN2_PHY_LED_MAP (2 )), +LAN2_LED_MAPPING_MASK ,LAN2_PHY_LED_MAP (3 )),AIROHA_PINCTRL_PHY_LED1 ("gpio46" ,GPIO_LAN3_LED1_MODE_MASK , -LAN3_LED_MAPPING_MASK ,LAN3_PHY_LED_MAP (2 )), +LAN3_LED_MAPPING_MASK ,LAN3_PHY_LED_MAP (3 )), };static const struct airoha_pinctrl_func_group an7583_phy1_led0_func_group[] = {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1492/1518 apparmor: fix kernel-doc comments for inview
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Johansen <[email protected]>
[ Upstream commit 3734b9463bd4fb5ac350842db55e2e0ccbf1b7a5 ]
subns was renamed inview to better reflect the function of the flag. Unfortunately the kernel-doc was not properly updated in 2 places.
--- security/apparmor/label.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
security/apparmor/label.c +2 -2
@@ -1334,7 +1334,7 @@ static int label_compound_match(struct aa_profile *profile,* @rules: ruleset to search * @label: label to check access permissions for * @start: state to start match in -* @subns: whether to match labels in view or only in scope +* @inview: whether to match labels in view or only in scope * @request: permissions to request * @perms: an initialized perms struct to add accumulation to *
@@ -1397,7 +1397,7 @@ static int label_components_match(struct aa_profile *profile,* @rules: ruleset to search * @label: label to match (NOT NULL) * @state: state to start in -* @subns: whether to match labels in view or only in scope +* @inview: whether to match labels in view or only in scope * @request: permission request * @perms: Returns computed perms (NOT NULL) *
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1493/1518 integrity: Eliminate weak definition of arch_get_secureboot()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Chancellor <[email protected]>
[ Upstream commit 7caedbb5ade345df0eec0bf01035c780919a9f56 ]
security/integrity/secure_boot.c contains a single __weak function, which breaks recordmcount when building with clang:
$ make -skj"$(nproc)" ARCH=powerpc LLVM=1 ppc64_defconfig security/integrity/secure_boot.o Cannot find symbol for section 2: .text. security/integrity/secure_boot.o: failed
Introduce a Kconfig symbol, CONFIG_HAVE_ARCH_GET_SECUREBOOT, to indicate that an architecture provides a definition of arch_get_secureboot(). Provide a static inline stub when this symbol is not defined to achieve the same effect as the __weak function, allowing secure_boot.c to be removed altogether. Move the s390 definition of arch_get_secureboot() out of the CONFIG_KEXEC_FILE block to ensure it is always available, as it does not actually depend on KEXEC_FILE.
--- arch/Kconfig | 3 +++ arch/powerpc/Kconfig | 1 + arch/s390/Kconfig | 1 + arch/s390/kernel/ipl.c | 10 +++++----- include/linux/secure_boot.h | 4 ++++ security/integrity/Makefile | 2 +- security/integrity/secure_boot.c | 16 ---------------- 7 files changed, 15 insertions(+), 22 deletions(-) delete mode 100644 security/integrity/secure_boot.c
arch/Kconfig +3 -0
@@ -1841,4 +1841,7 @@ config ARCH_WANTS_PRE_LINK_VMLINUX config ARCH_HAS_CPU_ATTACK_VECTORS bool +config HAVE_ARCH_GET_SECUREBOOT + def_bool EFI + endmenu
arch/powerpc/Kconfig +1 -0
@@ -1059,6 +1059,7 @@ config PPC_SECURE_BOOT depends on IMA_ARCH_POLICY imply IMA_SECURE_AND_OR_TRUSTED_BOOT select PSERIES_PLPKS if PPC_PSERIES + select HAVE_ARCH_GET_SECUREBOOT help Systems with firmware secure boot enabled need to define security policies to extend secure boot to the OS. This config allows a user
arch/s390/Kconfig +1 -0
@@ -177,6 +177,7 @@ config S390 select GENERIC_IOREMAP if PCI select HAVE_ALIGNED_STRUCT_PAGE select HAVE_ARCH_AUDITSYSCALL + select HAVE_ARCH_GET_SECUREBOOT select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN
arch/s390/kernel/ipl.c +5 -5
@@ -2388,6 +2388,11 @@ void __no_stack_protector s390_reset_system(void) diag_amode31_ops.diag308_reset (); } +bool arch_get_secureboot (void ) +{ +return ipl_secure_flag; +} +#ifdef CONFIG_KEXEC_FILE int ipl_report_add_component(struct ipl_report *report, struct kexec_buf *kbuf,
@@ -2505,11 +2510,6 @@ void *ipl_report_finish(struct ipl_report *report)return buf; } -bool arch_get_secureboot (void ) -{ -return ipl_secure_flag; -} -int ipl_report_free (struct ipl_report *report) {struct ipl_report_component *comp, *ncomp;
include/linux/secure_boot.h +4 -0
@@ -10,10 +10,14 @@#include <linux/types.h> +#ifdef CONFIG_HAVE_ARCH_GET_SECUREBOOT /* * Returns true if the platform secure boot is enabled. * Returns false if disabled or not supported. */ bool arch_get_secureboot (void ); +#else +static inline bool arch_get_secureboot (void ) {return false; } +#endif #endif /* _LINUX_SECURE_BOOT_H */
security/integrity/Makefile +1 -1
@@ -5,7 +5,7 @@ obj-$(CONFIG_INTEGRITY) += integrity.o -integrity-y := iint.o secure_boot.o +integrity-y := iint.o integrity-$(CONFIG_INTEGRITY_AUDIT) += integrity_audit.o integrity-$(CONFIG_INTEGRITY_SIGNATURE) += digsig.o integrity-$(CONFIG_INTEGRITY_ASYMMETRIC_KEYS) += digsig_asymmetric.o
security/integrity/secure_boot.c deleted +0 -16
@@ -1,16 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* -* Copyright (C) 2026 Red Hat, Inc. All Rights Reserved. -* -* Author: Coiby Xu <[email protected]> -*/ -#include <linux/secure_boot.h> - -/* -* Default weak implementation. -* Architectures that support secure boot must override this. -*/ -__weak bool arch_get_secureboot (void ) -{ -return false; -}
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1494/1518 block: save page offset gaps in cloned bio
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <[email protected]>
[ Upstream commit 96c8ea3c5add7920b3c43840d1ea76b3354c8d2d ]
The cloned bio needs to inherit the accumulated gaps between vectors so that we can know if this bio can subscribe to the iova coalescing optimization.
When cloning for a split, the gap only applies to the front bio since that's as far as has been processed. The remaining bio can reset its gaps to 0 since it advanced past the checked vectors, and will start its accounting from there on the next split check.
--- block/bio.c | 9 +++++++++ 1 file changed, 9 insertions(+)
block/bio.c +9 -0
@@ -834,6 +834,7 @@ static int __bio_clone(struct bio *bio, struct bio *bio_src, gfp_t gfp) bio->bi_ioprio = bio_src->bi_ioprio; bio->bi_write_hint = bio_src->bi_write_hint; bio->bi_write_stream = bio_src->bi_write_stream; + bio->bi_bvec_gap_bit = bio_src->bi_bvec_gap_bit; bio->bi_iter = bio_src->bi_iter;if (bio->bi_bdev) {
@@ -1717,6 +1718,14 @@ struct bio *bio_split(struct bio *bio, int sectors,bio_advance (bio, split->bi_iter.bi_size); +/* +* The gap bit is set when splitting to limits and only applies to the +* front bio that was split off. The remaining bio will calcualte its +* gap value when it is subsequently split to limits, so it is safe to +* re-initialize the value back to 0. +*/ + bio->bi_bvec_gap_bit =0 ; +if (bio_flagged (bio,BIO_TRACE_COMPLETION ))bio_set_flag (split,BIO_TRACE_COMPLETION );
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1495/1518 blk-mq-dma: always initialize dma state
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <[email protected]>
[ Upstream commit a0750fae73c55112ea11a4867bee40f11e679405 ]
Ensure the dma state is initialized when we're not using the contiguous iova, otherwise the caller may be using a stale state from a previous request that could use the coalesed iova allocation.
--- block/blk-mq-dma.c | 1 + 1 file changed, 1 insertion(+)
block/blk-mq-dma.c +1 -0
@@ -193,6 +193,7 @@ static bool blk_dma_map_iter_start(struct request *req, struct device *dma_dev,if (blk_can_dma_map_iova (req, dma_dev) &&dma_iova_try_alloc (dma_dev, state, vec.paddr, total_len))return blk_rq_dma_map_iova (req, dma_dev, state, iter, &vec); +memset (state,0 ,sizeof (*state));return blk_dma_map_direct (req, dma_dev, iter, &vec); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1496/1518 block: fix merging data-less bios
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Keith Busch <[email protected]>
[ Upstream commit fd9ecd005252b595fd02ff7fcc4056251027404d ]
The data segment gaps the block layer tracks doesn't apply to bio's that don't have data. Skip calculating this to fix a NULL pointer access.
--- block/blk-merge.c | 3 +++ 1 file changed, 3 insertions(+)
block/blk-merge.c +3 -0
@@ -748,6 +748,9 @@ u8 bio_seg_gap(struct request_queue *q, struct bio *prev, struct bio *next, {struct bio_vec pb, nb; +if (!bio_has_data (prev)) +return 0 ; + gaps_bit =min_not_zero (gaps_bit, prev->bi_bvec_gap_bit); gaps_bit =min_not_zero (gaps_bit, next->bi_bvec_gap_bit);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1497/1518 erofs: relax sanity check for tail pclusters due to ztailpacking
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
[ Upstream commit d3386e17393bec1341cfeedb9d08d6846ccd6fb2 ]
If the tail data can be inlined into the inode meta block, it should be converted into a regular tail pcluster.
In principle, it should be converted into an uncompressed pcluster if there is not enough gain to use compression (map->m_llen < map->m_plen); but since there are various shipped images, relax the condition for ztailpacking tail pcluster fallback instead of reporting corruption incorrectly.
--- fs/erofs/zmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/erofs/zmap.c +2 -1
@@ -729,7 +729,8 @@ static int z_erofs_map_sanity_check(struct inode *inode, map->m_algorithmformat, EROFS_I(inode)->nid);return -EFSCORRUPTED ; } -if (EROFS_MAP_FULL (map->m_flags) && map->m_llen < map->m_plen) { +if (EROFS_MAP_FULL (map->m_flags) && map->m_llen < map->m_plen && + map->m_la + map->m_llen < inode->i_size) {erofs_err (inode->i_sb,"too much compressed data @ la %llu of nid %llu" , map->m_la,EROFS_I (inode)->nid);return -EFSCORRUPTED ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1498/1518 erofs: fix EFSCORRUPTED on multi-algorithm images in z_erofs_map_sanity_check()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhan Xusheng <[email protected]>
[ Upstream commit 27f2d085bd72abe4235689d34d8654cfc876d568 ]
Commit a5242d37c83a ("erofs: error out obviously illegal extents in advance") changed the per-extent algorithm presence check from "is the bit set" to "is the only bit set":
- !(sbi->available_compr_algs & (1 << map->m_algorithmformat))
+ (sbi->available_compr_algs ^ BIT(map->m_algorithmformat))
available_compr_algs is a bitmap of every compression algorithm available in the image (z_erofs_parse_cfgs() iterates it with for_each_set_bit()), so an image that enables more than one algorithm has multiple bits set. XOR is zero only when the bitmap is exactly BIT(map->m_algorithmformat); for any image with two or more algorithms the test is non-zero for every extent and the read fails with -EFSCORRUPTED ("inconsistent algorithmtype %u").
Reproducer (mkfs.erofs from erofs-utils 1.7.1):
$ mkdir src
$ yes A | head -c 100K > src/a
$ head -c 64K /dev/zero > src/b
$ mkfs.erofs -zlz4:deflate multi.erofs src
$ mount -t erofs -o loop multi.erofs /mnt
$ cat /mnt/a >/dev/null
cat: /mnt/a: Structure needs cleaning
$ dmesg | tail
erofs (device loop0): inconsistent algorithmtype 0 for nid 46
erofs (device loop0): read error -117 @ 0 of nid 46The erofs on-disk format (Z_EROFS_COMPRESSION_MAX = 4 with LZ4, LZMA, DEFLATE, ZSTD) and the kernel parser explicitly support multi-algorithm images, and erofs-utils 1.7.1 generates them via the "-z X:Y" syntax.
Restore the original per-bit presence check.
--- fs/erofs/zmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/erofs/zmap.c +1 -1
@@ -724,7 +724,7 @@ static int z_erofs_map_sanity_check(struct inode *inode,DBG_BUGON (map->m_algorithmformat >=Z_EROFS_COMPRESSION_RUNTIME_MAX );if (map->m_algorithmformat <Z_EROFS_COMPRESSION_MAX ) { -if (sbi->available_compr_algs ^BIT (map->m_algorithmformat)) { +if (!(sbi->available_compr_algs &BIT (map->m_algorithmformat))) {erofs_err (inode->i_sb,"inconsistent algorithmtype %u for nid %llu" , map->m_algorithmformat,EROFS_I (inode)->nid);return -EFSCORRUPTED ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1499/1518 ipmr: Call ipmr_fib_lookup() under RCU.
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 019c892e46544af0ae94ec833f79aa903c837666 ]
Yi Lai reported RCU splat in reg_vif_xmit() below. [0]
When CONFIG_IP_MROUTE_MULTIPLE_TABLES=n, ipmr_fib_lookup() uses rcu_dereference() without explicit rcu_read_lock().
Although rcu_read_lock_bh() is already held by the caller __dev_queue_xmit(), lockdep requires explicit rcu_read_lock() for rcu_dereference().
Let's move up rcu_read_lock() in reg_vif_xmit() to cover ipmr_fib_lookup().
[0]:
WARNING: suspicious RCU usage 7.1.0-rc2-next-20260504-9d0d467c3572 #1 Not tainted
-----------------------------net/ipv4/ipmr.c:329 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
2 locks held by syz.2.17/1779:
#0: ffffffff87896440 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline] #0: ffffffff87896440 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:891 [inline] #0: ffffffff87896440 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x239/0x4140 net/core/dev.c:4792 #1: ffff88801a199d18 (_xmit_PIMREG#2){+...}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] #1: ffff88801a199d18 (_xmit_PIMREG#2){+...}-{3:3}, at: __netif_tx_lock include/linux/netdevice.h:4795 [inline] #1: ffff88801a199d18 (_xmit_PIMREG#2){+...}-{3:3}, at: __dev_queue_xmit+0x1d5d/0x4140 net/core/dev.c:4865
stack backtrace: CPU: 1 UID: 0 PID: 1779 Comm: syz.2.17 Not tainted 7.1.0-rc2-next-20260504-9d0d467c3572 #1 PREEMPT(lazy) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x121/0x150 lib/dump_stack.c:120 dump_stack+0x19/0x20 lib/dump_stack.c:129 lockdep_rcu_suspicious+0x15b/0x1f0 kernel/locking/lockdep.c:6878 ipmr_fib_lookup net/ipv4/ipmr.c:329 [inline] reg_vif_xmit+0x2ee/0x3c0 net/ipv4/ipmr.c:540 __netdev_start_xmit include/linux/netdevice.h:5382 [inline] netdev_start_xmit include/linux/netdevice.h:5391 [inline] xmit_one net/core/dev.c:3889 [inline] dev_hard_start_xmit+0x170/0x700 net/core/dev.c:3905 __dev_queue_xmit+0x1df1/0x4140 net/core/dev.c:4871 dev_queue_xmit include/linux/netdevice.h:3423 [inline] packet_xmit+0x252/0x370 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3082 [inline] packet_sendmsg+0x39ad/0x5650 net/packet/af_packet.c:3114 sock_sendmsg_nosec net/socket.c:797 [inline] __sock_sendmsg net/socket.c:812 [inline] ____sys_sendmsg+0xa21/0xba0 net/socket.c:2716 ___sys_sendmsg+0x121/0x1c0 net/socket.c:2770 __sys_sendmsg+0x177/0x220 net/socket.c:2802 __do_sys_sendmsg net/socket.c:2807 [inline] __se_sys_sendmsg net/socket.c:2805 [inline] __x64_sys_sendmsg+0x80/0xc0 net/socket.c:2805 x64_sys_call+0x1d9c/0x21c0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc1/0x1020 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f37e563ee5d Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 93 af 1b 00 f7 d8 64 89 01 48 RSP: 002b:00007ffe5caa7fa8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000005c5fa0 RCX: 00007f37e563ee5d RDX: 0000000000000000 RSI: 00002000000012c0 RDI: 0000000000000004 RBP: 00000000005c5fa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00000000005c5fac R15: 00000000005c5fa0 </TASK>
--- net/ipv4/ipmr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv4/ipmr.c +2 -1
@@ -530,15 +530,16 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, struct net_device *dev) };int err; +rcu_read_lock (); err =ipmr_fib_lookup (net, &fl4, &mrt);if (err <0 ) { +rcu_read_unlock ();kfree_skb (skb);return err; }DEV_STATS_ADD (dev, tx_bytes, skb->len);DEV_STATS_INC (dev, tx_packets); -rcu_read_lock ();/* Pairs with WRITE_ONCE() in vif_add() and vif_delete() */ ipmr_cache_report(mrt, skb, READ_ONCE(mrt->mroute_reg_vif_num),
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1500/1518 ipmr: Add __rcu to netns_ipv4.mrt.
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit a6039776c7994dd0b9a4acce23a3f897d1688cbf ]
kernel test robot reported this Sparse warning:
$ make C=1 net/ipv4/ipmr.o net/ipv4/ipmr.c:312:24: error: incompatible types in comparison expression (different address spaces): net/ipv4/ipmr.c:312:24: struct mr_table [noderef] __rcu * net/ipv4/ipmr.c:312:24: struct mr_table *
Let's add __rcu annotation to netns_ipv4.mrt.
--- include/net/netns/ipv4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/netns/ipv4.h +1 -1
@@ -271,7 +271,7 @@ struct netns_ipv4 {#ifdef CONFIG_IP_MROUTE #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES -struct mr_table *mrt; +struct mr_table __rcu *mrt;#else struct list_head mr_tables;struct fib_rules_ops *mr_rules_ops;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1501/1518 tcp: reject non zerocopy devmem tx
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov <[email protected]>
[ Upstream commit 125755776bc6d4dd53eaf551c87e3d460625d638 ]
Devmem tcp tx doesn't work without zero-copy, however it's not currently enforced if NETIF_F_SG isn't present. In this case, tcp_sendmsg_locked() will try the copy path and try to copy data from an iovec which consists of offsets into the dma-buf and would normally fail. Moreover, d9c56501c72fd ("net: tcp: block mixing readable and unreadable frags") relies on that and assumes that the devmem binding is present IFF we're using the zero-copy path, which can be used to mix net-iov and pages in a single skb, and break invariants. Let's reject devmem tx without zero-copy.
Note, the parameter check the patch is modifying is too loose, we can create an io_uring request with dmabuf_id and all ZC flags, but which won't have the binding. We replace it with stricter validation.
--- net/ipv4/tcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/ipv4/tcp.c +1 -2
@@ -1132,8 +1132,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) zc =MSG_SPLICE_PAGES ; } -if (!sockc_err && sockc.dmabuf_id && - (!(flags &MSG_ZEROCOPY ) || !sock_flag (sk,SOCK_ZEROCOPY ))) { +if (!sockc_err && sockc.dmabuf_id && (zc !=MSG_ZEROCOPY || !binding)) { err = -EINVAL ; goto out_err; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1502/1518 Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit 81f971c6abec59240e2bcfc38756bda8172fa788 ]
When USB support is disabled, the array is not referenced anywhere, causing a warning:
drivers/bluetooth/btmtk.c:35:3: error: 'btmtk_mt6639_devs' defined but not used [-Werror=unused-const-variable=]
35 | } btmtk_mt6639_devs[] = {
| ^~~~~~~~~~~~~~~~~Move it into the #ifdef block.
--- drivers/bluetooth/btmtk.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/bluetooth/btmtk.c +16 -16
@@ -25,22 +25,6 @@/* It is for mt79xx iso data transmission setting */ #define MTK_ISO_THRESHOLD 264 -/* Known MT6639 (MT7927) Bluetooth USB devices. -* Used to scope the zero-CHIPID workaround to real MT6639 hardware, -* since some boards return 0x0000 from the MMIO chip ID register. -*/ -static const struct { -u16 vendor; -u16 product; -} btmtk_mt6639_devs[] = { - {0x0489 ,0xe13a },/* ASUS ROG Crosshair X870E Hero */ - {0x0489 ,0xe0fa },/* Lenovo Legion Pro 7 16ARX9 */ - {0x0489 ,0xe10f },/* Gigabyte Z790 AORUS MASTER X */ - {0x0489 ,0xe110 },/* MSI X870E Ace Max */ - {0x0489 ,0xe116 },/* TP-Link Archer TBE550E */ - {0x13d3 ,0x3588 },/* ASUS ROG STRIX X870E-E */ -}; -struct btmtk_patch_header {u8 datetime[16 ];u8 platform[4 ];
@@ -471,6 +455,22 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)EXPORT_SYMBOL_GPL (btmtk_process_coredump);#if IS_ENABLED (CONFIG_BT_HCIBTUSB_MTK ) +/* Known MT6639 (MT7927) Bluetooth USB devices. +* Used to scope the zero-CHIPID workaround to real MT6639 hardware, +* since some boards return 0x0000 from the MMIO chip ID register. +*/ +static const struct { +u16 vendor; +u16 product; +} btmtk_mt6639_devs[] = { + {0x0489 ,0xe13a },/* ASUS ROG Crosshair X870E Hero */ + {0x0489 ,0xe0fa },/* Lenovo Legion Pro 7 16ARX9 */ + {0x0489 ,0xe10f },/* Gigabyte Z790 AORUS MASTER X */ + {0x0489 ,0xe110 },/* MSI X870E Ace Max */ + {0x0489 ,0xe116 },/* TP-Link Archer TBE550E */ + {0x13d3 ,0x3588 },/* ASUS ROG STRIX X870E-E */ +}; +static void btmtk_usb_wmt_recv (struct urb *urb) {struct hci_dev *hdev = urb->context;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1503/1518 net/sched: fq: clamp quantum and initial_quantum in change path
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jamal Hadi Salim <[email protected]>
[ Upstream commit 094cc07f98dfe70a34e2a1923af17fd29b8cf622 ]
The fq change path accepts TCA_FQ_QUANTUM in [1, INT_MAX] and TCA_FQ_INITIAL_QUANTUM up to INT_MAX, while fq_init() already clamps to [1, 1<<20]. A user can override the init clamp via tc qdisc change, restoring the small-quantum deficit spin that the init clamp prevents.
Narrow iq_range.max to 1<<20 so TCA_FQ_INITIAL_QUANTUM is rejected at parse time. Clamp TCA_FQ_QUANTUM to [256, 1<<20] in fq_change() and fq_init() quantum to [256, 1<<20] for tiny-MTU devices.
Conditions to recreate the bug:
CONFIG_NET_SCH_FQ=y. Requires CAP_NET_ADMIN (namespace-local via unshare -Urn suffices).
tc qdisc add dev dummy0 root fq
tc qdisc change dev dummy0 root fq quantum 1 stab data 32768 size_log 15 cell_log 0
--- net/sched/sch_fq.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
net/sched/sch_fq.c +5 -9
@@ -924,7 +924,7 @@ static int fq_resize(struct Qdisc *sch, u32 log) }static const struct netlink_range_validation iq_range = { - .max =INT_MAX , + .max =1 <<20 , };static const struct nla_policy fq_policy[TCA_FQ_MAX +1 ] = {
@@ -1050,14 +1050,10 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt, nla_get_u32(tb[TCA_FQ_FLOW_PLIMIT]));if (tb[TCA_FQ_QUANTUM ]) { -u32 quantum =nla_get_u32 (tb[TCA_FQ_QUANTUM ]); +u32 quantum =clamp_t (u32,nla_get_u32 (tb[TCA_FQ_QUANTUM ]), +256 ,1 <<20 ); -if (quantum >0 && quantum <= (1 <<20 )) { -WRITE_ONCE (q->quantum, quantum); - }else { -NL_SET_ERR_MSG_MOD (extack,"invalid quantum" ); - err = -EINVAL ; - } +WRITE_ONCE (q->quantum, quantum); }if (tb[TCA_FQ_INITIAL_QUANTUM ])
@@ -1176,7 +1172,7 @@ static int fq_init(struct Qdisc *sch, struct nlattr *opt, sch->limit =10000 ; q->flow_plimit =100 ; mtu =clamp_t (u32,psched_mtu (qdisc_dev (sch)),1 ,1 <<20 ); - q->quantum =min_t (u32,2 * mtu,1 <<20 ); + q->quantum =clamp_t (u32,2 * mtu,256 ,1 <<20 ); q->initial_quantum =min_t (u32,10 * mtu,1 <<20 ); q->flow_refill_delay =msecs_to_jiffies (40 ); q->flow_max_rate = ~0UL ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1504/1518 io_uring/waitid: use io_waitid_remove_wq() consistently
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jens Axboe <[email protected]>
[ Upstream commit ab673c1bcaf20ac70352eeb6bf5b828462676693 ]
Use it everywhere that the wait_queue_entry is removed from the head, and be a bit more cautious in zeroing out iw->head whenever the entry is removed from the list.
Stable-dep-of: b994ace83a2b ("io_uring/waitid: fix KCSAN warning on io_waitid->head")
--- io_uring/waitid.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
io_uring/waitid.c +11 -4
@@ -193,18 +193,18 @@ bool io_waitid_remove_all(struct io_ring_ctx *ctx, struct io_uring_task *tctx,static inline bool io_waitid_drop_issue_ref (struct io_kiocb *req) { struct io_waitid *iw = io_kiocb_to_cmd(req, struct io_waitid); -struct io_waitid_async *iwa = req->async_data;if (!atomic_sub_return (1 , &iw->refs))return false; +io_waitid_remove_wq (req); +/* * Wakeup triggered, racing with us. It was prevented from * completing because of that, queue up the tw to do that. */ req->io_task_work.func = io_waitid_cb;io_req_task_work_add (req); -remove_wait_queue (iw->head, &iwa->wo.child_wait);return true; }
@@ -265,6 +265,7 @@ static int io_waitid_wait(struct wait_queue_entry *wait, unsigned mode,return 0 ;list_del_init (&wait->entry); + iw->head =NULL ;/* cancel is in progress */ if (atomic_fetch_inc (&iw->refs) &IO_WAITID_REF_MASK )
@@ -291,6 +292,7 @@ int io_waitid_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) iw->which =READ_ONCE (sqe->len); iw->upid =READ_ONCE (sqe->fd); iw->options =READ_ONCE (sqe->file_index); + iw->head =NULL ; iw->infop =u64_to_user_ptr (READ_ONCE (sqe->addr2));memset (&iw->info,0 ,sizeof (iw->info));return 0 ;
@@ -322,11 +324,16 @@ int io_waitid(struct io_kiocb *req, unsigned int issue_flags)* callback. */ io_ring_submit_lock (ctx, issue_flags); + +/* +* iw->head is valid under the ring lock, and as long as the request +* is on the waitid_list where cancelations may find it. +*/ + iw->head = ¤t->signal->wait_chldexit;hlist_add_head (&req->hash_node, &ctx->waitid_list);init_waitqueue_func_entry (&iwa->wo.child_wait, io_waitid_wait); iwa->wo.child_wait.private = req->tctx->task; - iw->head = ¤t->signal->wait_chldexit;add_wait_queue (iw->head, &iwa->wo.child_wait); ret =__do_wait (&iwa->wo);
@@ -349,7 +356,7 @@ int io_waitid(struct io_kiocb *req, unsigned int issue_flags) }hlist_del_init (&req->hash_node); -remove_wait_queue (iw->head, &iwa->wo.child_wait); +io_waitid_remove_wq (req); ret =io_waitid_finish (req, ret);io_ring_submit_unlock (ctx, issue_flags);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1505/1518 io_uring/waitid: fix KCSAN warning on io_waitid->head
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jens Axboe <[email protected]>
[ Upstream commit b994ace83a2bc7699420f6a4c6b860c8da133159 ]
Storing of the iw->head entry inside the wait_queue callback, or when removing a waitid item, really should use proper load/store acquire/release semantics, and KCSAN correctly warns of that. Ensure that they do so.
--- io_uring/waitid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
io_uring/waitid.c +3 -3
@@ -114,11 +114,11 @@ static void io_waitid_remove_wq(struct io_kiocb *req) struct io_waitid *iw = io_kiocb_to_cmd(req, struct io_waitid);struct wait_queue_head *head; - head =READ_ONCE (iw->head); + head =smp_load_acquire (&iw->head);if (head) {struct io_waitid_async *iwa = req->async_data; - iw->head =NULL ; +smp_store_release (&iw->head,NULL );spin_lock_irq (&head->lock);list_del_init (&iwa->wo.child_wait.entry);spin_unlock_irq (&head->lock);
@@ -265,7 +265,7 @@ static int io_waitid_wait(struct wait_queue_entry *wait, unsigned mode,return 0 ;list_del_init (&wait->entry); - iw->head =NULL ; +smp_store_release (&iw->head,NULL );/* cancel is in progress */ if (atomic_fetch_inc (&iw->refs) &IO_WAITID_REF_MASK )
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1506/1518 cpufreq/amd-pstate: Fix some whitespace issues
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello (AMD) <[email protected]>
[ Upstream commit e9d62ca86a5525a742742fe69e9aa316cfd4f471 ]
Add whitespace around the equals and remove leading space.
Stable-dep-of: caa822d312be ("cpufreq/amd-pstate: Use "epp_default_dc" as default when dynamic_epp is disabled")
--- drivers/cpufreq/amd-pstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/amd-pstate.c +2 -2
@@ -132,7 +132,7 @@ static unsigned int epp_values[] = { [EPP_INDEX_BALANCE_PERFORMANCE] = AMD_CPPC_EPP_BALANCE_PERFORMANCE, [EPP_INDEX_BALANCE_POWERSAVE] = AMD_CPPC_EPP_BALANCE_POWERSAVE, [EPP_INDEX_POWERSAVE] = AMD_CPPC_EPP_POWERSAVE, - }; +};typedef int (*cppc_mode_transition_fn )(int );
@@ -188,7 +188,7 @@ static inline int get_mode_idx_from_str(const char *str, size_t size) {int i; -for (i=0 ; i <AMD_PSTATE_MAX ; i++) { +for (i =0 ; i <AMD_PSTATE_MAX ; i++) {if (!strncmp (str, amd_pstate_mode_string[i], size))return i; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1507/1518 cpufreq/amd-pstate: Add static asserts for EPP indices
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello (AMD) <[email protected]>
[ Upstream commit 077f23573d29d063a950e90aa77c8e1f79580147 ]
In case a new index is introduced add a static assert to make sure that strings and values are updated.
Stable-dep-of: caa822d312be ("cpufreq/amd-pstate: Use "epp_default_dc" as default when dynamic_epp is disabled")
--- drivers/cpufreq/amd-pstate.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/cpufreq/amd-pstate.c +3 -0
@@ -116,6 +116,7 @@ enum energy_perf_value_index {EPP_INDEX_BALANCE_PERFORMANCE ,EPP_INDEX_BALANCE_POWERSAVE ,EPP_INDEX_POWERSAVE , + EPP_INDEX_MAX, }; static const char * const energy_perf_strings[] = {
@@ -125,6 +126,7 @@ static const char * const energy_perf_strings[] = { [EPP_INDEX_BALANCE_POWERSAVE] = "balance_power", [EPP_INDEX_POWERSAVE ] ="power" , }; +static_assert (ARRAY_SIZE (energy_perf_strings) ==EPP_INDEX_MAX );static unsigned int epp_values[] = { [EPP_INDEX_DEFAULT] = 0,
@@ -133,6 +135,7 @@ static unsigned int epp_values[] = { [EPP_INDEX_BALANCE_POWERSAVE] = AMD_CPPC_EPP_BALANCE_POWERSAVE, [EPP_INDEX_POWERSAVE ] =AMD_CPPC_EPP_POWERSAVE , }; +static_assert (ARRAY_SIZE (epp_values) ==EPP_INDEX_MAX );typedef int (*cppc_mode_transition_fn )(int );
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1508/1518 cpufreq/amd-pstate: Add support for raw EPP writes
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello (AMD) <[email protected]>
[ Upstream commit 6927f21852f38db2975b5d5539cbe5241c25a99b ]
The energy performance preference field of the CPPC request MSR supports values from 0 to 255, but the strings only offer 4 values.
The other values are useful for tuning the performance of some workloads.
Add support for writing the raw energy performance preference value to the sysfs file. If the last value written was an integer then an integer will be returned. If the last value written was a string then a string will be returned.
Stable-dep-of: caa822d312be ("cpufreq/amd-pstate: Use "epp_default_dc" as default when dynamic_epp is disabled")
--- Documentation/admin-guide/pm/amd-pstate.rst | 16 ++++++--- drivers/cpufreq/amd-pstate.c | 36 +++++++++++++++------ drivers/cpufreq/amd-pstate.h | 1 + 3 files changed, 38 insertions(+), 15 deletions(-)
Documentation/admin-guide/pm/amd-pstate.rst +11 -5
@@ -280,16 +280,22 @@ A list of all the supported EPP preferences that could be used for These profiles represent different hints that are provided to the low-level firmware about the user's desired energy vs efficiency tradeoff. ``default`` represents the epp value is set by platform -firmware. This attribute is read-only. +firmware. ``custom`` designates that integer values 0-255 may be written +as well. This attribute is read-only. ``energy_performance_preference`` The current energy performance preference can be read from this attribute. and user can change current preference according to energy or performance needs -Please get all support profiles list from -``energy_performance_available_preferences`` attribute, all the profiles are -integer values defined between 0 to 255 when EPP feature is enabled by platform -firmware, but if the dynamic EPP feature is enabled, driver will block writes. +Coarse named profiles are available in the attribute +``energy_performance_available_preferences``. +Users can also write individual integer values between 0 to 255. +When dynamic EPP is enabled, writes to energy_performance_preference are blocked +even when EPP feature is enabled by platform firmware. Lower epp values shift the bias +towards improved performance while a higher epp value shifts the bias towards +power-savings. The exact impact can change from one platform to the other. +If a valid integer was last written, then a number will be returned on future reads. +If a valid string was last written then a string will be returned on future reads. This attribute is read-write. ``boost``
drivers/cpufreq/amd-pstate.c +26 -10
@@ -109,6 +109,7 @@ static struct quirk_entry *quirks;* 2 balance_performance * 3 balance_power * 4 power +* 5 custom (for raw EPP values) */ enum energy_perf_value_index {EPP_INDEX_DEFAULT =0 ,
@@ -116,6 +117,7 @@ enum energy_perf_value_index {EPP_INDEX_BALANCE_PERFORMANCE ,EPP_INDEX_BALANCE_POWERSAVE ,EPP_INDEX_POWERSAVE , +EPP_INDEX_CUSTOM , EPP_INDEX_MAX, };
@@ -125,6 +127,7 @@ static const char * const energy_perf_strings[] = { [EPP_INDEX_BALANCE_PERFORMANCE] = "balance_performance", [EPP_INDEX_BALANCE_POWERSAVE] = "balance_power", [EPP_INDEX_POWERSAVE] = "power", + [EPP_INDEX_CUSTOM ] ="custom" , };static_assert (ARRAY_SIZE (energy_perf_strings) ==EPP_INDEX_MAX );
@@ -135,7 +138,7 @@ static unsigned int epp_values[] = { [EPP_INDEX_BALANCE_POWERSAVE] = AMD_CPPC_EPP_BALANCE_POWERSAVE, [EPP_INDEX_POWERSAVE ] =AMD_CPPC_EPP_POWERSAVE , }; -static_assert (ARRAY_SIZE (epp_values) ==EPP_INDEX_MAX ); +static_assert (ARRAY_SIZE (epp_values) ==EPP_INDEX_MAX -1 );typedef int (*cppc_mode_transition_fn )(int );
@@ -1351,6 +1354,7 @@ static ssize_t store_energy_performance_preference(struct cpufreq_policy *policy {struct amd_cpudata *cpudata = policy->driver_data;ssize_t ret; +bool raw_epp = false;u8 epp;if (cpudata->dynamic_epp) {
@@ -1358,14 +1362,21 @@ static ssize_t store_energy_performance_preference(struct cpufreq_policy *policyreturn -EBUSY ; } - ret =sysfs_match_string (energy_perf_strings, buf); -if (ret <0 ) -return -EINVAL ; - -if (ret) - epp = epp_values[ret]; -else - epp =amd_pstate_get_balanced_epp (policy); +/* +* if the value matches a number, use that, otherwise see if +* matches an index in the energy_perf_strings array +*/ + ret =kstrtou8 (buf,0 , &epp); + raw_epp = !ret; +if (ret) { + ret =sysfs_match_string (energy_perf_strings, buf); +if (ret <0 || ret ==EPP_INDEX_CUSTOM ) +return -EINVAL ; +if (ret) + epp = epp_values[ret]; +else + epp =amd_pstate_get_balanced_epp (policy); + }if (epp >0 && cpudata->policy ==CPUFREQ_POLICY_PERFORMANCE ) {pr_debug ("EPP cannot be set under performance policy\n" );
@@ -1376,7 +1387,9 @@ static ssize_t store_energy_performance_preference(struct cpufreq_policy *policyif (ret)return ret; -return ret ? ret : count; + cpudata->raw_epp = raw_epp; + +return count; }static ssize_t show_energy_performance_preference (struct cpufreq_policy *policy,char *buf)
@@ -1386,6 +1399,9 @@ static ssize_t show_energy_performance_preference(struct cpufreq_policy *policy, epp =FIELD_GET (AMD_CPPC_EPP_PERF_MASK , cpudata->cppc_req_cached); +if (cpudata->raw_epp) +return sysfs_emit (buf,"%u\n" , epp); +switch (epp) {case AMD_CPPC_EPP_PERFORMANCE : preference =EPP_INDEX_PERFORMANCE ;
drivers/cpufreq/amd-pstate.h +1 -0
@@ -114,6 +114,7 @@ struct amd_cpudata {u8 epp_default_ac;u8 epp_default_dc;bool dynamic_epp; +bool raw_epp;struct notifier_block power_nb;/* platform profile */
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1509/1518 cpufreq/amd-pstate: Use "epp_default_dc" as default when dynamic_epp is disabled
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <[email protected]>
[ Upstream commit caa822d312be54e3fe1a3b52c887e0888e149c12 ]
If "dynamic_epp" is disabled, the driver initialization and the default EPP selection from sysfs currently sets the EPP based on the power supply state of the system at that time but there is no power supply callbacks registered to toggle it when the power supply state changes.
This can lead to faster battery drain on platforms that start off while being plugged to the wall but later move to battery power since the EPP stays at AMD_CPPC_EPP_PERFORMANCE.
Use "epp_default_dc" as the default EPP selection when dynamic_epp is disabled, restoring older behavior. On servers, this defaults to AMD_CPPC_EPP_PERFORMANCE and on other platforms, it defaults to AMD_CPPC_EPP_BALANCE_PERFORMANCE.
--- drivers/cpufreq/amd-pstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/amd-pstate.c +2 -2
@@ -1375,7 +1375,7 @@ static ssize_t store_energy_performance_preference(struct cpufreq_policy *policyif (ret) epp = epp_values[ret];else - epp =amd_pstate_get_balanced_epp (policy); + epp = cpudata->epp_default_dc; }if (epp >0 && cpudata->policy ==CPUFREQ_POLICY_PERFORMANCE ) {
@@ -1850,7 +1850,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)if (dynamic_epp) ret =amd_pstate_set_dynamic_epp (policy);else - ret =amd_pstate_set_epp (policy,amd_pstate_get_balanced_epp (policy)); + ret =amd_pstate_set_epp (policy, cpudata->epp_default_dc);if (ret) goto free_cpudata1;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1510/1518 cpufreq/amd-pstate: Allow writes to dynamic_epp when state isnt modified
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: K Prateek Nayak <[email protected]>
[ Upstream commit c5eed6ddc757e477f52b3d99bfde9e59975c72ca ]
Writing the current "dynamic_epp" state to sysfs fails with -EINVAL even though the desired result was achieved. Allow writes to "dynamic_epp" that does not modify the state.
--- drivers/cpufreq/amd-pstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpufreq/amd-pstate.c +2 -1
@@ -1719,8 +1719,9 @@ static ssize_t dynamic_epp_store(struct device *a, struct device_attribute *b,return -EINVAL ; } +/* Nothing to do */ if (dynamic_epp == enabled) -return -EINVAL ; +return count;/* reinitialize with desired dynamic EPP value */ dynamic_epp = enabled;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1511/1518 ACPI: processor: idle: Remove redundant cstate check in acpi_processor_power_init
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huisong Li <[email protected]>
[ Upstream commit db19103ea847ed139da59a2fb71773081c12cd40 ]
The function acpi_processor_cstate_first_run_checks() is responsible for updating max_cstate and performing initial hardware validation.
Currently, this function is invoked within acpi_processor_power_init(). However, the initialization flow already ensures this is called during acpi_processor_register_idle_driver(). Therefore, the call in acpi_processor_power_init() is redundant and effectively performs no work, so remove it.
Stable-dep-of: 66c62e6773c5 ("ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()")
--- drivers/acpi/processor_idle.c | 2 -- 1 file changed, 2 deletions(-)
drivers/acpi/processor_idle.c +0 -2
@@ -1423,8 +1423,6 @@ int acpi_processor_power_init(struct acpi_processor *pr)if (disabled_by_idle_boot_param ())return 0 ; -acpi_processor_cstate_first_run_checks (); -if (!acpi_processor_get_power_info (pr)) pr->flags.power_setup_done =1 ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1512/1518 ACPI: processor: idle: Move max_cstate update out of the loop
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huisong Li <[email protected]>
[ Upstream commit 1f23194c8b8208bf3a43beb6c97d4c843197b6f6 ]
The acpi_processor_cstate_first_run_checks() function, which updates max_cstate on certain platforms, only needs to be executed once.
Move this call outside of the loop to avoid redundant executions.
Stable-dep-of: 66c62e6773c5 ("ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()")
--- drivers/acpi/processor_idle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/processor_idle.c +2 -1
@@ -1377,6 +1377,8 @@ void acpi_processor_register_idle_driver(void)int ret = -ENODEV ;int cpu; +acpi_processor_cstate_first_run_checks (); +/* * ACPI idle driver is used by all possible CPUs. * Use the processor power info of one in them to set up idle states.
@@ -1388,7 +1390,6 @@ void acpi_processor_register_idle_driver(void)if (!pr)continue ; -acpi_processor_cstate_first_run_checks (); ret =acpi_processor_get_power_info (pr);if (!ret) { pr->flags.power_setup_done =1 ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1513/1518 ACPI: processor: idle: Remove redundant static variable and rename cstate check function
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huisong Li <[email protected]>
[ Upstream commit 4d613fb1ea0516e1f69d3a4ebfbf2572d5da5368 ]
The function acpi_processor_cstate_first_run_checks() is currently called only once during initialization in acpi_processor_register_idle_driver().
Since its execution is already limited by the caller's lifecycle, the internal static 'first_run' variable is redundant and can be safely removed.
Additionally, the current function name is no longer descriptive of its behavior, so rename the function to acpi_processor_update_max_cstate() to better reflect its actual purpose.
Stable-dep-of: 66c62e6773c5 ("ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()")
--- drivers/acpi/processor_idle.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/acpi/processor_idle.c +3 -9
@@ -831,19 +831,13 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr)return 0 ; } -static inline void acpi_processor_cstate_first_run_checks (void ) +static inline void acpi_processor_update_max_cstate (void ) { -static int first_run; - -if (first_run) -return ;dmi_check_system (processor_power_dmi_table); max_cstate =acpi_processor_cstate_check (max_cstate);if (max_cstate <ACPI_C_STATES_MAX )pr_notice ("processor limited to max C-state %d\n" , max_cstate); - first_run++; -if (nocst)return ;
@@ -852,7 +846,7 @@ static inline void acpi_processor_cstate_first_run_checks(void)#else static inline int disabled_by_idle_boot_param (void ) {return 0 ; } -static inline void acpi_processor_cstate_first_run_checks (void ) { } +static inline void acpi_processor_update_max_cstate (void ) { }static int acpi_processor_get_cstate_info (struct acpi_processor *pr) {return -ENODEV ;
@@ -1377,7 +1371,7 @@ void acpi_processor_register_idle_driver(void)int ret = -ENODEV ;int cpu; -acpi_processor_cstate_first_run_checks (); +acpi_processor_update_max_cstate ();/* * ACPI idle driver is used by all possible CPUs.
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1514/1518 ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony W Wang-oc <[email protected]>
[ Upstream commit 66c62e6773c54ce5233eb21c6d48999c3747bd13 ]
Commit 7a8c994cbb2d ("ACPI: processor: idle: Optimize ACPI idle driver registration") moved the ACPI idle driver registration to acpi_processor_driver_init(), but it didn't check whether a cpuidle driver was already registered.
For example, on Intel platforms, if the intel_idle driver is already loaded, the code would still evaluate the _CST object in the ACPI table and attempt to register the acpi_idle driver. This registration would fail with -EBUSY due to the existing check in cpuidle_register_driver.
Add a check at the beginning of acpi_processor_register_idle_driver() to avoid unnecessary _CST evaluate and potential registration failures.
--- drivers/acpi/processor_idle.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/acpi/processor_idle.c +9 -0
@@ -1371,6 +1371,15 @@ void acpi_processor_register_idle_driver(void)int ret = -ENODEV ;int cpu; +/* +* If a cpuidle driver is already registered, there is no need to +* evaluate _CST or attempt to register the ACPI idle driver. +*/ +if (cpuidle_get_driver ()) { +pr_debug ("cpuidle driver %pS already registered.\n" ,cpuidle_get_driver ()); +return ; + } +acpi_processor_update_max_cstate ();/*
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1515/1518 pinctrl: airoha: an7583: add missed gpio22 pin group
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Kshevetskiy <[email protected]>
[ Upstream commit 9ef86358855d5fd89db019ace33c097d2d752b9d ]
gpio22 pin group is missed, fix it.
--- drivers/pinctrl/mediatek/pinctrl-airoha.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pinctrl/mediatek/pinctrl-airoha.c +2 -0
@@ -768,6 +768,7 @@ static const int an7583_gpio18_pins[] = { 20 };static const int an7583_gpio19_pins[] = {21 };static const int an7583_gpio20_pins[] = {22 };static const int an7583_gpio21_pins[] = {23 }; +static const int an7583_gpio22_pins[] = {24 };static const int an7583_gpio23_pins[] = {25 };static const int an7583_gpio24_pins[] = {26 };static const int an7583_gpio25_pins[] = {27 };
@@ -851,6 +852,7 @@ static const struct pingroup an7583_pinctrl_groups[] = {PINCTRL_PIN_GROUP ("gpio19" , an7583_gpio19),PINCTRL_PIN_GROUP ("gpio20" , an7583_gpio20),PINCTRL_PIN_GROUP ("gpio21" , an7583_gpio21), +PINCTRL_PIN_GROUP ("gpio22" , an7583_gpio22),PINCTRL_PIN_GROUP ("gpio23" , an7583_gpio23),PINCTRL_PIN_GROUP ("gpio24" , an7583_gpio24), PINCTRL_PIN_GROUP("gpio25", an7583_gpio25),
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 1516/1518 staging: rtl8723bs: os_dep: avoid NULL pointer dereference in rtw_cbuf_alloc
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Sunder Reddy Padira <[email protected]>
commit bc851db06045a40c18233dd76ef0562d7f8bb6db upstream.
The return value of kzalloc_flex() is used without ensuring that the allocation succeeded, and the pointer is dereferenced unconditionally.
Guard the access to the allocated structure to
avoid a potential NULL pointer dereference if the
allocation fails.
--- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/osdep_service.c +2 -1
@@ -224,7 +224,8 @@ struct rtw_cbuf *rtw_cbuf_alloc(u32 sizestruct rtw_cbuf *cbuf; cbuf =kzalloc (struct_size (cbuf, bufs, size),GFP_KERNEL ); - cbuf->size = size; +if (cbuf) + cbuf->size = size;return cbuf; }
Greg Kroah-Hartman
maintainerPATCH 1517/1518 staging: rtl8723bs: rtw_mlme: add bounds checks before ie_length subtraction
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Salman Alghamdi <[email protected]>
commit 88e994c57a79f62d5338231d8d37ee8dd98baffe upstream.
Add guards to ensure ie_length is large enough before subtracting fixed IE offsets to prevent unsigned integer underflow.
--- drivers/staging/rtl8723bs/core/rtw_mlme.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +10 -4
@@ -612,6 +612,8 @@ int rtw_is_desired_network(struct adapte privacy = pnetwork->network.privacy;if (check_fwstate (pmlmepriv,WIFI_UNDER_WPS )) { +if (pnetwork->network.ie_length < _FIXED_IE_LENGTH_) +return false;if (rtw_get_wps_ie (pnetwork->network.ies+_FIXED_IE_LENGTH_, pnetwork->network.ie_length-_FIXED_IE_LENGTH_,NULL , &wps_ielen))return true;else
@@ -625,11 +627,15 @@ int rtw_is_desired_network(struct adapte bselected = false;if (psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPA2PSK) { - p =rtw_get_ie (pnetwork->network.ies + _BEACON_IE_OFFSET_,WLAN_EID_RSN , &ie_len, (pnetwork->network.ie_length - _BEACON_IE_OFFSET_)); -if (p && ie_len >0 ) - bselected = true; -else +if (pnetwork->network.ie_length < _BEACON_IE_OFFSET_) { bselected = false; + }else { + p =rtw_get_ie (pnetwork->network.ies + _BEACON_IE_OFFSET_,WLAN_EID_RSN , &ie_len, (pnetwork->network.ie_length - _BEACON_IE_OFFSET_)); +if (p && ie_len >0 ) + bselected = true; +else + bselected = false; + } } }
Greg Kroah-Hartman
maintainerPATCH 1518/1518 wifi: mt76: fix airoha_npu dependency tracking
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 7cd57ff6c6263519e6e463cbc2e0898828a70c42 upstream.
There is a new build failure with MT7996E=m MT76_CORE=y and NET_AIROHA_NPU=m:
ld.lld: error: undefined symbol: airoha_npu_get
ld.lld: error: undefined symbol: airoha_npu_put
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
npu.c
drivers/net/wireless/mediatek/mt76/npu.o:(mt76_npu_init) in archive vmlinux.a
Fix this by reworking the dependency for the MT7996_NPU to only allow enabling that when mt76_core can link against the npu driver.
To make sure this gets caught more easily in the future when additional mt76 variants need the same dependency, also turn CONFIG_MT76_NPU into a tristate symbol that has the same dependency.
--- drivers/net/wireless/mediatek/mt76/Kconfig | 4 ++-- drivers/net/wireless/mediatek/mt76/Makefile | 6 +++++- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/Kconfig +2 -2
@@ -38,8 +38,8 @@ config MT792x_USB select MT76_USB config MT76_NPU - bool - depends on MT76_CORE + tristate + depends on NET_AIROHA_NPU=y || MT76_CORE=NET_AIROHA_NPU source "drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig" source "drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig"
drivers/net/wireless/mediatek/mt76/Makefile +5 -1
@@ -12,7 +12,11 @@ mt76-y := \ mmio.o util.o trace.o dma.o mac80211.o debugfs.o eeprom.o \ tx.o agg-rx.o mcu.o wed.o scan.o channel.o -mt76-$(CONFIG_MT76_NPU) += npu.o +ifdef CONFIG_MT76_NPU +# CONFIG_MT76_NPU is tristate to simplify dependency tracking, +# but it behaves as a bool symbol here. +mt76-y += npu.o +endif mt76-$(CONFIG_PCI) += pci.o mt76-$(CONFIG_NL80211_TESTMODE) += testmode.o
drivers/net/wireless/mediatek/mt76/mt76.h +1 -1
@@ -1626,7 +1626,7 @@ int mt76_testmode_dump(struct ieee80211_int mt76_testmode_set_state (struct mt76_phy *phy,enum mt76_testmode_state state);int mt76_testmode_alloc_skb (struct mt76_phy *phy,u32 len); -#ifdef CONFIG_MT76_NPU +#if IS_ENABLED (CONFIG_MT76_NPU )void mt76_npu_check_ppe (struct mt76_dev *dev,struct sk_buff *skb,u32 info); int mt76_npu_dma_add_buf(struct mt76_phy *phy, struct mt76_queue *q,
Am 12.09.2026 um 08:36 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.18.52 release. There are 1518 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Builds, boots and seems to works on my 2-socket Ivy Bridge Xeon E5-2697v2 server. However, I do see the same strange dmesg warnings that I see in 6.12.110-rc1:
[ 2.397237] Driver 'sr' needs updating - please use bus_type methods ... [ 84.031323] Driver 'ses' needs updating - please use bus_type methods
And again, these warning are new in this rc, they did not appear in 6.18.51.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Hi,
Quoted 6 lines
Am 12.09.2026 um 08:36 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.18.52 release. There are 1518 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Builds, boots and seems to works on my 2-socket Ivy Bridge Xeon E5-2697v2 server. However, I do see the same strange dmesg warnings that I see in 6.12.110-rc1:
[ 2.397237] Driver 'sr' needs updating - please use bus_type methods ... [ 84.031323] Driver 'ses' needs updating - please use bus_type methodsAnd again, these warning are new in this rc, they did not appear in 6.18.51.
Thanks for your report, i see the warning is related to the commit series:
("scsi: core: sysfs: Make use of bus callbacks")
... As it message describe ...
.probe(), .remove() and .shutdown() to eventually remove these. Until all SCSI drivers are converted, this results in a runtime warning about the drivers needing an update because there is a bus probe function and a driver probe function. The in-tree drivers are fixed by the following commits.
...
Best Regards
Wentao Guan
Greg KH
maintainerQuoted 17 lines · Wentao Guan
Hi,
Quoted 6 lines
Am 12.09.2026 um 08:36 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.18.52 release. There are 1518 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Builds, boots and seems to works on my 2-socket Ivy Bridge Xeon E5-2697v2 server. However, I do see the same strange dmesg warnings that I see in 6.12.110-rc1:
[ 2.397237] Driver 'sr' needs updating - please use bus_type methods ... [ 84.031323] Driver 'ses' needs updating - please use bus_type methodsAnd again, these warning are new in this rc, they did not appear in 6.18.51.
Quoted 9 lines
Thanks for your report, i see the warning is related to the commit series:
("scsi: core: sysfs: Make use of bus callbacks")
... As it message describe ...
.probe(), .remove() and .shutdown() to eventually remove these. Until all SCSI drivers are converted, this results in a runtime warning about the drivers needing an update because there is a bus probe function and a driver probe function. The in-tree drivers are fixed by the following commits.
...
Yeah, that's a mess, I'll go drop this from 6.18 and 6.12 queues for now, thanks for the review!
greg k-h
Build tested in our x86,arm64,loongarch,riscv config successfully without error.
Best Regards
Wentao Guan
Log:
Linux version 6.18.52-rc1-gbda8b5c5a396 (guanwentao@uos-PC) (aarch64-linux-gnu-gcc-12 (Deepin 12.3.0-17deepin8) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) # SMP PREEMPT_DYNAMIC Linux version 6.18.52-rc1-gbda8b5c5a396 (guanwentao@uos-PC) (aarch64-linux-gnu-gcc-12 (Deepin 12.3.0-17deepin8) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) #2 SMP PREEMPT_DYNAMIC Sun Sep 13 03:24:51 CST 2026 Linux version 6.18.52-rc1-gbda8b5c5a396 (guanwentao@uos-PC) (loongarch64-linux-gnu-gcc-12 (Deepin 12.3.0-17deepin8) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) # SMP PREEMPT_DYNAMIC Linux version 6.18.52-rc1-gbda8b5c5a396 (guanwentao@uos-PC) (loongarch64-linux-gnu-gcc-12 (Deepin 12.3.0-17deepin8) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) #3 SMP PREEMPT_DYNAMIC Sun Sep 13 03:42:03 CST 2026 Linux version 6.18.52-rc1+ (guanwentao@uos-PC) (riscv64-linux-gnu-gcc-12 (Deepin 12.3.0-17deepin8) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) # SMP PREEMPT
Linux version 6.18.52-rc1+ (guanwentao@uos-PC) (riscv64-linux-gnu-gcc-12 (Deepin 12.3.0-17deepin8) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) #4 SMP PREEMPT Sun Sep 13 04:02:26 CST 2026 Linux version 6.18.52-rc1-gbda8b5c5a396 (guanwentao@uos-PC) (gcc (Deepin 12.3.0-17deepin18) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) # SMP PREEMPT_DYNAMIC
Linux version 6.18.52-rc1-gbda8b5c5a396 (guanwentao@uos-PC) (gcc (Deepin 12.3.0-17deepin18) 12.3.0, GNU ld (GNU Binutils for Deepin) 2.41) #1 SMP PREEMPT_DYNAMIC Sun Sep 13 03:01:12 CST 2026
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.18.52 release. There are 1518 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon, 14 Sep 2026 06:54:17 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.52-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.18.y
and the diffstat can be found below.thanks,
greg k-h
Tested on 2 different amd64 systems and an arm64 virtual machine.
I'm seeing the same "needs updating" warnings in dmesg that Peter Schneider reported on 6.12.110-rc1 and 6.18.52-rc1, but otherwise it's working well and I have not observed any other regressions.
Signature · 1 line
-Barry K. Nathan <[email protected]>
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.18.52 release. There are 1518 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon, 14 Sep 2026 06:54:17 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.52-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.18.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 8 lines · On Sat, 12 Sep 2026 08:36:09 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.18.52 release. There are 1518 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon, 14 Sep 2026 06:54:17 +0000. Anything received after that time might be too late.
Boot-tested under QEMU for Rust x86_64, arm64 and riscv64; built-tested for loongarch64 and arm32:
In my arm32 configs I see the knav_qmss_queue issue others reported:
drivers/soc/ti/knav_qmss_queue.c:1871:2: error: use of undeclared identifier 'knav_qdev'
1871 | knav_qdev->debugfs_file =
| ^
Thanks!
Cheers,
Miguel
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.18.52 release. There are 1518 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon, 14 Sep 2026 06:54:17 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.52-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.18.y
and the diffstat can be found below.thanks,
greg k-h
perf fails to build on arm/arm64/mips with:
LINK
/local/users/fainelli/buildroot/output/arm64/build/linux-custom/tools/perf/perf /local/stbopt_p/toolchains_303/stbgcc-12.4-2.0/bin/../lib/gcc/aarch64-unknown-linux-gnu/12.4.0/../../../../aarch64-unknown-linux-gnu/bin/ld: /local/users/fainelli/buildroot/output/arm64/build/linux-custom/tools/perf/perf-in.o: in function `perf_c2c__report':
builtin-c2c.c:(.text+0x420dc): undefined reference to `perf_env__e_machine'
collect2: error: ld returned 1 exit status
that is coming from 629978bc30938bc4929ff6c8b0dbc6fb637ac8f3 ("perf c2c: Use perf_env e_machine rather than arch").
Signature · 1 line
Florian