6.1.175-rc1 review
Subsystems (7)
Greg Kroah-Hartman
maintainerPATCH 928/969 net: ethernet: cortina: Carry over frag counter
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <[email protected]>
[ Upstream commit ebd8ec2b309e3a447851b456ccaf8fb39f3661e7 ]
The gmac_rx() NAPI poll function assembles packets in an SKB from a ring buffer.
If the ring buffer gets completely emptied during a poll cycle, we exit gmac_rx(), but the packet is not yet completely assembled in the SKB, yet the fragment counter frag_nr is reset to zero on the next invocation.
Solve this by making the RX fragment counter a part of the port struct, and carry it over between invocations.
Reset the fragment counter only right after calling napi_gro_frags(), on error (after calling napi_free_frags()) or if stopping the port.
Reset it in some place where not strictly necessary just to emphasize what is going on.
This was found by Sashiko during normal patch review.
--- drivers/net/ethernet/cortina/gemini.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/ethernet/cortina/gemini.c +8 -1
@@ -122,6 +122,7 @@ struct gemini_ethernet_port {struct hrtimer rx_coalesce_timer;unsigned int rx_coalesce_nsecs;struct sk_buff *rx_skb; +unsigned int rx_frag_nr;unsigned int freeq_refill;struct gmac_txq txq[TX_QUEUE_NUM ];
@@ -1449,6 +1450,7 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget)unsigned short m = (1 << port->rxq_order) -1 ;struct gemini_ethernet *geth = port->geth;void __iomem *ptr_reg = port->rxq_rwptr; +unsigned int frag_nr = port->rx_frag_nr;struct sk_buff *skb = port->rx_skb;unsigned int frame_len, frag_len;struct gmac_rxdesc *rx =NULL ;
@@ -1462,7 +1464,6 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget)unsigned short r, w;union dma_rwptr rw;dma_addr_t mapping; -int frag_nr =0 ;spin_lock_irqsave (&geth->irq_lock, flags); rw.bits32 =readl (ptr_reg);
@@ -1502,6 +1503,7 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget)napi_free_frags (&port->napi); port->stats.rx_dropped++; skb =NULL ; + frag_nr =0 ; }continue ; }
@@ -1512,6 +1514,7 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget)napi_free_frags (&port->napi); port->stats.rx_dropped++; skb =NULL ; + frag_nr =0 ; } skb =gmac_skb_if_good_frame (port, word0, frame_len);
@@ -1546,6 +1549,7 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget)if (word3.bits32 &EOF_BIT ) {napi_gro_frags (&port->napi); skb =NULL ; + frag_nr =0 ; --budget; }continue ;
@@ -1554,6 +1558,7 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget)if (skb) {napi_free_frags (&port->napi); skb =NULL ; + frag_nr =0 ; }if (mapping)
@@ -1563,6 +1568,7 @@ static unsigned int gmac_rx(struct net_device *netdev, unsigned int budget) } port->rx_skb = skb; + port->rx_frag_nr = frag_nr;writew (r, ptr_reg);return budget; }
@@ -1892,6 +1898,7 @@ static int gmac_stop(struct net_device *netdev)gmac_stop_dma (port);napi_disable (&port->napi); port->rx_skb =NULL ; + port->rx_frag_nr =0 ;gmac_enable_irq (netdev,0 );gmac_cleanup_rxq (netdev);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 902/969 kunit: config: Enable KUNIT_DEBUGFS by default
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Gow <[email protected]>
[ Upstream commit 17e4c68ff35090d8cb743e3c82c09f92fda1ebda ]
The KUNIT_DEBUGFS option is currently enabled based on the value of KUNIT_ALL_TESTS, but it really doesn't have anything to do with the set of enabled tests, so just enable it by default anyway. In particular, this shouldn't be only visible if KUNIT_ALL_TESTS is set, which is quite confusing.
--- lib/kunit/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/kunit/Kconfig +2 -2
@@ -16,8 +16,8 @@ menuconfig KUNIT if KUNIT config KUNIT_DEBUGFS - bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" if !KUNIT_ALL_TESTS - default KUNIT_ALL_TESTS + bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" + default y help Enable debugfs representation for kunit. Currently this consists of /sys/kernel/debug/kunit/<test_suite>/results files for each
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 929/969 net: ethernet: cs89x0: remove stale CONFIG_MACH_MX31ADS reference
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ethan Nelson-Moore <[email protected]>
[ Upstream commit 36a8d04a8293afcb9304cf0cd3741f67698f2a1a ]
The legacy ARM board file for MACH_MX31ADS was removed in commit c93197b0041d ("ARM: imx: Remove i.MX31 board files"), but a reference to it remained in the cs89x0 driver. Drop this unused code.
--- drivers/net/ethernet/cirrus/cs89x0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/cirrus/cs89x0.c +0 -2
@@ -1270,7 +1270,6 @@ static const struct net_device_ops net_ops = {static void __init reset_chip (struct net_device *dev) { -#if !defined(CONFIG_MACH_MX31ADS )struct net_local *lp =netdev_priv (dev);unsigned long reset_start_time;
@@ -1297,7 +1296,6 @@ static void __init reset_chip(struct net_device *dev)while ((readreg (dev, PP_SelfST) &INIT_DONE ) ==0 &&time_before (jiffies, reset_start_time +2 )) ; -#endif /* !CONFIG_MACH_MX31ADS */ }/* This is the real probe routine.
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 930/969 wifi: ath11k: fix error path leaks in some WMI WOW calls
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Escande <[email protected]>
[ Upstream commit 55dda532bbc261aef495e403c8900c5e2ab5fa34 ]
Fix two instances where we used to directly return the result of ath11k_wmi_cmd_send(...). Because we did not check the return value, we also did not free the skb in the error path.
--- drivers/net/wireless/ath/ath11k/wmi.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath11k/wmi.c +16 -3
@@ -8482,6 +8482,7 @@ int ath11k_wmi_wow_host_wakeup_ind(struct ath11k *ar)struct wmi_wow_host_wakeup_ind *cmd;struct sk_buff *skb;size_t len; +int ret; len =sizeof (*cmd); skb =ath11k_wmi_alloc_skb (ar->wmi->wmi_ab, len);
@@ -8495,14 +8496,20 @@ int ath11k_wmi_wow_host_wakeup_ind(struct ath11k *ar)ath11k_dbg (ar->ab,ATH11K_DBG_WMI ,"wmi tlv wow host wakeup ind\n" ); -return ath11k_wmi_cmd_send (ar->wmi, skb,WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID ); + ret =ath11k_wmi_cmd_send (ar->wmi, skb,WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID ); +if (ret) { +ath11k_warn (ar->ab,"failed to send WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID\n" ); +dev_kfree_skb (skb); + } + +return ret; }int ath11k_wmi_wow_enable (struct ath11k *ar) {struct wmi_wow_enable_cmd *cmd;struct sk_buff *skb; -int len; +int ret, len; len =sizeof (*cmd); skb =ath11k_wmi_alloc_skb (ar->wmi->wmi_ab, len);
@@ -8517,7 +8524,13 @@ int ath11k_wmi_wow_enable(struct ath11k *ar) cmd->pause_iface_config =WOW_IFACE_PAUSE_ENABLED ;ath11k_dbg (ar->ab,ATH11K_DBG_WMI ,"wmi tlv wow enable\n" ); -return ath11k_wmi_cmd_send (ar->wmi, skb,WMI_WOW_ENABLE_CMDID ); + ret =ath11k_wmi_cmd_send (ar->wmi, skb,WMI_WOW_ENABLE_CMDID ); +if (ret) { +ath11k_warn (ar->ab,"failed to send WMI_WOW_ENABLE_CMDID\n" ); +dev_kfree_skb (skb); + } + +return ret; } int ath11k_wmi_scan_prob_req_oui(struct ath11k *ar,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 931/969 HID: quirks: really enable the intended work around for appledisplay
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Bulwahn <[email protected]>
[ Upstream commit 5f90dcfa8dc32a488581b78e575cdd7808ba5c78 ]
Commit c7fabe4ad921 ("HID: quirks: work around VID/PID conflict for appledisplay") intends to add a quirk for kernels built with Apple Cinema Display support, but it refers to the non-existing config option CONFIG_APPLEDISPLAY, whereas the config option for Apple Cinema Display support is named CONFIG_USB_APPLEDISPLAY.
Refer to the intended config option CONFIG_USB_APPLEDISPLAY in the ifdef directive.
--- drivers/hid/hid-quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-quirks.c +1 -1
@@ -222,7 +222,7 @@ static const struct hid_device_id hid_quirks[] = {* used as a driver. See hid_scan_report(). */ static const struct hid_device_id hid_have_special_driver[] = { -#if IS_ENABLED(CONFIG_APPLEDISPLAY) +#if IS_ENABLED(CONFIG_USB_APPLEDISPLAY) {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9218 ) }, {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9219 ) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 0x921c) },
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 932/969 net/smc: avoid NULL deref of conn->lnk in smc_msg_event tracepoint
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiang Mei <[email protected]>
[ Upstream commit 7bf563badd37cb796df5477d2b78bb64148a1268 ]
The smc_msg_event tracepoint class, shared by smc_tx_sendmsg and smc_rx_recvmsg, unconditionally dereferences smc->conn.lnk:
__string(name, smc->conn.lnk->ibname)
conn->lnk is only set for SMC-R; for SMC-D it is NULL. Other code on these paths already handles this (e.g. !conn->lnk in SMC_STAT_RMB_TX_SIZE_SMALL()). With the tracepoint enabled, the first sendmsg()/recvmsg() on an SMC-D socket crashes:
Oops: general protection fault, probably for non-canonical address KASAN: null-ptr-deref in range [...] RIP: 0010:strlen+0x1e/0xa0 Call Trace: trace_event_raw_event_smc_msg_event (net/smc/smc_tracepoint.h:44) smc_rx_recvmsg (net/smc/smc_rx.c:515) smc_recvmsg (net/smc/af_smc.c:2859) __sys_recvfrom (net/socket.c:2315) __x64_sys_recvfrom (net/socket.c:2326) do_syscall_64
The faulting address 0x3e0 is offsetof(struct smc_link, ibname), confirming the NULL ->lnk deref. Enabling the tracepoint requires root, but the trigger itself is unprivileged: socket(AF_SMC, ...) has no capability check, and SMC-D negotiation needs no admin step on s390 or on x86 with the loopback ISM device loaded.
Log an empty device name for SMC-D instead of dereferencing NULL.
--- net/smc/smc_tracepoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/smc/smc_tracepoint.h +1 -1
@@ -51,7 +51,7 @@ DECLARE_EVENT_CLASS(smc_msg_event, __field(const void *, smc) __field(u64, net_cookie) __field(size_t, len) - __string(name, smc->conn.lnk->ibname) + __string(name, smc->conn.lnk ? smc->conn.lnk->ibname : "") ), TP_fast_assign(
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 933/969 ethtool: fix ethnl_bitmap32_not_zero() bit interval semantics
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chenguang Zhao <[email protected]>
[ Upstream commit 3d042592ebd4c7e44974d556de0b727cb7db4dab ]
ethnl_bitmap32_not_zero() should return true if some bit in [start, end) is set:
- Fix inverted memchr_inv() sense: return true when the scan finds a non-zero byte, not when the middle words are all zero.
- Return false for an empty interval (end <= start).
- When end is 32-bit aligned, indices in [start, end) do not include any bits from map[end_word]; return false after earlier checks found no non-zero data.
--- net/ethtool/bitset.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/ethtool/bitset.c +4 -4
@@ -91,7 +91,7 @@ static bool ethnl_bitmap32_not_zero(const u32 *map, unsigned int start,u32 mask;if (end <= start) -return true; +return false;if (start %32 ) { mask =ethnl_upper_bits (start);
@@ -104,11 +104,11 @@ static bool ethnl_bitmap32_not_zero(const u32 *map, unsigned int start, start_word++; } -if (!memchr_inv (map + start_word,'\0' , - (end_word - start_word) *sizeof (u32))) +if (memchr_inv (map + start_word,'\0' , + (end_word - start_word) *sizeof (u32)))return true;if (end %32 ==0 ) -return true; +return false;return map[end_word] ðnl_lower_bits (end); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 934/969 drm/msm/dsi: dont dump registers past the mapped region
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 5b49a46baa853b26dbefa65c6c75dd9ff69f63d4 ]
On DSI 6G platforms the IO address space is internally adjusted by io_offset. Later this adjusted address might be used for memory dumping. However the size that is used for memory dumping isn't adjusted to account for the io_offset, leading to the potential access to the unmapped region. Lower ctrl_size by the io_offset value to prevent access past the mapped area.
msm_disp_snapshot_add_block+0x1d4/0x3c8 [msm] (P) msm_dsi_host_snapshot+0x4c/0x78 [msm] msm_dsi_snapshot+0x28/0x50 [msm] msm_disp_snapshot_capture_state+0x74/0x140 [msm] msm_disp_snapshot_state_sync+0x60/0x90 [msm] _msm_disp_snapshot_work+0x30/0x90 [msm] kthread_worker_fn+0xdc/0x460 kthread+0x120/0x140
Patchwork: https://patchwork.freedesktop.org/patch/721747/
--- drivers/gpu/drm/msm/dsi/dsi_host.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/msm/dsi/dsi_host.c +1 -0
@@ -1947,6 +1947,7 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)/* fixup base address by io offset */ msm_host->ctrl_base += cfg->io_offset; + msm_host->ctrl_size -= cfg->io_offset; ret = devm_regulator_bulk_get_const(&pdev->dev, cfg->num_regulators, cfg->regulator_data,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 935/969 drm/msm: Fix iommu_map_sgtable() return value check and avoid WARN
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikko Perttunen <[email protected]>
[ Upstream commit 55e0f0d1c1a4ee1e46da7da4d443eb3044fb3851 ]
Commit "iommu: return full error code from iommu_map_sg[_atomic]()" changed iommu_map_sgtable() to return an ssize_t and negative values in error cases, rather than a size_t and a zero.
Store the return value in the appropriate type and in case of error, return it rather than WARNing.
Patchwork: https://patchwork.freedesktop.org/patch/719685/
Message-ID: <[email protected]>
--- drivers/gpu/drm/msm/msm_iommu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/msm_iommu.c +3 -2
@@ -359,14 +359,15 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova, struct sg_table *sgt, size_t len, int prot) { struct msm_iommu *iommu = to_msm_iommu(mmu); -size_t ret; +ssize_t ret;/* The arm-smmu driver expects the addresses to be sign extended */ if (iova &BIT_ULL (48 )) iova |=GENMASK_ULL (63 ,49 ); ret =iommu_map_sgtable (iommu->domain, iova, sgt, prot); -WARN_ON (!ret); +if (ret <0 ) +return ret;return (ret == len) ?0 : -EINVAL ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 936/969 powerpc/time: Remove redundant preempt_disable|enable() calls from arch_irq_work_raise()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sayali Patil <[email protected]>
[ Upstream commit 31467b23823ffec1f6fff407f8e3ca9af8b7491a ]
A kernel panic is observed when handling machine check exceptions from real mode.
BUG: Unable to handle kernel data access on read at 0xc00000006be21300 Oops: Kernel access of bad area, sig: 11 [#1] MSR: 8000000000001003 <SF,ME,RI,LE> CR: 88222248 XER: 00000005 CFAR: c00000000003ffc4 DAR: c00000006be21300 DSISR: 40000000 IRQMASK: 0 NIP [c000000000029e40] arch_irq_work_raise+0x10/0x70 LR [c00000000003ffc8] machine_check_queue_event+0xa8/0x150 Call Trace: [c0000000179d3c70] [c00000000003ff64] machine_check_queue_event+0x44/0x150 [c0000000179d3d30] [c0000000000084e0] machine_check_early_common+0x1f0/0x2c0
The crash occurs because arch_irq_work_raise() calls preempt_disable() from machine check exception (MCE) handlers running in real mode. In this context, accessing the preempt_count can fault, leading to the panic.
The preempt_disable()/preempt_enable() pair in arch_irq_work_raise() was originally added by commit 0fe1ac48bef0 ("powerpc/perf_event: Fix oops due to perf_event_do_pending call") to avoid races while raising irq work from exception context.
Later, commit 471ba0e686cb ("irq_work: Do not raise an IPI when queueing work on the local CPU") added preemption protection in irq_work_queue() path, while commit 20b876918c06 ("irq_work: Use per cpu atomics instead of regular atomics") added equivalent protection in irq_work_queue_on() before reaching arch_irq_work_raise():
irq_work_queue() / irq_work_queue_on()
-> preempt_disable()
-> __irq_work_queue_local()
-> irq_work_raise()
-> arch_irq_work_raise()As a result, callers other than mce_irq_work_raise() already execute with preemption disabled, making the additional preempt_disable()/preempt_enable() pair in arch_irq_work_raise() redundant.
The arch_irq_work_raise() function executes in NMI context when called from MCE handler. Hence we will not be preempted or scheduled out since we are in NMI context with MSR[EE]=0. Therefore, it is safe to remove the preempt_disable()/preempt_enable() calls from here.
Remove it to avoid accessing preempt_count from real mode context.
--- arch/powerpc/kernel/time.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/kernel/time.c +4 -2
@@ -454,6 +454,10 @@ DEFINE_PER_CPU(u8, irq_work_pending);#endif /* 32 vs 64 bit */ +/* +* Must be called with preemption disabled since it updates +* per-CPU irq_work state and programs the local CPU decrementer. +*/ void arch_irq_work_raise (void ) {/*
@@ -467,10 +471,8 @@ void arch_irq_work_raise(void)* which could get tangled up if we're messing with the same state * here. */ -preempt_disable ();set_irq_work_pending_flag ();set_dec (1 ); -preempt_enable (); }static void set_dec_or_work (u64 val)
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 937/969 net/smc: reject CHID-0 ACCEPT that matches an empty ism_dev slot
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiang Mei <[email protected]>
[ Upstream commit 277740023def559a4a2ddc3e8e784ee37a0f16a9 ]
On the SMC-D client, slot 0 of ini->ism_dev[]/ini->ism_chid[] is reserved for an SMC-Dv1 device. smc_find_ism_v2_device_clnt() populates V2 entries starting at index 1, so when no V1 device is selected slot 0 is left in its kzalloc()'ed state with ism_dev[0] == NULL and ism_chid[0] == 0.
smc_v2_determine_accepted_chid() then matches the peer's CHID against the array starting from index 0 using the CHID alone. A malicious peer replying to a SMC-Dv2-only proposal with d1.chid == 0 matches the empty slot, ini->ism_selected becomes 0, and the subsequent ism_dev[0]->lgr_lock dereference in smc_conn_create() faults at offsetof(struct smcd_dev, lgr_lock) == 0x68:
BUG: KASAN: null-ptr-deref in _raw_spin_lock_bh+0x79/0xe0 Write of size 4 at addr 0000000000000068 by task exploit/144 Call Trace: _raw_spin_lock_bh smc_conn_create (net/smc/smc_core.c:1997) __smc_connect (net/smc/af_smc.c:1447) smc_connect (net/smc/af_smc.c:1720) __sys_connect __x64_sys_connect do_syscall_64
Require ism_dev[i] to be non-NULL before accepting a CHID match.
--- net/smc/af_smc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/smc/af_smc.c +2 -1
@@ -1346,7 +1346,8 @@ smc_v2_determine_accepted_chid(struct smc_clc_msg_accept_confirm_v2 *aclc,int i;for (i =0 ; i < ini->ism_offered_cnt +1 ; i++) { -if (ini->ism_chid[i] ==ntohs (aclc->d1.chid)) { +if (ini->ism_dev[i] && + ini->ism_chid[i] ==ntohs (aclc->d1.chid)) { ini->ism_selected = i;return 0 ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 938/969 net: tls: fix off-by-one in sg_chain entry count for wrapped sk_msg ring
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jakub Kicinski <[email protected]>
[ Upstream commit 285943c6e7ca309bbea84b253745154241d9788a ]
When an sk_msg scatterlist ring wraps (sg.end < sg.start), tls_push_record() chains the tail portion of the ring to the head using sg_chain(). An extra entry in the sg array is reserved for this:
struct sk_msg_sg {
[...]
/* The extra two elements:
* 1) used for chaining the front and sections when the list becomes
* partitioned (e.g. end < start). The crypto APIs require the
* chaining;
* 2) to chain tailer SG entries after the message.
*/
struct scatterlist data[MAX_MSG_FRAGS + 2];
The current code uses MAX_SKB_FRAGS + 1 as the ring size:
sg_chain(&msg_pl->sg.data[msg_pl->sg.start],
MAX_SKB_FRAGS - msg_pl->sg.start + 1,
msg_pl->sg.data);This places the chain pointer at
sg_chain(data[start], (MAX_SKB_FRAGS - msg_start + 1) .. = &data[start] + (MAX_SKB_FRAGS - msg_start + 1) - 1 = data[start + (MAX_SKB_FRAGS - start + 1) - 1] = data[MAX_SKB_FRAGS]
instead of the true last entry. This is likely due to a "race" of the commit under Fixes landing close to
commit 031097d9e079 ("bpf: sk_msg, zap ingress queue on psock down")
Convert to ARRAY_SIZE and drop the data[start] / - start (as suggested by Sabrina).
--- net/tls/tls_sw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
net/tls/tls_sw.c +2 -4
@@ -801,11 +801,9 @@ static int tls_push_record(struct sock *sk, int flags,sg_mark_end (sk_msg_elem (msg_pl, i)); } -if (msg_pl->sg.end < msg_pl->sg.start) { -sg_chain (&msg_pl->sg.data[msg_pl->sg.start], -MAX_SKB_FRAGS - msg_pl->sg.start +1 , +if (msg_pl->sg.end < msg_pl->sg.start) +sg_chain (msg_pl->sg.data,ARRAY_SIZE (msg_pl->sg.data), msg_pl->sg.data); - } i = msg_pl->sg.start;sg_chain (rec->sg_aead_in,2 , &msg_pl->sg.data[i]);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 903/969 kunit: config: KUNIT_DEBUGFS should depend on DEBUG_FS
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Gow <[email protected]>
[ Upstream commit 8f80b5b227ef9ea422080487715c841856339aed ]
CONFIG_KUNIT_DEBUGFS is totally useless without debugfs, so it should depend on CONFIG_DEBUG_FS.
--- lib/kunit/Kconfig | 1 + 1 file changed, 1 insertion(+)
lib/kunit/Kconfig +1 -0
@@ -17,6 +17,7 @@ if KUNIT config KUNIT_DEBUGFS bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" + depends on DEBUG_FS default y help Enable debugfs representation for kunit. Currently this consists
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 939/969 net: tls: prevent chain-after-chain in plain text SG
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jakub Kicinski <[email protected]>
[ Upstream commit ff26a0e8377dec07e4a7230db7675bed1b9a6d03 ]
Sashiko points out that if end = 0 (start != 0) the current code will create a chain link to content type right after the wrap link:
This would create a chain where the wrap link points directly to another chain link. The scatterlist API sg_next iterator does not recursively resolve consecutive chain links.
meaning this is illegal input to crypto.
The wrapping link is unnecessary if end = 0. end is the entry after the last one used so end = 0 means there's nothing pushed after the wrap:
end start i
v v v
[ ]...[ ][ d ][ d ][ d ][ d ][rsv for wrap]
Skip the wrapping in this case.
TLS 1.3 can use the "wrapping slot" for it's chaining if end = 0. This avoids the chain-after-chain.
Move the wrap chaining before marking END and chaining off content type, that feels like more logical ordering to me, but should not matter from functional perspective.
--- net/tls/tls_sw.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
net/tls/tls_sw.c +18 -6
@@ -790,21 +790,33 @@ static int tls_push_record(struct sock *sk, int flags, i = msg_pl->sg.end;sk_msg_iter_var_prev (i); +/* msg_pl->sg.data is a ring; data[MAX+1] is reserved for the wrap +* link (frags won't use it). 'i' is now the last filled entry: +* +* i end start +* v v v [ rsv ] +* [ d ][ d ][ ][ ]...[ ][ d ][ d ][ d ][chain] +* ^ END v +* `-----------------------------------------' +* +* Note that SGL does not allow chain-after-chain, so for TLS 1.3, +* we must make sure we don't create the wrap entry and then chain +* link to content_type immediately at index 0. +*/ +if (i < msg_pl->sg.start) +sg_chain (msg_pl->sg.data,ARRAY_SIZE (msg_pl->sg.data), + msg_pl->sg.data); + rec->content_type = record_type;if (prot->version ==TLS_1_3_VERSION ) {/* Add content type to end of message. No padding added */ sg_set_buf (&rec->sg_content_type, &rec->content_type,1 );sg_mark_end (&rec->sg_content_type); -sg_chain (msg_pl->sg.data, msg_pl->sg.end +1 , - &rec->sg_content_type); +sg_chain (msg_pl->sg.data, i +2 , &rec->sg_content_type); }else {sg_mark_end (sk_msg_elem (msg_pl, i)); } -if (msg_pl->sg.end < msg_pl->sg.start) -sg_chain (msg_pl->sg.data,ARRAY_SIZE (msg_pl->sg.data), - msg_pl->sg.data); - i = msg_pl->sg.start;sg_chain (rec->sg_aead_in,2 , &msg_pl->sg.data[i]);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 940/969 spi: mtk-snfi: Fix resource leak in mtk_snand_read_page_cache()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Gu <[email protected]>
[ Upstream commit 496ba79b9496b8b3747cbc764ebd33ee7325e806 ]
When DMA read times out in mtk_snand_read_page_cache(), the original code erroneously jumped to cleanup label which skips DMA unmapping and ECC disable, causing a resource leak.
--- drivers/spi/spi-mtk-snfi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-mtk-snfi.c +1 -1
@@ -930,7 +930,7 @@ static int mtk_snand_read_page_cache(struct mtk_snand *snf, &snf->op_done, usecs_to_jiffies(SNFI_POLL_INTERVAL))) {dev_err (snf->dev,"DMA timed out for reading from cache.\n" ); ret = -ETIMEDOUT ; - goto cleanup; + goto cleanup2; }// Wait for BUS_SEC_CNTR returning expected value
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 941/969 drm/msm/snapshot: fix dumping of the unaligned regions
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 76824d2467feb1828b745d6add2541918d7be3da ]
The snapshotting code internally aligns data segment to 16 bytes. This works fine for DPU code (where most of the regions are aligned), but fails for snapshotting of the DSI data (because DSI data region is shifted by 4 bytes). Fix the code by removing length alignment and by accurately printing last registers in the region. While reworking the code also fix the 16x memory overallocation in msm_disp_state_dump_regs().
Patchwork: https://patchwork.freedesktop.org/patch/725449/
Message-ID: <[email protected]>
--- .../gpu/drm/msm/disp/msm_disp_snapshot_util.c | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-)
drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c +18 -6
@@ -9,7 +9,7 @@#include "msm_disp_snapshot.h" -static void msm_disp_state_dump_regs (u32 **reg,u32 aligned_len,void __iomem *base_addr) +static void msm_disp_state_dump_regs (u32 **reg,u32 len,void __iomem *base_addr) {u32 len_padded;u32 num_rows;
@@ -19,11 +19,11 @@ static void msm_disp_state_dump_regs(u32 **reg, u32 aligned_len, void __iomem *bvoid __iomem *end_addr;int i; - len_padded = aligned_len *REG_DUMP_ALIGN ; - num_rows = aligned_len /REG_DUMP_ALIGN ; + len_padded =round_up (len,REG_DUMP_ALIGN ); + num_rows =DIV_ROUND_UP (len,REG_DUMP_ALIGN ); addr = base_addr; - end_addr = base_addr + aligned_len; + end_addr = base_addr + len;if (!(*reg)) *reg =kvzalloc (len_padded,GFP_KERNEL );
@@ -51,8 +51,8 @@ static void msm_disp_state_dump_regs(u32 **reg, u32 aligned_len, void __iomem *bstatic void msm_disp_state_print_regs (const u32 *dump_addr,u32 len,void __iomem *base_addr,struct drm_printer *p) { +void __iomem *addr, *end_addr;int i; -void __iomem *addr;u32 num_rows;if (!dump_addr) {
@@ -61,6 +61,7 @@ static void msm_disp_state_print_regs(const u32 *dump_addr, u32 len, } addr = base_addr; + end_addr = base_addr + len; num_rows = len /REG_DUMP_ALIGN ;for (i =0 ; i < num_rows; i++) {
@@ -70,6 +71,17 @@ static void msm_disp_state_print_regs(const u32 *dump_addr, u32 len, dump_addr[i * 4 + 2], dump_addr[i * 4 + 3]); addr +=REG_DUMP_ALIGN ; } + +if (addr != end_addr) { +drm_printf (p,"0x%lx : %08x" , + (unsigned long )(addr - base_addr), + dump_addr[i *4 ]); +if (addr +0x4 < end_addr) +drm_printf (p," %08x" , dump_addr[i *4 +1 ]); +if (addr +0x8 < end_addr) +drm_printf (p," %08x" , dump_addr[i *4 +2 ]); +drm_printf (p,"\n" ); + } }void msm_disp_state_print (struct msm_disp_state *state,struct drm_printer *p)
@@ -189,7 +201,7 @@ void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len,va_end (va);INIT_LIST_HEAD (&new_blk->node); - new_blk->size =ALIGN (len,REG_DUMP_ALIGN ); + new_blk->size = len; new_blk->base_addr = base_addr;msm_disp_state_dump_regs (&new_blk->state, new_blk->size, base_addr);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 942/969 wifi: ath11k: Trigger sta disconnect on hardware restart
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Youghandhar Chintala <[email protected]>
[ Upstream commit a018750a2cceaf4427c4ee3d9ce3e83a171d5bd6 ]
Currently after the hardware restart triggered from the driver, the station interface connection remains intact, since a disconnect trigger is not sent to userspace. This can lead to a problem in targets where the wifi mac sequence is added by the firmware.
After the target restart, its wifi mac sequence number gets reset to zero. Hence AP to which our device is connected will receive frames with a wifi mac sequence number jump to the past, thereby resulting in the AP dropping all these frames, until the frame arrives with a wifi mac sequence number which AP was expecting.
To avoid such frame drops, its better to trigger a station disconnect upon target hardware restart which can be done with API ieee80211_reconfig_disconnect exposed to mac80211.
The other targets are not affected by this change, since the hardware params flag is not set.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/core.c | 6 ++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + drivers/net/wireless/ath/ath11k/mac.c | 7 +++++++ 3 files changed, 14 insertions(+)
drivers/net/wireless/ath/ath11k/core.c +6 -0
@@ -195,6 +195,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .tcl_ring_retry = true, .tx_ring_size = DP_TCL_DATA_RING_SIZE, .smp2p_wow_exit = false, + .support_fw_mac_sequence = false, }, { .name = "qca6390 hw2.0",
@@ -277,6 +278,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .tcl_ring_retry = true, .tx_ring_size = DP_TCL_DATA_RING_SIZE, .smp2p_wow_exit = false, + .support_fw_mac_sequence = true, }, { .name = "qcn9074 hw1.0",
@@ -356,6 +358,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .tcl_ring_retry = true, .tx_ring_size = DP_TCL_DATA_RING_SIZE, .smp2p_wow_exit = false, + .support_fw_mac_sequence = false, }, { .name = "wcn6855 hw2.0",
@@ -438,6 +441,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .tcl_ring_retry = true, .tx_ring_size = DP_TCL_DATA_RING_SIZE, .smp2p_wow_exit = false, + .support_fw_mac_sequence = true, }, { .name = "wcn6855 hw2.1",
@@ -519,6 +523,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .tcl_ring_retry = true, .tx_ring_size = DP_TCL_DATA_RING_SIZE, .smp2p_wow_exit = false, + .support_fw_mac_sequence = true, }, { .name = "wcn6750 hw1.0",
@@ -597,6 +602,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .tcl_ring_retry = false, .tx_ring_size = DP_TCL_DATA_RING_SIZE_WCN6750, .smp2p_wow_exit = true, + .support_fw_mac_sequence = true, }, };
drivers/net/wireless/ath/ath11k/hw.h +1 -0
@@ -219,6 +219,7 @@ struct ath11k_hw_params {bool tcl_ring_retry;u32 tx_ring_size;bool smp2p_wow_exit; +bool support_fw_mac_sequence; };struct ath11k_hw_ops {
drivers/net/wireless/ath/ath11k/mac.c +7 -0
@@ -7981,6 +7981,7 @@ ath11k_mac_op_reconfig_complete(struct ieee80211_hw *hw,struct ath11k *ar = hw->priv;struct ath11k_base *ab = ar->ab;int recovery_count; +struct ath11k_vif *arvif;if (reconfig_type !=IEEE80211_RECONFIG_TYPE_RESTART )return ;
@@ -8016,6 +8017,12 @@ ath11k_mac_op_reconfig_complete(struct ieee80211_hw *hw,ath11k_dbg (ab,ATH11K_DBG_BOOT ,"reset success\n" ); } } +if (ar->ab->hw_params.support_fw_mac_sequence) { +list_for_each_entry (arvif, &ar->arvifs, list) { +if (arvif->is_up && arvif->vdev_type ==WMI_VDEV_TYPE_STA ) +ieee80211_hw_restart_disconnect (arvif->vif); + } + } }mutex_unlock (&ar->conf_mutex);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 943/969 wifi: ath11k: update hw params for IPQ5018
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sriram R <[email protected]>
[ Upstream commit 8dfe875aa24aec68baf6702018633c84c2c1feca ]
Add new compatible string for IPQ5018 and add required hw params for IPQ5018. The hw descriptors size and datapath ops are similar to QCN9074, hence reuse the same.
Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/core.c | 71 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/core.h | 8 +++ 2 files changed, 79 insertions(+)
drivers/net/wireless/ath/ath11k/core.c +71 -0
@@ -604,6 +604,77 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .smp2p_wow_exit = true, .support_fw_mac_sequence = true, }, + { + .hw_rev = ATH11K_HW_IPQ5018_HW10, + .name = "ipq5018 hw1.0", + .fw = { + .dir = "IPQ5018/hw1.0", + .board_size = 256 * 1024, + .cal_offset = 128 * 1024, + }, + .max_radios = MAX_RADIOS_5018, + .bdf_addr = 0x4BA00000, +/* hal_desc_sz and hw ops are similar to qcn9074 */ + .hal_desc_sz = sizeof(struct hal_rx_desc_qcn9074), + .qmi_service_ins_id = ATH11K_QMI_WLFW_SERVICE_INS_ID_V01_IPQ8074, + .ring_mask = &ath11k_hw_ring_mask_ipq8074, + .credit_flow = false, + .max_tx_ring = 1, + .spectral = { + .fft_sz = 2, + .fft_pad_sz = 0, + .summary_pad_sz = 16, + .fft_hdr_len = 24, + .max_fft_bins = 1024, + }, + .internal_sleep_clock = false, + .host_ce_config = ath11k_host_ce_config_qcn9074, + .ce_count = CE_CNT_5018, + .rxdma1_enable = true, + .num_rxmda_per_pdev = RXDMA_PER_PDEV_5018, + .rx_mac_buf_ring = false, + .vdev_start_delay = false, + .htt_peer_map_v2 = true, + .interface_modes =BIT (NL80211_IFTYPE_STATION ) | +BIT (NL80211_IFTYPE_AP ) | + BIT(NL80211_IFTYPE_MESH_POINT), + .supports_monitor = false, + .supports_sta_ps = false, + .supports_shadow_regs = false, + .fw_mem_mode = 0, + .num_vdevs = 16 + 1, + .num_peers = 512, + .supports_regdb = false, + .idle_ps = false, + .supports_suspend = false, + .hal_params = &ath11k_hw_hal_params_ipq8074, + .single_pdev_only = false, + .cold_boot_calib = true, + .fix_l1ss = true, + .supports_dynamic_smps_6ghz = false, + .alloc_cacheable_memory = true, + .supports_rssi_stats = false, + .fw_wmi_diag_event = false, + .current_cc_support = false, + .dbr_debug_support = true, + .global_reset = false, + .bios_sar_capa = NULL, + .m3_fw_support = false, + .fixed_bdf_addr = true, + .fixed_mem_region = true, + .static_window_map = false, + .hybrid_bus_type = false, + .fixed_fw_mem = false, + .support_off_channel_tx = false, + .supports_multi_bssid = false, + + .sram_dump = {}, + + .tcl_ring_retry = true, + .tx_ring_size = DP_TCL_DATA_RING_SIZE, + .smp2p_wow_exit = false, + .support_fw_mac_sequence = false, + }, };static inline struct ath11k_pdev *ath11k_core_get_single_pdev (struct ath11k_base *ab)
drivers/net/wireless/ath/ath11k/core.h +8 -0
@@ -142,6 +142,7 @@ enum ath11k_hw_rev {ATH11K_HW_WCN6855_HW20 ,ATH11K_HW_WCN6855_HW21 ,ATH11K_HW_WCN6750_HW10 , + ATH11K_HW_IPQ5018_HW10, }; enum ath11k_firmware_mode {
@@ -230,6 +231,13 @@ struct ath11k_he {#define MAX_RADIOS 3 +/* ipq5018 hw param macros */ +#define MAX_RADIOS_5018 1 +#define CE_CNT_5018 6 +#define TARGET_CE_CNT_5018 9 +#define SVC_CE_MAP_LEN_5018 17 +#define RXDMA_PER_PDEV_5018 1 +enum {WMI_HOST_TP_SCALE_MAX =0 ,WMI_HOST_TP_SCALE_50 =1 ,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 944/969 wifi: ath11k: update ce configurations for IPQ5018
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sriram R <[email protected]>
[ Upstream commit 26af7aabd2d8225c6b2056234626ba5099610871 ]
IPQ5018 is a single pdev device. Update host
and target CE configurations accordingly.
Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/core.c | 4 + drivers/net/wireless/ath/ath11k/core.h | 3 + drivers/net/wireless/ath/ath11k/hw.c | 191 +++++++++++++++++++++++++ 3 files changed, 198 insertions(+)
drivers/net/wireless/ath/ath11k/core.c +4 -0
@@ -630,6 +630,10 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .internal_sleep_clock = false, .host_ce_config = ath11k_host_ce_config_qcn9074, .ce_count = CE_CNT_5018, + .target_ce_config = ath11k_target_ce_config_wlan_ipq5018, + .target_ce_count = TARGET_CE_CNT_5018, + .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq5018, + .svc_to_ce_map_len = SVC_CE_MAP_LEN_5018, .rxdma1_enable = true, .num_rxmda_per_pdev = RXDMA_PER_PDEV_5018, .rx_mac_buf_ring = false,
drivers/net/wireless/ath/ath11k/core.h +3 -0
@@ -1147,6 +1147,9 @@ extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq6018extern const struct ce_pipe_config ath11k_target_ce_config_wlan_qca6390[];extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qca6390[]; +extern const struct ce_pipe_config ath11k_target_ce_config_wlan_ipq5018[]; +extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq5018[]; +extern const struct ce_pipe_config ath11k_target_ce_config_wlan_qcn9074[];extern const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_qcn9074[];int ath11k_core_qmi_firmware_ready (struct ath11k_base *ab);
drivers/net/wireless/ath/ath11k/hw.c +191 -0
197 lines not on this page · raw message
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 945/969 wifi: ath11k: remap ce register space for IPQ5018
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sriram R <[email protected]>
[ Upstream commit b42b3678c91f3ca6e0888bf5a15c1e8678fd5f2d ]
In IPQ5018 ce register space is moved out of wcss unlike ipq8074 or ipq6018 and the space is not contiguous, hence remap the CE registers to a new space to access them.
Register read/write is modified to check if the register to be written falls in the CE register space and corresponding register is written. Also adjust the interrupt register address to ce irq enable/disable.
Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/ahb.c | 44 ++++++++++++++++++++++---- drivers/net/wireless/ath/ath11k/ce.h | 16 ++++++++++ drivers/net/wireless/ath/ath11k/core.c | 8 +++++ drivers/net/wireless/ath/ath11k/core.h | 1 + drivers/net/wireless/ath/ath11k/hal.c | 17 ++++++---- drivers/net/wireless/ath/ath11k/hal.h | 5 +++ drivers/net/wireless/ath/ath11k/hw.c | 17 ++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 9 ++++++ drivers/net/wireless/ath/ath11k/pci.c | 2 ++ 9 files changed, 107 insertions(+), 12 deletions(-)
drivers/net/wireless/ath/ath11k/ahb.c +38 -6
@@ -267,30 +267,42 @@ static void ath11k_ahb_clearbit32(struct ath11k_base *ab, u8 bit, u32 offset)static void ath11k_ahb_ce_irq_enable (struct ath11k_base *ab,u16 ce_id) {const struct ce_attr *ce_attr; +const struct ce_ie_addr *ce_ie_addr = ab->hw_params.ce_ie_addr; +u32 ie1_reg_addr, ie2_reg_addr, ie3_reg_addr; + + ie1_reg_addr = ce_ie_addr->ie1_reg_addr +ATH11K_CE_OFFSET (ab); + ie2_reg_addr = ce_ie_addr->ie2_reg_addr +ATH11K_CE_OFFSET (ab); + ie3_reg_addr = ce_ie_addr->ie3_reg_addr +ATH11K_CE_OFFSET (ab); ce_attr = &ab->hw_params.host_ce_config[ce_id];if (ce_attr->src_nentries) -ath11k_ahb_setbit32 (ab, ce_id,CE_HOST_IE_ADDRESS ); +ath11k_ahb_setbit32 (ab, ce_id, ie1_reg_addr);if (ce_attr->dest_nentries) { -ath11k_ahb_setbit32 (ab, ce_id,CE_HOST_IE_2_ADDRESS ); +ath11k_ahb_setbit32 (ab, ce_id, ie2_reg_addr);ath11k_ahb_setbit32 (ab, ce_id +CE_HOST_IE_3_SHIFT , -CE_HOST_IE_3_ADDRESS ); + ie3_reg_addr); } }static void ath11k_ahb_ce_irq_disable (struct ath11k_base *ab,u16 ce_id) {const struct ce_attr *ce_attr; +const struct ce_ie_addr *ce_ie_addr = ab->hw_params.ce_ie_addr; +u32 ie1_reg_addr, ie2_reg_addr, ie3_reg_addr; + + ie1_reg_addr = ce_ie_addr->ie1_reg_addr +ATH11K_CE_OFFSET (ab); + ie2_reg_addr = ce_ie_addr->ie2_reg_addr +ATH11K_CE_OFFSET (ab); + ie3_reg_addr = ce_ie_addr->ie3_reg_addr +ATH11K_CE_OFFSET (ab); ce_attr = &ab->hw_params.host_ce_config[ce_id];if (ce_attr->src_nentries) -ath11k_ahb_clearbit32 (ab, ce_id,CE_HOST_IE_ADDRESS ); +ath11k_ahb_clearbit32 (ab, ce_id, ie1_reg_addr);if (ce_attr->dest_nentries) { -ath11k_ahb_clearbit32 (ab, ce_id,CE_HOST_IE_2_ADDRESS ); +ath11k_ahb_clearbit32 (ab, ce_id, ie2_reg_addr);ath11k_ahb_clearbit32 (ab, ce_id +CE_HOST_IE_3_SHIFT , -CE_HOST_IE_3_ADDRESS ); + ie3_reg_addr); } }
@@ -1148,10 +1160,26 @@ static int ath11k_ahb_probe(struct platform_device *pdev) goto err_core_free; } + ab->mem_ce = ab->mem; + ret =ath11k_core_pre_init (ab);if (ret) goto err_core_free; +if (ab->hw_params.ce_remap) { +const struct ce_remap *ce_remap = ab->hw_params.ce_remap; +/* ce register space is moved out of wcss unlike ipq8074 or ipq6018 +* and the space is not contiguous, hence remapping the CE registers +* to a new space for accessing them. +*/ + ab->mem_ce =ioremap (ce_remap->base, ce_remap->size); +if (IS_ERR (ab->mem_ce)) { +dev_err (&pdev->dev,"ce ioremap error\n" ); + ret = -ENOMEM ; + goto err_core_free; + } + } + ret =ath11k_ahb_setup_resources (ab);if (ret) goto err_core_free;
@@ -1242,6 +1270,10 @@ static void ath11k_ahb_free_resources(struct ath11k_base *ab)ath11k_ahb_release_smp2p_handle (ab);ath11k_ahb_fw_resource_deinit (ab);ath11k_ce_free_pipes (ab); + +if (ab->hw_params.ce_remap) +iounmap (ab->mem_ce); +ath11k_core_free (ab);platform_set_drvdata (pdev,NULL ); }
drivers/net/wireless/ath/ath11k/ce.h +16 -0
@@ -49,6 +49,11 @@ void ath11k_ce_byte_swap(void *mem, u32 len);#define CE_HOST_IE_2_ADDRESS 0x00A18040#define CE_HOST_IE_3_ADDRESS CE_HOST_IE_ADDRESS +/* CE IE registers are different for IPQ5018 */ +#define CE_HOST_IPQ5018_IE_ADDRESS 0x0841804C +#define CE_HOST_IPQ5018_IE_2_ADDRESS 0x08418050 +#define CE_HOST_IPQ5018_IE_3_ADDRESS CE_HOST_IPQ5018_IE_ADDRESS +#define CE_HOST_IE_3_SHIFT 0xC#define CE_RING_IDX_INCR (nentries_mask, idx) (((idx) + 1) & (nentries_mask))
@@ -84,6 +89,17 @@ struct ce_pipe_config {__le32 reserved; }; +struct ce_ie_addr { +u32 ie1_reg_addr; +u32 ie2_reg_addr; +u32 ie3_reg_addr; +}; + +struct ce_remap { +u32 base; +u32 size; +}; +struct ce_attr {/* CE_ATTR_* values */ unsigned int flags;
drivers/net/wireless/ath/ath11k/core.c +8 -0
@@ -54,6 +54,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .target_ce_count = 11, .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq8074, .svc_to_ce_map_len = 21, + .ce_ie_addr = &ath11k_ce_ie_addr_ipq8074, .single_pdev_only = false, .rxdma1_enable = true, .num_rxmda_per_pdev = 1,
@@ -137,6 +138,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .target_ce_count = 11, .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq6018, .svc_to_ce_map_len = 19, + .ce_ie_addr = &ath11k_ce_ie_addr_ipq8074, .single_pdev_only = false, .rxdma1_enable = true, .num_rxmda_per_pdev = 1,
@@ -218,6 +220,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .target_ce_count = 9, .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390, .svc_to_ce_map_len = 14, + .ce_ie_addr = &ath11k_ce_ie_addr_ipq8074, .single_pdev_only = true, .rxdma1_enable = false, .num_rxmda_per_pdev = 2,
@@ -301,6 +304,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .target_ce_count = 9, .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qcn9074, .svc_to_ce_map_len = 18, + .ce_ie_addr = &ath11k_ce_ie_addr_ipq8074, .rxdma1_enable = true, .num_rxmda_per_pdev = 1, .rx_mac_buf_ring = false,
@@ -381,6 +385,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .target_ce_count = 9, .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390, .svc_to_ce_map_len = 14, + .ce_ie_addr = &ath11k_ce_ie_addr_ipq8074, .single_pdev_only = true, .rxdma1_enable = false, .num_rxmda_per_pdev = 2,
@@ -546,6 +551,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .target_ce_count = 9, .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_qca6390, .svc_to_ce_map_len = 14, + .ce_ie_addr = &ath11k_ce_ie_addr_ipq8074, .single_pdev_only = true, .rxdma1_enable = false, .num_rxmda_per_pdev = 1,
@@ -634,6 +640,8 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .target_ce_count = TARGET_CE_CNT_5018, .svc_to_ce_map = ath11k_target_service_to_ce_map_wlan_ipq5018, .svc_to_ce_map_len = SVC_CE_MAP_LEN_5018, + .ce_ie_addr = &ath11k_ce_ie_addr_ipq5018, + .ce_remap = &ath11k_ce_remap_ipq5018, .rxdma1_enable = true, .num_rxmda_per_pdev = RXDMA_PER_PDEV_5018, .rx_mac_buf_ring = false,
drivers/net/wireless/ath/ath11k/core.h +1 -0
@@ -853,6 +853,7 @@ struct ath11k_base {struct ath11k_dp dp;void __iomem *mem; +void __iomem *mem_ce;unsigned long mem_len;struct {
drivers/net/wireless/ath/ath11k/hal.c +11 -6
@@ -1245,16 +1245,20 @@ static int ath11k_hal_srng_create_config(struct ath11k_base *ab) s->reg_start[1 ] =HAL_SEQ_WCSS_UMAC_TCL_REG +HAL_TCL_STATUS_RING_HP ; s = &hal->srng_config[HAL_CE_SRC ]; - s->reg_start[0 ] =HAL_SEQ_WCSS_UMAC_CE0_SRC_REG (ab) +HAL_CE_DST_RING_BASE_LSB ; - s->reg_start[1 ] =HAL_SEQ_WCSS_UMAC_CE0_SRC_REG (ab) +HAL_CE_DST_RING_HP ; + s->reg_start[0 ] =HAL_SEQ_WCSS_UMAC_CE0_SRC_REG (ab) +HAL_CE_DST_RING_BASE_LSB + +ATH11K_CE_OFFSET (ab); + s->reg_start[1 ] =HAL_SEQ_WCSS_UMAC_CE0_SRC_REG (ab) +HAL_CE_DST_RING_HP + +ATH11K_CE_OFFSET (ab); s->reg_size[0 ] =HAL_SEQ_WCSS_UMAC_CE1_SRC_REG (ab) -HAL_SEQ_WCSS_UMAC_CE0_SRC_REG (ab); s->reg_size[1 ] =HAL_SEQ_WCSS_UMAC_CE1_SRC_REG (ab) -HAL_SEQ_WCSS_UMAC_CE0_SRC_REG (ab); s = &hal->srng_config[HAL_CE_DST ]; - s->reg_start[0 ] =HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab) +HAL_CE_DST_RING_BASE_LSB ; - s->reg_start[1 ] =HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab) +HAL_CE_DST_RING_HP ; + s->reg_start[0 ] =HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab) +HAL_CE_DST_RING_BASE_LSB + +ATH11K_CE_OFFSET (ab); + s->reg_start[1 ] =HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab) +HAL_CE_DST_RING_HP + +ATH11K_CE_OFFSET (ab); s->reg_size[0 ] =HAL_SEQ_WCSS_UMAC_CE1_DST_REG (ab) -HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab); s->reg_size[1] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) -
@@ -1262,8 +1266,9 @@ static int ath11k_hal_srng_create_config(struct ath11k_base *ab) s = &hal->srng_config[HAL_CE_DST_STATUS ]; s->reg_start[0 ] =HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab) + -HAL_CE_DST_STATUS_RING_BASE_LSB ; - s->reg_start[1 ] =HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab) +HAL_CE_DST_STATUS_RING_HP ; +HAL_CE_DST_STATUS_RING_BASE_LSB +ATH11K_CE_OFFSET (ab); + s->reg_start[1 ] =HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab) +HAL_CE_DST_STATUS_RING_HP + +ATH11K_CE_OFFSET (ab); s->reg_size[0 ] =HAL_SEQ_WCSS_UMAC_CE1_DST_REG (ab) -HAL_SEQ_WCSS_UMAC_CE0_DST_REG (ab); s->reg_size[1] = HAL_SEQ_WCSS_UMAC_CE1_DST_REG(ab) -
drivers/net/wireless/ath/ath11k/hal.h +5 -0
@@ -321,6 +321,10 @@ struct ath11k_base;#define HAL_WBM2SW_RELEASE_RING_BASE_MSB_RING_SIZE 0x000fffff#define HAL_RXDMA_RING_MAX_SIZE 0x0000ffff +/* IPQ5018 ce registers */ +#define HAL_IPQ5018_CE_WFSS_REG_BASE 0x08400000 +#define HAL_IPQ5018_CE_SIZE 0x200000 +/* Add any other errors here and return them in * ath11k_hal_rx_desc_get_err(). */
@@ -519,6 +523,7 @@ enum hal_srng_dir {#define HAL_SRNG_FLAGS_MSI_INTR 0x00020000#define HAL_SRNG_FLAGS_CACHED 0x20000000#define HAL_SRNG_FLAGS_LMAC_RING 0x80000000 +#define HAL_SRNG_FLAGS_REMAP_CE_RING 0x10000000#define HAL_SRNG_TLV_HDR_TAG GENMASK(9, 1)#define HAL_SRNG_TLV_HDR_LEN GENMASK(25, 10)
drivers/net/wireless/ath/ath11k/hw.c +17 -0
@@ -2164,6 +2164,23 @@ const struct service_to_pipe ath11k_target_service_to_ce_map_wlan_ipq5018[] = { {/* terminator entry */ } }; +const struct ce_ie_addr ath11k_ce_ie_addr_ipq8074 = { + .ie1_reg_addr =CE_HOST_IE_ADDRESS , + .ie2_reg_addr =CE_HOST_IE_2_ADDRESS , + .ie3_reg_addr =CE_HOST_IE_3_ADDRESS , +}; + +const struct ce_ie_addr ath11k_ce_ie_addr_ipq5018 = { + .ie1_reg_addr =CE_HOST_IPQ5018_IE_ADDRESS -HAL_IPQ5018_CE_WFSS_REG_BASE , + .ie2_reg_addr =CE_HOST_IPQ5018_IE_2_ADDRESS -HAL_IPQ5018_CE_WFSS_REG_BASE , + .ie3_reg_addr =CE_HOST_IPQ5018_IE_3_ADDRESS -HAL_IPQ5018_CE_WFSS_REG_BASE , +}; + +const struct ce_remap ath11k_ce_remap_ipq5018 = { + .base =HAL_IPQ5018_CE_WFSS_REG_BASE , + .size =HAL_IPQ5018_CE_SIZE , +}; +const struct ath11k_hw_regs ipq8074_regs = {/* SW2TCL(x) R0 ring configuration address */ .hal_tcl1_ring_base_lsb =0x00000510 ,
drivers/net/wireless/ath/ath11k/hw.h +9 -0
@@ -80,6 +80,8 @@#define ATH11K_M3_FILE "m3.bin"#define ATH11K_REGDB_FILE_NAME "regdb.bin" +#define ATH11K_CE_OFFSET (ab) (ab->mem_ce - ab->mem) +enum ath11k_hw_rate_cck {ATH11K_HW_RATE_CCK_LP_11M =0 ,ATH11K_HW_RATE_CCK_LP_5_5M ,
@@ -158,6 +160,8 @@ struct ath11k_hw_params {u32 target_ce_count;const struct service_to_pipe *svc_to_ce_map;u32 svc_to_ce_map_len; +const struct ce_ie_addr *ce_ie_addr; +const struct ce_remap *ce_remap;bool single_pdev_only;
@@ -277,6 +281,11 @@ extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qcn9074;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_wcn6750; +extern const struct ce_ie_addr ath11k_ce_ie_addr_ipq8074; +extern const struct ce_ie_addr ath11k_ce_ie_addr_ipq5018; + +extern const struct ce_remap ath11k_ce_remap_ipq5018; +extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_ipq8074;extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_qca6390;extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750;
drivers/net/wireless/ath/ath11k/pci.c +2 -0
@@ -543,6 +543,8 @@ static int ath11k_pci_claim(struct ath11k_pci *ab_pci, struct pci_dev *pdev) goto clear_master; } + ab->mem_ce = ab->mem; +ath11k_dbg (ab,ATH11K_DBG_BOOT ,"boot pci_mem 0x%pK\n" , ab->mem);return 0 ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 904/969 pinctrl: qcom: Fix wakeirq map by removing disconnected irqs for sm8150
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maulik Shah <[email protected]>
[ Upstream commit 52ac35b8a151446481496404af3a8e5e889b3c5a ]
PDC interrupts 122-125 were meant for ibi_i3c wakeup but sm8150 do not support i3c. GPIOs 39,51,88 and 144 are also connected to different PDC pin and already reflected in the wake irq map.
Remove the unsupported wakeup interrupts from the map.
--- drivers/pinctrl/qcom/pinctrl-sm8150.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/qcom/pinctrl-sm8150.c +4 -4
@@ -1504,18 +1504,18 @@ static const struct msm_gpio_wakeirq_map sm8150_pdc_map[] = { { 3, 31 }, { 5, 32 }, { 8, 33 }, { 9, 34 }, { 10, 100 }, { 12, 104 }, { 24, 37 }, { 26, 38 }, { 27, 41 }, { 28, 42 }, { 30, 39 }, { 36, 43 }, { 37, 44 }, { 38, 30 }, { 39, 118 }, - { 39, 125 }, { 41, 47 }, { 42, 48 }, { 46, 50 }, { 47, 49 }, - { 48, 51 }, { 49, 53 }, { 50, 52 }, { 51, 116 }, { 51, 123 }, + { 41, 47 }, { 42, 48 }, { 46, 50 }, { 47, 49 }, + { 48, 51 }, { 49, 53 }, { 50, 52 }, { 51, 116 }, { 53, 54 }, { 54, 55 }, { 55, 56 }, { 56, 57 }, { 58, 58 }, { 60, 60 }, { 61, 61 }, { 68, 62 }, { 70, 63 }, { 76, 71 }, { 77, 66 }, { 81, 64 }, { 83, 65 }, { 86, 67 }, { 87, 84 }, - { 88, 117 }, { 88, 124 }, { 90, 69 }, { 91, 70 }, { 93, 75 }, + { 88, 117 }, { 90, 69 }, { 91, 70 }, { 93, 75 }, { 95, 72 }, { 96, 73 }, { 97, 74 }, { 101, 40 }, { 103, 77 }, { 104, 78 }, { 108, 79 }, { 112, 80 }, { 113, 81 }, { 114, 82 }, { 117, 85 }, { 118, 101 }, { 119, 87 }, { 120, 88 }, { 121, 89 }, { 122, 90 }, { 123, 91 }, { 124, 92 }, { 125, 93 }, { 129, 94 }, { 132, 105 }, { 133, 83 }, { 134, 36 }, { 136, 97 }, { 142, 103 }, - { 144, 115 }, { 144, 122 }, { 147, 102 }, { 150, 107 }, + { 144, 115 }, { 147, 102 }, { 150, 107 }, { 152, 108 }, { 153, 109 } };
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 905/969 ARM: integrator: Fix early initialization
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
[ Upstream commit 90d77b30a666049ad24df463f52e5d529c44e8cd ]
Starting with commit bdb249fce9ad4 ("ARM: integrator: read counter using syscon/regmap"), intcp_init_early calls syscon_regmap_lookup_by_compatible which in turn calls of_syscon_register. This function allocates memory. Since the memory management code has not been initialized at that time, the call always fails. It either returns -ENOMEM or crashes as follows.
Unable to handle kernel NULL pointer dereference at virtual address 0000000c when read [0000000c] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.15.0-rc5-00026-g5fcc9bf84ee5 #1 PREEMPT Hardware name: ARM Integrator/CP (Device Tree) PC is at __kmalloc_cache_noprof+0xec/0x39c LR is at __kmalloc_cache_noprof+0x34/0x39c ... Call trace: __kmalloc_cache_noprof from of_syscon_register+0x7c/0x310 of_syscon_register from device_node_get_regmap+0xa4/0xb0 device_node_get_regmap from intcp_init_early+0xc/0x40 intcp_init_early from start_kernel+0x60/0x688 start_kernel from 0x0
The crash is seen due to a dereferenced pointer which is not supposed to be NULL but is NULL if the memory management subsystem has not been initialized. The crash is not seen with all versions of gcc. Some versions such as gcc 9.x apparently do not dereference the pointer, presumably if tracing is disabled. The problem has been reproduced with gcc 10.x, 11.x, and 13.x. Either case, if the crash is not seen, the call to syscon_regmap_lookup_by_compatible returns -ENOMEM, and sched_clock_register is never called.
Fix the problem by moving the early initialization code into the standard machine initialization code.
--- arch/arm/mach-versatile/integrator_cp.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
arch/arm/mach-versatile/integrator_cp.c +4 -9
@@ -86,14 +86,6 @@ static u64 notrace intcp_read_sched_clock(void)return val; } -static void __init intcp_init_early (void ) -{ - cm_map =syscon_regmap_lookup_by_compatible ("arm,core-module-integrator" ); -if (IS_ERR (cm_map)) -return ; -sched_clock_register (intcp_read_sched_clock,32 ,24000000 ); -} -static void __init intcp_init_irq_of (void ) {cm_init ();
@@ -119,6 +111,10 @@ static void __init intcp_init_of(void) {struct device_node *cpcon; + cm_map =syscon_regmap_lookup_by_compatible ("arm,core-module-integrator" ); +if (!IS_ERR (cm_map)) +sched_clock_register (intcp_read_sched_clock,32 ,24000000 ); + cpcon =of_find_matching_node (NULL , intcp_syscon_match);if (!cpcon)return ;
@@ -138,7 +134,6 @@ static const char * intcp_dt_board_compat[] = {DT_MACHINE_START (INTEGRATOR_CP_DT ,"ARM Integrator/CP (Device Tree)" ) .reserve = integrator_reserve, .map_io = intcp_map_io, - .init_early = intcp_init_early, .init_irq = intcp_init_irq_of, .init_machine = intcp_init_of, .dt_compat = intcp_dt_board_compat,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 906/969 netfilter: x_tables: unregister the templates first
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit d338693d778579b676a61346849bebd892427158 ]
When the module is going away we need to zap the template first. Else there is a small race window where userspace could instantiate a new table after the pernet exit function has removed the current table.
--- net/ipv4/netfilter/arptable_filter.c | 2 +- net/ipv4/netfilter/iptable_filter.c | 2 +- net/ipv4/netfilter/iptable_mangle.c | 2 +- net/ipv4/netfilter/iptable_raw.c | 2 +- net/ipv4/netfilter/iptable_security.c | 2 +- net/ipv6/netfilter/ip6table_filter.c | 2 +- net/ipv6/netfilter/ip6table_mangle.c | 2 +- net/ipv6/netfilter/ip6table_raw.c | 2 +- net/ipv6/netfilter/ip6table_security.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-)
net/ipv4/netfilter/arptable_filter.c +1 -1
@@ -82,8 +82,8 @@ static int __init arptable_filter_init(void) static void __exit arptable_filter_fini(void) { -unregister_pernet_subsys (&arptable_filter_net_ops);xt_unregister_template (&packet_filter); +unregister_pernet_subsys (&arptable_filter_net_ops);kfree (arpfilter_ops); }
net/ipv4/netfilter/iptable_filter.c +1 -1
@@ -101,8 +101,8 @@ static int __init iptable_filter_init(void) static void __exit iptable_filter_fini(void) { -unregister_pernet_subsys (&iptable_filter_net_ops);xt_unregister_template (&packet_filter); +unregister_pernet_subsys (&iptable_filter_net_ops);kfree (filter_ops); }
net/ipv4/netfilter/iptable_mangle.c +1 -1
@@ -134,8 +134,8 @@ static int __init iptable_mangle_init(void) static void __exit iptable_mangle_fini(void) { -unregister_pernet_subsys (&iptable_mangle_net_ops);xt_unregister_template (&packet_mangler); +unregister_pernet_subsys (&iptable_mangle_net_ops);kfree (mangle_ops); }
net/ipv4/netfilter/iptable_raw.c +1 -1
@@ -100,9 +100,9 @@ static int __init iptable_raw_init(void) static void __exit iptable_raw_fini(void) { +xt_unregister_template (&packet_raw);unregister_pernet_subsys (&iptable_raw_net_ops);kfree (rawtable_ops); -xt_unregister_template (&packet_raw); }module_init (iptable_raw_init);
net/ipv4/netfilter/iptable_security.c +1 -1
@@ -89,9 +89,9 @@ static int __init iptable_security_init(void) static void __exit iptable_security_fini(void) { +xt_unregister_template (&security_table);unregister_pernet_subsys (&iptable_security_net_ops);kfree (sectbl_ops); -xt_unregister_template (&security_table); }module_init (iptable_security_init);
net/ipv6/netfilter/ip6table_filter.c +1 -1
@@ -100,8 +100,8 @@ static int __init ip6table_filter_init(void) static void __exit ip6table_filter_fini(void) { -unregister_pernet_subsys (&ip6table_filter_net_ops);xt_unregister_template (&packet_filter); +unregister_pernet_subsys (&ip6table_filter_net_ops);kfree (filter_ops); }
net/ipv6/netfilter/ip6table_mangle.c +1 -1
@@ -127,8 +127,8 @@ static int __init ip6table_mangle_init(void) static void __exit ip6table_mangle_fini(void) { -unregister_pernet_subsys (&ip6table_mangle_net_ops);xt_unregister_template (&packet_mangler); +unregister_pernet_subsys (&ip6table_mangle_net_ops);kfree (mangle_ops); }
net/ipv6/netfilter/ip6table_raw.c +1 -1
@@ -98,8 +98,8 @@ static int __init ip6table_raw_init(void) static void __exit ip6table_raw_fini(void) { -unregister_pernet_subsys (&ip6table_raw_net_ops);xt_unregister_template (&packet_raw); +unregister_pernet_subsys (&ip6table_raw_net_ops);kfree (rawtable_ops); }
net/ipv6/netfilter/ip6table_security.c +1 -1
@@ -88,8 +88,8 @@ static int __init ip6table_security_init(void) static void __exit ip6table_security_fini(void) { -unregister_pernet_subsys (&ip6table_security_net_ops);xt_unregister_template (&security_table); +unregister_pernet_subsys (&ip6table_security_net_ops);kfree (sectbl_ops); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 907/969 netfilter: arptables: allow xtables-nft only builds
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit 4654467dc7e111e84f43ed1b70322873ae77e7be ]
Allows to build kernel that supports the arptables mangle target via nftables' compat infra but without the arptables get/setsockopt interface or the old arptables filter interpreter.
IOW, setting IP_NF_ARPFILTER=n will break arptables-legacy, but arptables-nft will continue to work as long as nftables compat support is enabled.
Stable-dep-of: b4597d5fd7d2 ("netfilter: x_tables: add and use xtables_unregister_table_exit")
--- net/ipv4/netfilter/Kconfig | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-)
net/ipv4/netfilter/Kconfig +13 -15
@@ -323,36 +323,34 @@ endif # IP_NF_IPTABLES # ARP tables config IP_NF_ARPTABLES - tristate "ARP tables support" - select NETFILTER_XTABLES - select NETFILTER_FAMILY_ARP - depends on NETFILTER_ADVANCED - help - arptables is a general, extensible packet identification framework. - The ARP packet filtering and mangling (manipulation)subsystems - use this: say Y or M here if you want to use either of those. - - To compile it as a module, choose M here. If unsure, say N. + tristate -if IP_NF_ARPTABLES +config NFT_COMPAT_ARP + tristate + depends on NF_TABLES_ARP && NFT_COMPAT + default m if NFT_COMPAT=m + default y if NFT_COMPAT=y config IP_NF_ARPFILTER - tristate "ARP packet filtering" + tristate "arptables-legacy packet filtering support" + select IP_NF_ARPTABLES help ARP packet filtering defines a table `filter', which has a series of rules for simple ARP packet filtering at local input and - local output. On a bridge, you can also specify filtering rules - for forwarded ARP packets. See the man page for arptables(8). + local output. This is only needed for arptables-legacy(8). + Neither arptables-nft nor nftables need this to work. To compile it as a module, choose M here. If unsure, say N. config IP_NF_ARP_MANGLE tristate "ARP payload mangling" + depends on IP_NF_ARPTABLES || NFT_COMPAT_ARP help Allows altering the ARP packet payload: source and destination hardware and network addresses. -endif # IP_NF_ARPTABLES + This option is needed by both arptables-legacy and arptables-nft. + It is not used by nftables. endmenu
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 908/969 netfilter: xtables: allow xtables-nft only builds
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit a9525c7f6219cee9284c0031c5930e8d41384677 ]
Add hidden IP(6)_NF_IPTABLES_LEGACY symbol.
When any of the "old" builtin tables are enabled the "old" iptables interface will be supported.
To disable the old set/getsockopt interface the existing options for the builtin tables need to be turned off:
CONFIG_IP_NF_IPTABLES=mCONFIG_IP_NF_FILTER is not setCONFIG_IP_NF_NAT is not setCONFIG_IP_NF_MANGLE is not setCONFIG_IP_NF_RAW is not setCONFIG_IP_NF_SECURITY is not set
Same for CONFIG_IP6_NF_ variants.
This allows to build a kernel that only supports ip(6)tables-nft (iptables-over-nftables api).
In the future the _LEGACY symbol will become visible and the select statements will be turned into 'depends on', but for now be on safe side so "make oldconfig" won't break things.
Stable-dep-of: b4597d5fd7d2 ("netfilter: x_tables: add and use xtables_unregister_table_exit")
--- net/ipv4/netfilter/Kconfig | 15 ++++++++++++--- net/ipv4/netfilter/Makefile | 2 +- net/ipv6/netfilter/Kconfig | 20 ++++++++++++++------ net/ipv6/netfilter/Makefile | 2 +- net/netfilter/Kconfig | 12 ++++++------ 5 files changed, 34 insertions(+), 17 deletions(-)
net/ipv4/netfilter/Kconfig +12 -3
@@ -10,6 +10,10 @@ config NF_DEFRAG_IPV4 tristate default n +# old sockopt interface and eval loop +config IP_NF_IPTABLES_LEGACY + tristate + config NF_SOCKET_IPV4 tristate "IPv4 socket lookup support" help
@@ -152,7 +156,7 @@ config IP_NF_MATCH_ECN config IP_NF_MATCH_RPFILTER tristate '"rpfilter" reverse path filter match support' depends on NETFILTER_ADVANCED - depends on IP_NF_MANGLE || IP_NF_RAW + depends on IP_NF_MANGLE || IP_NF_RAW || NFT_COMPAT help This option allows you to match packets whose replies would go out via the interface the packet came in.
@@ -173,6 +177,7 @@ config IP_NF_MATCH_TTL config IP_NF_FILTER tristate "Packet filtering" default m if NETFILTER_ADVANCED=n + select IP_NF_IPTABLES_LEGACY help Packet filtering defines a table `filter', which has a series of rules for simple packet filtering at local input, forwarding and
@@ -182,7 +187,7 @@ config IP_NF_FILTER config IP_NF_TARGET_REJECT tristate "REJECT target support" - depends on IP_NF_FILTER + depends on IP_NF_FILTER || NFT_COMPAT select NF_REJECT_IPV4 default m if NETFILTER_ADVANCED=n help
@@ -212,6 +217,7 @@ config IP_NF_NAT default m if NETFILTER_ADVANCED=n select NF_NAT select NETFILTER_XT_NAT + select IP6_NF_IPTABLES_LEGACY help This enables the `nat' table in iptables. This allows masquerading, port forwarding and other forms of full Network Address Port
@@ -252,6 +258,7 @@ endif # IP_NF_NAT config IP_NF_MANGLE tristate "Packet mangling" default m if NETFILTER_ADVANCED=n + select IP_NF_IPTABLES_LEGACY help This option adds a `mangle' table to iptables: see the man page for iptables(8). This table is used for various packet alterations
@@ -275,7 +282,7 @@ config IP_NF_TARGET_CLUSTERIP config IP_NF_TARGET_ECN tristate "ECN target support" - depends on IP_NF_MANGLE + depends on IP_NF_MANGLE || NFT_COMPAT depends on NETFILTER_ADVANCED help This option adds a `ECN' target, which can be used in the iptables mangle
@@ -300,6 +307,7 @@ config IP_NF_TARGET_TTL # raw + specific targets config IP_NF_RAW tristate 'raw table support (required for NOTRACK/TRACE)' + select IP_NF_IPTABLES_LEGACY help This option adds a `raw' table to iptables. This table is the very first in the netfilter framework and hooks in at the PREROUTING
@@ -313,6 +321,7 @@ config IP_NF_SECURITY tristate "Security table" depends on SECURITY depends on NETFILTER_ADVANCED + select IP_NF_IPTABLES_LEGACY help This option adds a `security' table to iptables, for use with Mandatory Access Control (MAC) policy.
net/ipv4/netfilter/Makefile +1 -1
@@ -25,7 +25,7 @@ obj-$(CONFIG_NFT_FIB_IPV4) += nft_fib_ipv4.o obj-$(CONFIG_NFT_DUP_IPV4) += nft_dup_ipv4.o # generic IP tables -obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o +obj-$(CONFIG_IP_NF_IPTABLES_LEGACY) += ip_tables.o # the three instances of ip_tables obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o
net/ipv6/netfilter/Kconfig +14 -6
@@ -6,6 +6,10 @@ menu "IPv6: Netfilter Configuration" depends on INET && IPV6 && NETFILTER +# old sockopt interface and eval loop +config IP6_NF_IPTABLES_LEGACY + tristate + config NF_SOCKET_IPV6 tristate "IPv6 socket lookup support" help
@@ -147,7 +151,7 @@ config IP6_NF_MATCH_MH config IP6_NF_MATCH_RPFILTER tristate '"rpfilter" reverse path filter match support' depends on NETFILTER_ADVANCED - depends on IP6_NF_MANGLE || IP6_NF_RAW + depends on IP6_NF_MANGLE || IP6_NF_RAW || NFT_COMPAT help This option allows you to match packets whose replies would go out via the interface the packet came in.
@@ -186,6 +190,8 @@ config IP6_NF_TARGET_HL config IP6_NF_FILTER tristate "Packet filtering" default m if NETFILTER_ADVANCED=n + select IP6_NF_IPTABLES_LEGACY + tristate help Packet filtering defines a table `filter', which has a series of rules for simple packet filtering at local input, forwarding and
@@ -195,7 +201,7 @@ config IP6_NF_FILTER config IP6_NF_TARGET_REJECT tristate "REJECT target support" - depends on IP6_NF_FILTER + depends on IP6_NF_FILTER || NFT_COMPAT select NF_REJECT_IPV6 default m if NETFILTER_ADVANCED=n help
@@ -221,6 +227,7 @@ config IP6_NF_TARGET_SYNPROXY config IP6_NF_MANGLE tristate "Packet mangling" default m if NETFILTER_ADVANCED=n + select IP6_NF_IPTABLES_LEGACY help This option adds a `mangle' table to iptables: see the man page for iptables(8). This table is used for various packet alterations
@@ -230,6 +237,7 @@ config IP6_NF_MANGLE config IP6_NF_RAW tristate 'raw table support (required for TRACE)' + select IP6_NF_IPTABLES_LEGACY help This option adds a `raw' table to ip6tables. This table is the very first in the netfilter framework and hooks in at the PREROUTING
@@ -243,6 +251,7 @@ config IP6_NF_SECURITY tristate "Security table" depends on SECURITY depends on NETFILTER_ADVANCED + select IP6_NF_IPTABLES_LEGACY help This option adds a `security' table to iptables, for use with Mandatory Access Control (MAC) policy.
@@ -254,6 +263,7 @@ config IP6_NF_NAT depends on NF_CONNTRACK depends on NETFILTER_ADVANCED select NF_NAT + select IP6_NF_IPTABLES_LEGACY select NETFILTER_XT_NAT help This enables the `nat' table in ip6tables. This allows masquerading,
@@ -262,25 +272,23 @@ config IP6_NF_NAT To compile it as a module, choose M here. If unsure, say N. -if IP6_NF_NAT - config IP6_NF_TARGET_MASQUERADE tristate "MASQUERADE target support" select NETFILTER_XT_TARGET_MASQUERADE + depends on IP6_NF_NAT help This is a backwards-compat option for the user's convenience (e.g. when running oldconfig). It selects NETFILTER_XT_TARGET_MASQUERADE. config IP6_NF_TARGET_NPT tristate "NPT (Network Prefix translation) target support" + depends on IP6_NF_NAT || NFT_COMPAT help This option adds the `SNPT' and `DNPT' target, which perform stateless IPv6-to-IPv6 Network Prefix Translation per RFC 6296. To compile it as a module, choose M here. If unsure, say N. -endif # IP6_NF_NAT - endif # IP6_NF_IPTABLES endmenu
net/ipv6/netfilter/Makefile +1 -1
@@ -4,7 +4,7 @@ # # Link order matters here. -obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o +obj-$(CONFIG_IP6_NF_IPTABLES_LEGACY) += ip6_tables.o obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
net/netfilter/Kconfig +6 -6
@@ -816,7 +816,7 @@ config NETFILTER_XT_TARGET_AUDIT config NETFILTER_XT_TARGET_CHECKSUM tristate "CHECKSUM target support" - depends on IP_NF_MANGLE || IP6_NF_MANGLE + depends on IP_NF_MANGLE || IP6_NF_MANGLE || NFT_COMPAT depends on NETFILTER_ADVANCED help This option adds a `CHECKSUM' target, which can be used in the iptables mangle
@@ -867,7 +867,7 @@ config NETFILTER_XT_TARGET_CONNSECMARK config NETFILTER_XT_TARGET_CT tristate '"CT" target support' depends on NF_CONNTRACK - depends on IP_NF_RAW || IP6_NF_RAW + depends on IP_NF_RAW || IP6_NF_RAW || NFT_COMPAT depends on NETFILTER_ADVANCED help This options adds a `CT' target, which allows to specify initial
@@ -878,7 +878,7 @@ config NETFILTER_XT_TARGET_CT config NETFILTER_XT_TARGET_DSCP tristate '"DSCP" and "TOS" target support' - depends on IP_NF_MANGLE || IP6_NF_MANGLE + depends on IP_NF_MANGLE || IP6_NF_MANGLE || NFT_COMPAT depends on NETFILTER_ADVANCED help This option adds a `DSCP' target, which allows you to manipulate
@@ -894,7 +894,7 @@ config NETFILTER_XT_TARGET_DSCP config NETFILTER_XT_TARGET_HL tristate '"HL" hoplimit target support' - depends on IP_NF_MANGLE || IP6_NF_MANGLE + depends on IP_NF_MANGLE || IP6_NF_MANGLE || NFT_COMPAT depends on NETFILTER_ADVANCED help This option adds the "HL" (for IPv6) and "TTL" (for IPv4)
@@ -1078,7 +1078,7 @@ config NETFILTER_XT_TARGET_TPROXY depends on NETFILTER_ADVANCED depends on IPV6 || IPV6=n depends on IP6_NF_IPTABLES || IP6_NF_IPTABLES=n - depends on IP_NF_MANGLE + depends on IP_NF_MANGLE || NFT_COMPAT select NF_DEFRAG_IPV4 select NF_DEFRAG_IPV6 if IP6_NF_IPTABLES != n select NF_TPROXY_IPV4
@@ -1145,7 +1145,7 @@ config NETFILTER_XT_TARGET_TCPMSS config NETFILTER_XT_TARGET_TCPOPTSTRIP tristate '"TCPOPTSTRIP" target support' - depends on IP_NF_MANGLE || IP6_NF_MANGLE + depends on IP_NF_MANGLE || IP6_NF_MANGLE || NFT_COMPAT depends on NETFILTER_ADVANCED help This option adds a "TCPOPTSTRIP" target, which allows you to strip
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 899/969 HID: uclogic: Fix regression of input name assignment
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
[ Upstream commit 487359284509a6745e14b8c0518768bc277809b0 ]
The previous fix for adding the devm_kasprintf() return check in the commit bd07f751208b ("HID: uclogic: Add NULL check in uclogic_input_configured()") changed the condition of hi->input->name assignment, and it resulted in missing the proper input device name when no custom suffix is defined.
Restore the conditional to the original content to address the regression.
--- drivers/hid/hid-uclogic-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/hid/hid-uclogic-core.c +3 -1
@@ -142,7 +142,9 @@ static int uclogic_input_configured(struct hid_device *hdev, suffix ="System Control" ;break ; } - }else { + } + +if (suffix) { hi->input->name =devm_kasprintf (&hdev->dev,GFP_KERNEL ,"%s %s" , hdev->name, suffix);if (!hi->input->name)
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 947/969 wifi: ath11k: initialize hw_ops for IPQ5018
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sriram R <[email protected]>
[ Upstream commit ba60f2793d3a37a00da14bb56a26558a902d2831 ]
The ipq5018_ops is initialized for IPQ5018. This is different from other platforms.
Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/core.c | 1 + drivers/net/wireless/ath/ath11k/hw.c | 40 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + 3 files changed, 42 insertions(+)
drivers/net/wireless/ath/ath11k/core.c +1 -0
@@ -635,6 +635,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { }, .internal_sleep_clock = false, .regs = &ipq5018_regs, + .hw_ops = &ipq5018_ops, .host_ce_config = ath11k_host_ce_config_qcn9074, .ce_count = CE_CNT_5018, .target_ce_config = ath11k_target_ce_config_wlan_ipq5018,
drivers/net/wireless/ath/ath11k/hw.c +40 -0
@@ -1085,6 +1085,46 @@ const struct ath11k_hw_ops wcn6750_ops = { .get_ring_selector = ath11k_hw_wcn6750_get_tcl_ring_selector, }; +/* IPQ5018 hw ops is similar to QCN9074 except for the dest ring remap */ +const struct ath11k_hw_ops ipq5018_ops = { + .get_hw_mac_from_pdev_id = ath11k_hw_ipq6018_mac_from_pdev_id, + .wmi_init_config = ath11k_init_wmi_config_ipq8074, + .mac_id_to_pdev_id = ath11k_hw_mac_id_to_pdev_id_ipq8074, + .mac_id_to_srng_id = ath11k_hw_mac_id_to_srng_id_ipq8074, + .tx_mesh_enable = ath11k_hw_qcn9074_tx_mesh_enable, + .rx_desc_get_first_msdu = ath11k_hw_qcn9074_rx_desc_get_first_msdu, + .rx_desc_get_last_msdu = ath11k_hw_qcn9074_rx_desc_get_last_msdu, + .rx_desc_get_l3_pad_bytes = ath11k_hw_qcn9074_rx_desc_get_l3_pad_bytes, + .rx_desc_get_hdr_status = ath11k_hw_qcn9074_rx_desc_get_hdr_status, + .rx_desc_encrypt_valid = ath11k_hw_qcn9074_rx_desc_encrypt_valid, + .rx_desc_get_encrypt_type = ath11k_hw_qcn9074_rx_desc_get_encrypt_type, + .rx_desc_get_decap_type = ath11k_hw_qcn9074_rx_desc_get_decap_type, + .rx_desc_get_mesh_ctl = ath11k_hw_qcn9074_rx_desc_get_mesh_ctl, + .rx_desc_get_ldpc_support = ath11k_hw_qcn9074_rx_desc_get_ldpc_support, + .rx_desc_get_mpdu_seq_ctl_vld = ath11k_hw_qcn9074_rx_desc_get_mpdu_seq_ctl_vld, + .rx_desc_get_mpdu_fc_valid = ath11k_hw_qcn9074_rx_desc_get_mpdu_fc_valid, + .rx_desc_get_mpdu_start_seq_no = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_seq_no, + .rx_desc_get_msdu_len = ath11k_hw_qcn9074_rx_desc_get_msdu_len, + .rx_desc_get_msdu_sgi = ath11k_hw_qcn9074_rx_desc_get_msdu_sgi, + .rx_desc_get_msdu_rate_mcs = ath11k_hw_qcn9074_rx_desc_get_msdu_rate_mcs, + .rx_desc_get_msdu_rx_bw = ath11k_hw_qcn9074_rx_desc_get_msdu_rx_bw, + .rx_desc_get_msdu_freq = ath11k_hw_qcn9074_rx_desc_get_msdu_freq, + .rx_desc_get_msdu_pkt_type = ath11k_hw_qcn9074_rx_desc_get_msdu_pkt_type, + .rx_desc_get_msdu_nss = ath11k_hw_qcn9074_rx_desc_get_msdu_nss, + .rx_desc_get_mpdu_tid = ath11k_hw_qcn9074_rx_desc_get_mpdu_tid, + .rx_desc_get_mpdu_peer_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_peer_id, + .rx_desc_copy_attn_end_tlv = ath11k_hw_qcn9074_rx_desc_copy_attn_end, + .rx_desc_get_mpdu_start_tag = ath11k_hw_qcn9074_rx_desc_get_mpdu_start_tag, + .rx_desc_get_mpdu_ppdu_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id, + .rx_desc_set_msdu_len = ath11k_hw_qcn9074_rx_desc_set_msdu_len, + .rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention, + .rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload, + .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, + .rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid, + .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2, + +}; +#define ATH11K_TX_RING_MASK_0 BIT(0)#define ATH11K_TX_RING_MASK_1 BIT(1)#define ATH11K_TX_RING_MASK_2 BIT(2)
drivers/net/wireless/ath/ath11k/hw.h +1 -0
@@ -275,6 +275,7 @@ extern const struct ath11k_hw_ops qca6390_ops;extern const struct ath11k_hw_ops qcn9074_ops;extern const struct ath11k_hw_ops wcn6855_ops;extern const struct ath11k_hw_ops wcn6750_ops; +extern const struct ath11k_hw_ops ipq5018_ops;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_ipq8074;extern const struct ath11k_hw_ring_mask ath11k_hw_ring_mask_qca6390;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 956/969 platform/x86: adv_swbutton: Check ACPI_HANDLE() against NULL
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit e7a9a6ea40e352cd7977f6a8c80bdeadf65ad838 ]
Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence.
Accordingly, add a requisite ACPI_HANDLE() check against NULL to the platform/x86 adv_swbutton driver.
--- drivers/platform/x86/adv_swbutton.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/platform/x86/adv_swbutton.c +5 -1
@@ -48,10 +48,14 @@ static int adv_swbutton_probe(struct platform_device *device) {struct adv_swbutton *button;struct input_dev *input; -acpi_handle handle =ACPI_HANDLE (&device->dev); +acpi_handle handle;acpi_status status;int error; + handle =ACPI_HANDLE (&device->dev); +if (!handle) +return -ENODEV ; + button =devm_kzalloc (&device->dev,sizeof (*button),GFP_KERNEL );if (!button)return -ENOMEM ;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 957/969 platform/x86: hp_accel: Check ACPI_COMPANION() against NULL
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit abfbe5ee8ae89f1f5449790423d5dd3e423545bd ]
Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence.
Accordingly, add a requisite ACPI_COMPANION() check against NULL to the platform/x86 hp_accel driver.
--- drivers/platform/x86/hp/hp_accel.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/x86/hp/hp_accel.c +3 -0
@@ -300,6 +300,9 @@ static int lis3lv02d_probe(struct platform_device *device)int ret; lis3_dev.bus_priv =ACPI_COMPANION (&device->dev); +if (!lis3_dev.bus_priv) +return -ENODEV ; + lis3_dev.init = lis3lv02d_acpi_init; lis3_dev.read = lis3lv02d_acpi_read; lis3_dev.write = lis3lv02d_acpi_write;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 958/969 platform/x86: intel-hid: Check ACPI_HANDLE() against NULL
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit 5c69e090ae5dd93d910f70db0796357080707d26 ]
Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence.
Accordingly, add a requisite ACPI_HANDLE() check against NULL to the platform/x86 intel-hid driver.
--- drivers/platform/x86/intel/hid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/platform/x86/intel/hid.c +5 -1
@@ -638,12 +638,16 @@ static bool button_array_present(struct platform_device *device)static int intel_hid_probe (struct platform_device *device) { -acpi_handle handle =ACPI_HANDLE (&device->dev);unsigned long long mode, dummy;struct intel_hid_priv *priv; +acpi_handle handle;acpi_status status;int err; + handle =ACPI_HANDLE (&device->dev); +if (!handle) +return -ENODEV ; +intel_hid_init_dsm (handle);if (!intel_hid_evaluate_method (handle,INTEL_HID_DSM_HDMM_FN , &mode)) {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 959/969 platform/x86: intel-vbtn: Check ACPI_HANDLE() against NULL
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit a9f305c5a355efeb240d406d378491d9eec02d07 ]
Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence.
Accordingly, add a requisite ACPI_HANDLE() check against NULL to the platform/x86 intel-vbtn driver.
--- drivers/platform/x86/intel/vbtn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/platform/x86/intel/vbtn.c +5 -1
@@ -272,12 +272,16 @@ static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel)static int intel_vbtn_probe (struct platform_device *device) { -acpi_handle handle =ACPI_HANDLE (&device->dev);bool dual_accel, has_buttons, has_switches;struct intel_vbtn_priv *priv; +acpi_handle handle;acpi_status status;int err; + handle =ACPI_HANDLE (&device->dev); +if (!handle) +return -ENODEV ; + dual_accel =dual_accel_detect (); has_buttons =acpi_has_method (handle,"VBDL" ); has_switches =intel_vbtn_has_switches (handle, dual_accel);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 960/969 RDMA/rtrs: Fix use-after-free in path file creation cleanup
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guangshuo Li <[email protected]>
[ Upstream commit 5b74373390113fba798a76b483837029ab010fef ]
In the error path of rtrs_srv_create_path_files(), the sysfs root folders may already have been created and srv_path->kobj may already have been initialized. If a later step fails, the cleanup currently calls kobject_put(&srv_path->kobj) before rtrs_srv_destroy_once_sysfs_root_folders(srv_path).
kobject_put() may drop the last reference to srv_path->kobj and invoke the release callback, rtrs_srv_release(), which frees srv_path. The following call to rtrs_srv_destroy_once_sysfs_root_folders(srv_path) then dereferences srv_path internally to access srv_path->srv, resulting in a use-after-free.
This failure path is reached before rtrs_srv_create_path_files() returns success, so the successful-path lifetime handling is not involved.
Fix this by destroying the sysfs root folders before calling kobject_put(&srv_path->kobj), so srv_path is still valid while the helper accesses it.
This issue was found by a static analysis tool I am developing.
--- drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c +1 -1
@@ -296,8 +296,8 @@ int rtrs_srv_create_path_files(struct rtrs_srv_path *srv_path) put_kobj:kobject_del (&srv_path->kobj); destroy_root: -kobject_put (&srv_path->kobj);rtrs_srv_destroy_once_sysfs_root_folders (srv_path); +kobject_put (&srv_path->kobj);return err; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 961/969 net: bridge: Flush multicast groups when snooping is disabled
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Petr Machata <[email protected]>
[ Upstream commit 68800bbf583f26f71491141e4b3c8582f9cfcbde ]
When forwarding multicast packets, the bridge takes MDB into account when IGMP / MLD snooping is enabled. Currently, when snooping is disabled, the MDB is retained, even though it is not used anymore.
At the same time, during the time that snooping is disabled, the IGMP / MLD control packets are obviously ignored, and after the snooping is reenabled, the administrator has to assume it is out of sync. In particular, missed join and leave messages would lead to traffic being forwarded to wrong interfaces.
Keeping the MDB entries around thus serves no purpose, and just takes memory. Note also that disabling per-VLAN snooping does actually flush the relevant MDB entries.
This patch flushes non-permanent MDB entries as global snooping is disabled.
Stable-dep-of: 4df78ff02629 ("bridge: mcast: Fix a possible use-after-free when removing a bridge port")
--- net/bridge/br_multicast.c | 9 +++++++++ 1 file changed, 9 insertions(+)
net/bridge/br_multicast.c +9 -0
@@ -4468,6 +4468,14 @@ static void br_multicast_start_querier(struct net_bridge_mcast *brmctx,rcu_read_unlock (); } +static void br_multicast_del_grps (struct net_bridge *br) +{ +struct net_bridge_port *port; + +list_for_each_entry (port, &br->port_list, list) +__br_multicast_disable_port_ctx (&port->multicast_ctx); +} +int br_multicast_toggle (struct net_bridge *br,unsigned long val,struct netlink_ext_ack *extack) {
@@ -4488,6 +4496,7 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val,br_opt_toggle (br,BROPT_MULTICAST_ENABLED , !!val);if (!br_opt_get (br,BROPT_MULTICAST_ENABLED )) { change_snoopers = true; +br_multicast_del_grps (br); goto unlock; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 962/969 bridge: mcast: Fix a possible use-after-free when removing a bridge port
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ido Schimmel <[email protected]>
[ Upstream commit 4df78ff02629c7729168f0696a7a2123c389818d ]
When per-VLAN multicast snooping is enabled, the bridge iterates over all the bridge ports, disables the per-port multicast context on each port and enables the per-{port, VLAN} multicast contexts instead. The reverse happens when per-VLAN multicast snooping is disabled.
When global multicast snooping is enabled, the bridge iterates over all the bridge ports and enables the per-port multicast context on each port. The reverse happens when multicast snooping is disabled.
The above scheme can result in a situation where both types of contexts (per-port and per-{port, VLAN}) are enabled on a single bridge port:
# ip link add name br1 up type bridge mcast_snooping 1 mcast_querier 1 vlan_filtering 1 # ip link add name dummy1 up master br1 type dummy # ip link set dev br1 type bridge mcast_vlan_snooping 1 # ip link set dev br1 type bridge mcast_snooping 0 # ip link set dev br1 type bridge mcast_snooping 1
This is not intended and it is a problem since the commit cited below. Prior to this commit, when removing a bridge port, br_multicast_disable_port() would disable the per-port multicast context and the per-{port, VLAN} multicast contexts would get disabled when flushing VLANs.
After this commit, br_multicast_disable_port() only disables the per-port multicast context if per-VLAN multicast snooping is disabled. If both types of contexts were enabled on the port when it was removed, the per-port multicast context would remain enabled when freeing the bridge port, leading to a use-after-free [1].
Fix by preventing the bridge from enabling / disabling the per-port multicast contexts when toggling global multicast snooping if per-VLAN multicast snooping is enabled.
[1]
ODEBUG: free active (active state 0) object: ffff88810f8bda78 object type: timer_list hint: br_ip6_multicast_port_query_expired (net/bridge/br_multicast.c:1927)
WARNING: lib/debugobjects.c:629 at debug_print_object+0x1b1/0x3e0, CPU#5: swapper/5/0 [...] Call Trace: <IRQ>
__debug_check_no_obj_freed (lib/debugobjects.c:1116)
kfree (mm/slub.c:2620 mm/slub.c:6250 mm/slub.c:6565) kobject_cleanup (lib/kobject.c:689)rcu_do_batch (kernel/rcu/tree.c:2617)rcu_core (kernel/rcu/tree.c:2869)handle_softirqs (kernel/softirq.c:622)__irq_exit_rcu (kernel/softirq.c:656 kernel/softirq.c:496 kernel/softirq.c:735) irq_exit_rcu (kernel/softirq.c:752)
sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1061 (discriminator 47) arch/x86/kernel/apic/apic.c:1061 (discriminator 47)) </IRQ>
--- net/bridge/br_multicast.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
net/bridge/br_multicast.c +17 -5
@@ -4468,10 +4468,24 @@ static void br_multicast_start_querier(struct net_bridge_mcast *brmctx,rcu_read_unlock (); } -static void br_multicast_del_grps (struct net_bridge *br) +static void br_multicast_enable_all_ports (struct net_bridge *br) {struct net_bridge_port *port; +if (br_opt_get (br,BROPT_MCAST_VLAN_SNOOPING_ENABLED )) +return ; + +list_for_each_entry (port, &br->port_list, list) +__br_multicast_enable_port_ctx (&port->multicast_ctx); +} + +static void br_multicast_disable_all_ports (struct net_bridge *br) +{ +struct net_bridge_port *port; + +if (br_opt_get (br,BROPT_MCAST_VLAN_SNOOPING_ENABLED )) +return ; +list_for_each_entry (port, &br->port_list, list)__br_multicast_disable_port_ctx (&port->multicast_ctx); }
@@ -4479,7 +4493,6 @@ static void br_multicast_del_grps(struct net_bridge *br)int br_multicast_toggle (struct net_bridge *br,unsigned long val,struct netlink_ext_ack *extack) { -struct net_bridge_port *port;bool change_snoopers = false;int err =0 ;
@@ -4496,7 +4509,7 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val,br_opt_toggle (br,BROPT_MULTICAST_ENABLED , !!val);if (!br_opt_get (br,BROPT_MULTICAST_ENABLED )) { change_snoopers = true; -br_multicast_del_grps (br); +br_multicast_disable_all_ports (br); goto unlock; }
@@ -4504,8 +4517,7 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val, goto unlock;br_multicast_open (br); -list_for_each_entry (port, &br->port_list, list) -__br_multicast_enable_port_ctx (&port->multicast_ctx); +br_multicast_enable_all_ports (br); change_snoopers = true;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 963/969 tracing: Avoid NULL return from hist_field_name() on truncation
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Carlier <[email protected]>
[ Upstream commit 576ec047d20b368b43c4d5db98c4f2e0f3c101ec ]
hist_field_name() returns "" everywhere except the fully-qualified VAR_REF/EXPR case, where snprintf() truncation returns NULL early and bypasses the bottom NULL->"" guard. Callers don't expect NULL:strcat(expr, hist_field_name(field, 0)) at trace_events_hist.c:1758 and the strcmp() in the sort-key match loop at :4804 both deref it.
system and event_name are bounded by MAX_EVENT_NAME_LEN, but the field name on a VAR_REF is kstrdup'd from a histogram variable name parsed out of the trigger string and has no length cap, so a long enough var name in a fully qualified reference can reach the truncation path.
Keep the length check but leave field_name as "" on overflow.
--- kernel/trace/trace_events_hist.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
kernel/trace/trace_events_hist.c +2 -4
@@ -1351,10 +1351,8 @@ static const char *hist_field_name(struct hist_field *field, len =snprintf (full_name,sizeof (full_name),"%s.%s.%s" , field->system, field->event_name, field->name); -if (len >=sizeof (full_name)) -return NULL ; - - field_name = full_name; +if (len <sizeof (full_name)) + field_name = full_name; }else field_name = field->name; }else if (field->flags &HIST_FIELD_FL_TIMESTAMP )
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 964/969 net: ag71xx: check error for platform_get_irq
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rosen Penev <[email protected]>
[ Upstream commit e7c70bf97e90d974cd575e4c90f8f9b07d056da3 ]
Complete error handling for a failed platform_get_irq() call
--- drivers/net/ethernet/atheros/ag71xx.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/atheros/ag71xx.c +3 -0
@@ -1880,6 +1880,9 @@ static int ag71xx_probe(struct platform_device *pdev)return -ENOMEM ; ndev->irq =platform_get_irq (pdev,0 ); +if (ndev->irq <0 ) +return ndev->irq; + err =devm_request_irq (&pdev->dev, ndev->irq, ag71xx_interrupt,0x0 ,dev_name (&pdev->dev), ndev);if (err) {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 965/969 string: add mem_is_zero() helper to check if memory area is all zeros
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jani Nikula <[email protected]>
[ Upstream commit 3942bb49728ad9e1f94d953a88af169a8f5d8099 ]
Almost two thirds of the memchr_inv() usages check if the memory area is all zeros, with no interest in where in the buffer the first non-zero byte is located. Checking for !memchr_inv(s, 0, n) is also not very intuitive or discoverable. Add an explicit mem_is_zero() helper for this use case.
Stable-dep-of: 3e6ccd790ed6 ("gpio: cdev: check if uAPI v2 config attributes are correctly zeroed")
--- include/linux/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
include/linux/string.h +12 -0
@@ -212,6 +212,18 @@ static inline void memcpy_flushcache(void *dst, const void *src, size_t cnt)void *memchr_inv (const void *s,int c,size_t n);char *strreplace (char *s,char old,char new); +/** +* mem_is_zero - Check if an area of memory is all 0's. +* @s: The memory area +* @n: The size of the area +* +* Return: True if the area of memory is all 0's. +*/ +static inline bool mem_is_zero (const void *s,size_t n) +{ +return !memchr_inv (s,0 , n); +} +extern void kfree_const (const void *x);extern char *kstrdup (const char *s,gfp_t gfp) __malloc;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 948/969 wifi: ath11k: add new hw ops for IPQ5018 to get rx dest ring hashmap
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sriram R <[email protected]>
[ Upstream commit 69968f88f1770d61cae0febef805fd00d66cf6a1 ]
The Destination ring control register is different for IPQ5018 when compared to IPQ8074/IPQ6018/QCN9074. Hence create a new hw ops to fetch the hash ring map for different device variants. ipq5018 hw ops is similar to qcn9074 except for this change, so reuse all the qcn9074 ops for ipq5018.
Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/hw.c | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
drivers/net/wireless/ath/ath11k/hw.c +44 -0
@@ -792,6 +792,49 @@ static void ath11k_hw_wcn6855_reo_setup(struct ath11k_base *ab) ring_hash_map); } +static void ath11k_hw_ipq5018_reo_setup (struct ath11k_base *ab) +{ +u32 reo_base =HAL_SEQ_WCSS_UMAC_REO_REG ; +u32 val; + +/* Each hash entry uses three bits to map to a particular ring. */ +u32 ring_hash_map =HAL_HASH_ROUTING_RING_SW1 <<0 | +HAL_HASH_ROUTING_RING_SW2 <<4 | +HAL_HASH_ROUTING_RING_SW3 <<8 | +HAL_HASH_ROUTING_RING_SW4 <<12 | +HAL_HASH_ROUTING_RING_SW1 <<16 | +HAL_HASH_ROUTING_RING_SW2 <<20 | +HAL_HASH_ROUTING_RING_SW3 <<24 | +HAL_HASH_ROUTING_RING_SW4 <<28 ; + + val =ath11k_hif_read32 (ab, reo_base +HAL_REO1_GEN_ENABLE ); + + val &= ~HAL_REO1_GEN_ENABLE_FRAG_DST_RING ; + val |=FIELD_PREP (HAL_REO1_GEN_ENABLE_FRAG_DST_RING , +HAL_SRNG_RING_ID_REO2SW1 ) | +FIELD_PREP (HAL_REO1_GEN_ENABLE_AGING_LIST_ENABLE ,1 ) | +FIELD_PREP (HAL_REO1_GEN_ENABLE_AGING_FLUSH_ENABLE ,1 ); +ath11k_hif_write32 (ab, reo_base +HAL_REO1_GEN_ENABLE , val); + +ath11k_hif_write32 (ab, reo_base +HAL_REO1_AGING_THRESH_IX_0 (ab), +HAL_DEFAULT_REO_TIMEOUT_USEC ); +ath11k_hif_write32 (ab, reo_base +HAL_REO1_AGING_THRESH_IX_1 (ab), +HAL_DEFAULT_REO_TIMEOUT_USEC ); +ath11k_hif_write32 (ab, reo_base +HAL_REO1_AGING_THRESH_IX_2 (ab), +HAL_DEFAULT_REO_TIMEOUT_USEC ); +ath11k_hif_write32 (ab, reo_base +HAL_REO1_AGING_THRESH_IX_3 (ab), +HAL_DEFAULT_REO_TIMEOUT_USEC ); + +ath11k_hif_write32 (ab, reo_base +HAL_REO1_DEST_RING_CTRL_IX_0 , + ring_hash_map); +ath11k_hif_write32 (ab, reo_base +HAL_REO1_DEST_RING_CTRL_IX_1 , + ring_hash_map); +ath11k_hif_write32 (ab, reo_base +HAL_REO1_DEST_RING_CTRL_IX_2 , + ring_hash_map); +ath11k_hif_write32 (ab, reo_base +HAL_REO1_DEST_RING_CTRL_IX_3 , + ring_hash_map); +} +static u16 ath11k_hw_ipq8074_mpdu_info_get_peerid (u8 *tlv_data) {u16 peer_id =0 ;
@@ -1118,6 +1161,7 @@ const struct ath11k_hw_ops ipq5018_ops = { .rx_desc_get_mpdu_ppdu_id = ath11k_hw_qcn9074_rx_desc_get_mpdu_ppdu_id, .rx_desc_set_msdu_len = ath11k_hw_qcn9074_rx_desc_set_msdu_len, .rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention, + .reo_setup = ath11k_hw_ipq5018_reo_setup, .rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload, .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, .rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 966/969 gpiolib: cdev: use !mem_is_zero() instead of memchr_inv(s, 0, n)
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit e106b1dd38e723ec2bb2bf57ea9b2aff464b9423 ]
Use the mem_is_zero() helper where possible.
Stable-dep-of: 3e6ccd790ed6 ("gpio: cdev: check if uAPI v2 config attributes are correctly zeroed")
--- drivers/gpio/gpiolib-cdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpio/gpiolib-cdev.c +4 -4
@@ -16,7 +16,6 @@#include <linux/hte.h> #include <linux/interrupt.h> #include <linux/irqreturn.h> -#include <linux/kernel.h> #include <linux/kfifo.h> #include <linux/module.h> #include <linux/mutex.h>
@@ -25,6 +24,7 @@#include <linux/rbtree.h> #include <linux/seq_file.h> #include <linux/spinlock.h> +#include <linux/string.h> #include <linux/timekeeping.h> #include <linux/uaccess.h> #include <linux/workqueue.h>
@@ -1339,7 +1339,7 @@ static int gpio_v2_line_config_validate(struct gpio_v2_line_config *lc,if (lc->num_attrs >GPIO_V2_LINE_NUM_ATTRS_MAX )return -EINVAL ; -if (memchr_inv (lc->padding,0 ,sizeof (lc->padding))) +if (!mem_is_zero (lc->padding,sizeof (lc->padding)))return -EINVAL ;for (i =0 ; i < num_lines; i++) {
@@ -1781,7 +1781,7 @@ static int linereq_create(struct gpio_device *gdev, void __user *ip)if ((ulr.num_lines ==0 ) || (ulr.num_lines >GPIO_V2_LINES_MAX ))return -EINVAL ; -if (memchr_inv (ulr.padding,0 ,sizeof (ulr.padding))) +if (!mem_is_zero (ulr.padding,sizeof (ulr.padding)))return -EINVAL ; lc = &ulr.config;
@@ -2541,7 +2541,7 @@ static int lineinfo_get(struct gpio_chardev_data *cdev, void __user *ip,if (copy_from_user (&lineinfo, ip,sizeof (lineinfo)))return -EFAULT ; -if (memchr_inv (lineinfo.padding,0 ,sizeof (lineinfo.padding))) +if (!mem_is_zero (lineinfo.padding,sizeof (lineinfo.padding)))return -EINVAL ; desc =gpiochip_get_desc (cdev->gdev->chip, lineinfo.offset);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 967/969 gpio: cdev: check if uAPI v2 config attributes are correctly zeroed
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bartosz Golaszewski <[email protected]>
[ Upstream commit 3e6ccd790ed69bedd3d9626d01dd35cf9821c121 ]
We check the padding of other uAPI v2 structures but not that of line config attributes. For used attributes: check if their padding is zeroed, for unused: check if the entire structure is zeroed.
--- drivers/gpio/gpiolib-cdev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpio/gpiolib-cdev.c +13 -0
@@ -1332,6 +1332,7 @@ static int gpio_v2_line_flags_validate(u64 flags)static int gpio_v2_line_config_validate (struct gpio_v2_line_config *lc,unsigned int num_lines) { +size_t unused_attrs;unsigned int i;u64 flags;int ret;
@@ -1339,9 +1340,21 @@ static int gpio_v2_line_config_validate(struct gpio_v2_line_config *lc,if (lc->num_attrs >GPIO_V2_LINE_NUM_ATTRS_MAX )return -EINVAL ; + unused_attrs =GPIO_V2_LINE_NUM_ATTRS_MAX - lc->num_attrs; +if (!mem_is_zero (lc->padding,sizeof (lc->padding)))return -EINVAL ; +for (i =0 ; i < lc->num_attrs; i++) { +if (lc->attrs[i].attr.padding !=0 ) +return -EINVAL ; + } + +if (unused_attrs) { +if (!mem_is_zero (&lc->attrs[lc->num_attrs], unused_attrs *sizeof (*lc->attrs))) +return -EINVAL ; + } +for (i =0 ; i < num_lines; i++) { flags =gpio_v2_line_config_flags (lc, i); ret =gpio_v2_line_flags_validate (flags);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 968/969 net: mana: validate rx_req_idx to prevent out-of-bounds array access
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aditya Garg <[email protected]>
[ Upstream commit b809d0409991b75a6cff846a5ac27c3062953f84 ]
In mana_hwc_rx_event_handler(), rx_req_idx is derived from sge->address in DMA-coherent memory. In Confidential VMs (SEV-SNP/TDX), this memory is shared unencrypted and HW can modify WQE contents at any time. No bounds check exists on rx_req_idx, which can lead to an out-of-bounds access into reqs[].
Add bounds check on rx_req_idx in mana_hwc_rx_event_handler() before using it to index the reqs[] array.
--- drivers/net/ethernet/microsoft/mana/hw_channel.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/microsoft/mana/hw_channel.c +6 -0
@@ -214,6 +214,12 @@ static void mana_hwc_rx_event_handler(void *ctx, u32 gdma_rxq_id, rq_base_addr = hwc_rxq->msg_buf->mem_info.dma_handle; rx_req_idx = (sge->address - rq_base_addr) / hwc->max_req_msg_size; +if (rx_req_idx >= hwc_rxq->msg_buf->num_reqs) { +dev_err (hwc->dev,"HWC RX: wrong rx_req_idx=%llu, num_reqs=%u\n" , + rx_req_idx, hwc_rxq->msg_buf->num_reqs); +return ; + } + rx_req = &hwc_rxq->msg_buf->reqs[rx_req_idx]; resp = (struct gdma_resp_hdr *)rx_req->buf_va;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 969/969 security/keys: fix missed RCU read section on lookup
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds <[email protected]>
commit 43a1e3744548e6fd85873e6fb43e293eb4010694 upstream.
Nicholas Carlini reports that the keyring code calls assoc_array_find() in find_key_to_update() without holding the RCU read lock, while the assoc_array_gc() code really is designed around removing the node from the tree and then freeing it after an RCU grace-period.
The regular key handling doesn't see this because holding the keyring semaphore hides any lifetime issues, but the persistent key handling uses a different model.
Instead of extending the keyring locking, just do the simple RCU locking that the assoc_array was designed for.
--- security/keys/keyring.c | 1 + 1 file changed, 1 insertion(+)
security/keys/keyring.c +1 -0
@@ -1109,6 +1109,7 @@ key_ref_t find_key_to_update(key_ref_t keyring_ref,kenter ("{%d},{%s,%s}" , keyring->serial, index_key->type->name, index_key->description); +guard (rcu)(); object =assoc_array_find (&keyring->keys, &keyring_assoc_array_ops, index_key);
Signature · 1 line
2.54.0
Greg Kroah-Hartman
maintainerPATCH 949/969 wifi: ath11k: fix rssi station dump not updated in QCN9074
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: P Praneesh <[email protected]>
[ Upstream commit 031ffa6c2cd305a57ccc6d610f2decd956b2e7f6 ]
In QCN9074, station dump signal values display default value which is -95 dbm, since there is firmware header change for HAL_RX_MPDU_START between QCN9074 and IPQ8074 which cause wrong peer_id fetch from msdu. Fix this by updating hal_rx_mpdu_info with corresponding QCN9074 tlv format.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01695-QCAHKSWPL_SILICONZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/hal_rx.c | 10 ++++++++- drivers/net/wireless/ath/ath11k/hal_rx.h | 18 +++++++++++++++- drivers/net/wireless/ath/ath11k/hw.c | 27 ++++++++++++++++-------- drivers/net/wireless/ath/ath11k/hw.h | 2 +- 4 files changed, 45 insertions(+), 12 deletions(-)
drivers/net/wireless/ath/ath11k/hal_rx.c +9 -1
@@ -866,6 +866,12 @@ ath11k_hal_rx_populate_mu_user_info(void *rx_tlv, struct hal_rx_mon_ppdu_info *path11k_hal_rx_populate_byte_count (rx_tlv, ppdu_info, rx_user_status); } +static u16 ath11k_hal_rx_mpduinfo_get_peerid (struct ath11k_base *ab, +struct hal_rx_mpdu_info *mpdu_info) +{ +return ab->hw_params.hw_ops->mpdu_info_get_peerid (mpdu_info); +} + static enum hal_rx_mon_status ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab, struct hal_rx_mon_ppdu_info *ppdu_info,
@@ -1460,9 +1466,11 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,break ; }case HAL_RX_MPDU_START : { +struct hal_rx_mpdu_info *mpdu_info = + (struct hal_rx_mpdu_info *)tlv_data;u16 peer_id; - peer_id = ab->hw_params.hw_ops->mpdu_info_get_peerid (tlv_data); + peer_id =ath11k_hal_rx_mpduinfo_get_peerid (ab, mpdu_info);if (peer_id) ppdu_info->peer_id = peer_id;break ;
drivers/net/wireless/ath/ath11k/hal_rx.h +17 -1
@@ -405,7 +405,7 @@ struct hal_rx_phyrx_rssi_legacy_info {#define HAL_RX_MPDU_INFO_INFO0_PEERID_WCN6855 GENMASK(15, 0)#define HAL_RX_MPDU_INFO_INFO1_MPDU_LEN GENMASK(13, 0) -struct hal_rx_mpdu_info { +struct hal_rx_mpdu_info_ipq8074 {__le32 rsvd0;__le32 info0;__le32 rsvd1[11 ];
@@ -413,12 +413,28 @@ struct hal_rx_mpdu_info {__le32 rsvd2[9 ]; } __packed; +struct hal_rx_mpdu_info_qcn9074 { +__le32 rsvd0[10 ]; +__le32 info0; +__le32 rsvd1[2 ]; +__le32 info1; +__le32 rsvd2[9 ]; +} __packed; +struct hal_rx_mpdu_info_wcn6855 {__le32 rsvd0[8 ];__le32 info0;__le32 rsvd1[14 ]; } __packed; +struct hal_rx_mpdu_info { +union { +struct hal_rx_mpdu_info_ipq8074 ipq8074; +struct hal_rx_mpdu_info_qcn9074 qcn9074; +struct hal_rx_mpdu_info_wcn6855 wcn6855; + } u; +} __packed; +#define HAL_RX_PPDU_END_DURATION GENMASK(23, 0)struct hal_rx_ppdu_end_duration {__le32 rsvd0[9 ];
drivers/net/wireless/ath/ath11k/hw.c +18 -9
@@ -835,26 +835,35 @@ static void ath11k_hw_ipq5018_reo_setup(struct ath11k_base *ab) ring_hash_map); } -static u16 ath11k_hw_ipq8074_mpdu_info_get_peerid (u8 *tlv_data) +static u16 +ath11k_hw_ipq8074_mpdu_info_get_peerid (struct hal_rx_mpdu_info *mpdu_info) {u16 peer_id =0 ; -struct hal_rx_mpdu_info *mpdu_info = - (struct hal_rx_mpdu_info *)tlv_data; peer_id =FIELD_GET (HAL_RX_MPDU_INFO_INFO0_PEERID , -__le32_to_cpu (mpdu_info->info0)); +__le32_to_cpu (mpdu_info->u.ipq8074.info0));return peer_id; } -static u16 ath11k_hw_wcn6855_mpdu_info_get_peerid (u8 *tlv_data) +static u16 +ath11k_hw_qcn9074_mpdu_info_get_peerid (struct hal_rx_mpdu_info *mpdu_info) +{ +u16 peer_id =0 ; + + peer_id =FIELD_GET (HAL_RX_MPDU_INFO_INFO0_PEERID , +__le32_to_cpu (mpdu_info->u.qcn9074.info0)); + +return peer_id; +} + +static u16 +ath11k_hw_wcn6855_mpdu_info_get_peerid (struct hal_rx_mpdu_info *mpdu_info) {u16 peer_id =0 ; -struct hal_rx_mpdu_info_wcn6855 *mpdu_info = - (struct hal_rx_mpdu_info_wcn6855 *)tlv_data; peer_id =FIELD_GET (HAL_RX_MPDU_INFO_INFO0_PEERID_WCN6855 , -__le32_to_cpu (mpdu_info->info0)); +__le32_to_cpu (mpdu_info->u.wcn6855.info0));return peer_id; }
@@ -1042,7 +1051,7 @@ const struct ath11k_hw_ops qcn9074_ops = { .rx_desc_get_attention = ath11k_hw_qcn9074_rx_desc_get_attention, .rx_desc_get_msdu_payload = ath11k_hw_qcn9074_rx_desc_get_msdu_payload, .reo_setup = ath11k_hw_ipq8074_reo_setup, - .mpdu_info_get_peerid = ath11k_hw_ipq8074_mpdu_info_get_peerid, + .mpdu_info_get_peerid = ath11k_hw_qcn9074_mpdu_info_get_peerid, .rx_desc_mac_addr2_valid = ath11k_hw_ipq9074_rx_desc_mac_addr2_valid, .rx_desc_mpdu_start_addr2 = ath11k_hw_ipq9074_rx_desc_mpdu_start_addr2, .get_ring_selector = ath11k_hw_ipq8074_get_tcl_ring_selector,
drivers/net/wireless/ath/ath11k/hw.h +1 -1
@@ -263,7 +263,7 @@ struct ath11k_hw_ops {struct rx_attention *(*rx_desc_get_attention)(struct hal_rx_desc *desc);u8 *(*rx_desc_get_msdu_payload)(struct hal_rx_desc *desc);void (*reo_setup)(struct ath11k_base *ab); -u16 (*mpdu_info_get_peerid)(u8 *tlv_data); +u16 (*mpdu_info_get_peerid)(struct hal_rx_mpdu_info *mpdu_info);bool (*rx_desc_mac_addr2_valid)(struct hal_rx_desc *desc);u8 * (*rx_desc_mpdu_start_addr2)(struct hal_rx_desc *desc);u32 (*get_ring_selector)(struct sk_buff *skb);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 950/969 wifi: ath11k: fix peer resolution on rx path when peer_id=0
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Leach <[email protected]>
[ Upstream commit 2a2451a34afdf563b3102d36a4b6cf335cf813e2 ]
It has been observed that on certain chipsets a peer can be assigned peer_id=0. For reception of non-aggregated MPDUs this is fine as ath11k_dp_rx_h_find_peer() has a fallback case where it locates the peer based upon the source MAC address. On an aggregated link, the mpdu_start header is only populated by hardware on the first sub-MSDU. This causes the peer resolution to be skipped for the subsequent MSDUs and the encryption type of these frames to be set to an incorrect value, resulting in these MSDUs being dropped by ieee80211.
ath11k_pci 0000:03:00.0: data rx skb 000000002f4b704d len 1534 peer xx:xx:xx:xx:xx:xx 0 ucast sn 3063 he160 rate_idx 9 vht_nss 2 freq 5240 band 1 flag 0x40d1a fcs-err 0 mic-err 0 amsdu-more 0 peer_id 0 first_msdu 1 last_msdu 0 ath11k_pci 0000:03:00.0: data rx skb 0000000038acd580 len 1534 peer (null) 0 ucast sn 3063 he160 rate_idx 9 vht_nss 2 freq 5240 band 1 flag 0x40d00 fcs-err 0 mic-err 0 amsdu-more 0 peer_id 0 first_msdu 0 last_msdu 1
Remove the null peer_id checks in ath11k_dp_rx_h_find_peer() and ath11k_hal_rx_parse_mon_status_tlv(), allowing peers with an assigned ID of 0 to be resolved.
Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.9
--- drivers/net/wireless/ath/ath11k/dp_rx.c | 3 +-- drivers/net/wireless/ath/ath11k/hal_rx.c | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +1 -2
@@ -2226,8 +2226,7 @@ ath11k_dp_rx_h_find_peer(struct ath11k_base *ab, struct sk_buff *msdu)lockdep_assert_held (&ab->base_lock); -if (rxcb->peer_id) - peer =ath11k_peer_find_by_id (ab, rxcb->peer_id); + peer =ath11k_peer_find_by_id (ab, rxcb->peer_id);if (peer)return peer;
drivers/net/wireless/ath/ath11k/hal_rx.c +1 -4
@@ -1468,11 +1468,8 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,case HAL_RX_MPDU_START : {struct hal_rx_mpdu_info *mpdu_info = (struct hal_rx_mpdu_info *)tlv_data; -u16 peer_id; - peer_id =ath11k_hal_rx_mpduinfo_get_peerid (ab, mpdu_info); -if (peer_id) - ppdu_info->peer_id = peer_id; + ppdu_info->peer_id =ath11k_hal_rx_mpduinfo_get_peerid (ab, mpdu_info);break ; }case HAL_RXPCU_PPDU_END_INFO : {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 951/969 net: dsa: mt7530: sync driver-specific behavior of MT7531 variants
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Golle <[email protected]>
[ Upstream commit 497041d763016c2e8314d2f6a329a9b77c3797ca ]
MT7531 standalone and MMIO variants found in MT7988 and EN7581 share most basic properties. Despite that, assisted_learning_on_cpu_port and mtu_enforcement_ingress were only applied for MT7531 but not for MT7988 or EN7581, causing the expected issues on MMIO devices.
Apply both settings equally also for MT7988 and EN7581 by moving both assignments form mt7531_setup() to mt7531_setup_common().
This fixes unwanted flooding of packets due to unknown unicast during DA lookup, as well as issues with heterogenous MTU settings.
Stable-dep-of: e824e40d0e84 ("net: dsa: mt7530: fix FDB entries not aging out with short timeout")
--- drivers/net/dsa/mt7530.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/dsa/mt7530.c +3 -3
@@ -2558,6 +2558,9 @@ mt7531_setup_common(struct dsa_switch *ds)struct mt7530_priv *priv = ds->priv;int ret, i; + ds->assisted_learning_on_cpu_port = true; + ds->mtu_enforcement_ingress = true; +mt753x_trap_frames (priv);/* Enable and reset MIB counters */
@@ -2701,9 +2704,6 @@ mt7531_setup(struct dsa_switch *ds)if (ret)return ret; - ds->assisted_learning_on_cpu_port = true; - ds->mtu_enforcement_ingress = true; -return 0 ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 952/969 net: dsa: mt7530: fix FDB entries not aging out with short timeout
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Golle <[email protected]>
[ Upstream commit e824e40d0e841fab66ab7897d6c7b14dc81c66a7 ]
The DSA forwarding selftests bridge_vlan_aware.sh and bridge_vlan_unaware.sh configure the bridge with ageing_time set to LOW_AGEING_TIME (1000 centiseconds, i.e. 10 seconds) and then run learning_test() in lib.sh, which expects a learned FDB entry to be removed after ageing_time + 10 seconds. On MT7530/MT7531 the entry persisted past the deadline and the "Found FDB record when should not" assertion failed.
With msecs=10000, the algorithm in mt7530_set_ageing_time() finds AGE_CNT=0 and AGE_UNIT=9 as the first exact match (starting the search from tmp_age_count=0). The per-entry aging counter is initialized to AGE_CNT when a MAC address is learned, so with AGE_CNT=0 new entries start with a counter value of 0, which the hardware treats as "already aged" and never removes, effectively disabling aging.
Fix this by starting the search from tmp_age_count=1 to ensure entries always have a non-zero initial aging counter. For a 10-second ageing time this yields AGE_CNT=1 and AGE_UNIT=4 instead:
the timer ticks every 5 seconds and entries are removed after 2 ticks.
Starting the search at AGE_CNT=1 raises the minimum representable ageing time from 1 to 2 seconds. Without bounds, a stale ageing_time of 1 second would now make the loop fall through without setting age_count and age_unit, leaving them uninitialized when written to the MT7530_AAC hardware register. Set ds->ageing_time_min and ds->ageing_time_max so the DSA core validates the range before the callback is invoked, and drop the now-redundant range check from mt7530_set_ageing_time().
--- drivers/net/dsa/mt7530.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/net/dsa/mt7530.c +14 -6
@@ -911,12 +911,16 @@ mt7530_set_ageing_time(struct dsa_switch *ds, unsigned int msecs)unsigned int age_count;unsigned int age_unit; -/* Applied timer is (AGE_CNT + 1) * (AGE_UNIT + 1) seconds */ -if (secs <1 || secs > (AGE_CNT_MAX +1 ) * (AGE_UNIT_MAX +1 )) -return -ERANGE ; - -/* iterate through all possible age_count to find the closest pair */ -for (tmp_age_count =0 ; tmp_age_count <=AGE_CNT_MAX ; ++tmp_age_count) { +/* Applied timer is (AGE_CNT + 1) * (AGE_UNIT + 1) seconds. +* The DSA core has already validated the range using +* ds->ageing_time_min and ds->ageing_time_max. +* +* Iterate through all possible age_count values to find the closest +* pair. Start from 1 because the per-entry aging counter is +* initialized to AGE_CNT and a value of 0 means the entry will +* never be aged out. +*/ +for (tmp_age_count =1 ; tmp_age_count <=AGE_CNT_MAX ; ++tmp_age_count) {unsigned int tmp_age_unit = secs / (tmp_age_count +1 ) -1 ;if (tmp_age_unit <=AGE_UNIT_MAX ) {
@@ -2381,6 +2385,8 @@ mt7530_setup(struct dsa_switch *ds) ds->assisted_learning_on_cpu_port = true; ds->mtu_enforcement_ingress = true; + ds->ageing_time_min =2 *1000 ; + ds->ageing_time_max = (AGE_CNT_MAX +1 ) * (AGE_UNIT_MAX +1 ) *1000 ;if (priv->id ==ID_MT7530 ) {regulator_set_voltage (priv->core_pwr,1000000 ,1000000 );
@@ -2560,6 +2566,8 @@ mt7531_setup_common(struct dsa_switch *ds) ds->assisted_learning_on_cpu_port = true; ds->mtu_enforcement_ingress = true; + ds->ageing_time_min =2 *1000 ; + ds->ageing_time_max = (AGE_CNT_MAX +1 ) * (AGE_UNIT_MAX +1 ) *1000 ;mt753x_trap_frames (priv);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 953/969 net: dsa: mt7530: rename mt753x_bpdu_port_fw enum to mt753x_to_cpu_fw
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arınç ÜNAL <[email protected]>
[ Upstream commit 7603a0c7d2210a253265394b50567c64fbb977e4 ]
The mt753x_bpdu_port_fw enum is globally used for manipulating the process of deciding the forwardable ports, specifically concerning the CPU port(s). Therefore, rename it and the values in it to mt753x_to_cpu_fw.
Change FOLLOW_MFC to SYSTEM_DEFAULT to be on par with the switch documents.
Stable-dep-of: 3ac85bcfd404 ("net: dsa: mt7530: preserve VLAN tags on trapped link-local frames")
--- drivers/net/dsa/mt7530.c | 44 ++++++++++------------- drivers/net/dsa/mt7530.h | 76 ++++++++++++++++++++-------------------- 2 files changed, 56 insertions(+), 64 deletions(-)
drivers/net/dsa/mt7530.c +18 -26
@@ -1191,42 +1191,34 @@ mt753x_trap_frames(struct mt7530_priv *priv)* VLAN-untagged. */ mt7530_rmw (priv,MT753X_BPC , -MT753X_PAE_BPDU_FR |MT753X_PAE_EG_TAG_MASK | -MT753X_PAE_PORT_FW_MASK |MT753X_BPDU_EG_TAG_MASK | -MT753X_BPDU_PORT_FW_MASK , -MT753X_PAE_BPDU_FR | -MT753X_PAE_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | -MT753X_PAE_PORT_FW (MT753X_BPDU_CPU_ONLY ) | -MT753X_BPDU_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | -MT753X_BPDU_CPU_ONLY ); +PAE_BPDU_FR |PAE_EG_TAG_MASK |PAE_PORT_FW_MASK | +BPDU_EG_TAG_MASK |BPDU_PORT_FW_MASK , +PAE_BPDU_FR |PAE_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +PAE_PORT_FW (TO_CPU_FW_CPU_ONLY ) | +BPDU_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +TO_CPU_FW_CPU_ONLY );/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress * them VLAN-untagged. */ mt7530_rmw (priv,MT753X_RGAC1 , -MT753X_R02_BPDU_FR |MT753X_R02_EG_TAG_MASK | -MT753X_R02_PORT_FW_MASK |MT753X_R01_BPDU_FR | -MT753X_R01_EG_TAG_MASK |MT753X_R01_PORT_FW_MASK , -MT753X_R02_BPDU_FR | -MT753X_R02_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | -MT753X_R02_PORT_FW (MT753X_BPDU_CPU_ONLY ) | -MT753X_R01_BPDU_FR | -MT753X_R01_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | -MT753X_BPDU_CPU_ONLY ); +R02_BPDU_FR |R02_EG_TAG_MASK |R02_PORT_FW_MASK | +R01_BPDU_FR |R01_EG_TAG_MASK |R01_PORT_FW_MASK , +R02_BPDU_FR |R02_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +R02_PORT_FW (TO_CPU_FW_CPU_ONLY ) |R01_BPDU_FR | +R01_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +TO_CPU_FW_CPU_ONLY );/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress * them VLAN-untagged. */ mt7530_rmw (priv,MT753X_RGAC2 , -MT753X_R0E_BPDU_FR |MT753X_R0E_EG_TAG_MASK | -MT753X_R0E_PORT_FW_MASK |MT753X_R03_BPDU_FR | -MT753X_R03_EG_TAG_MASK |MT753X_R03_PORT_FW_MASK , -MT753X_R0E_BPDU_FR | -MT753X_R0E_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | -MT753X_R0E_PORT_FW (MT753X_BPDU_CPU_ONLY ) | -MT753X_R03_BPDU_FR | -MT753X_R03_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | -MT753X_BPDU_CPU_ONLY ); +R0E_BPDU_FR |R0E_EG_TAG_MASK |R0E_PORT_FW_MASK | +R03_BPDU_FR |R03_EG_TAG_MASK |R03_PORT_FW_MASK , +R0E_BPDU_FR |R0E_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +R0E_PORT_FW (TO_CPU_FW_CPU_ONLY ) |R03_BPDU_FR | +R03_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +TO_CPU_FW_CPU_ONLY ); } static int
drivers/net/dsa/mt7530.h +38 -38
85 lines not on this page · raw message
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 954/969 net: dsa: mt7530: preserve VLAN tags on trapped link-local frames
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Golle <[email protected]>
[ Upstream commit 3ac85bcfd404b588298c95c6fba8aad4ad334f57 ]
The BPC, RGAC1 and RGAC2 registers control the handling of link-local frames with reserved MAC DAs (01:80:C2:00:00:0x). These frames are correctly trapped to the CPU port, but the egress VLAN tag attribute was set to MT7530_VLAN_EG_UNTAGGED which causes the switch to strip any VLAN tags from trapped frames before they reach the CPU.
This causes VLAN-tagged link-local frames (STP BPDUs, LLDP, PTP Peer Delay Requests) to arrive at the CPU without their VLAN tag, so they are delivered to the base network interface instead of the VLAN sub-interface. The DSA local_termination selftest confirms this: all link-local protocol tests on VLAN upper interfaces fail.
Set the EG_TAG attribute to MT7530_VLAN_EG_DISABLED (system default) so that the switch does not modify VLAN tags in trapped frames. This way VLAN-tagged frames retain their original tag and are delivered to the correct VLAN sub-interface, matching the behavior of non-trapped frames which pass through without VLAN tag modification.
--- drivers/net/dsa/mt7530.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
drivers/net/dsa/mt7530.c +15 -12
@@ -1187,37 +1187,40 @@ static void mt7530_setup_port5(struct dsa_switch *ds, phy_interface_t interface)static void mt753x_trap_frames (struct mt7530_priv *priv) { -/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them -* VLAN-untagged. +/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress +* them with the EG_TAG attribute set to disabled (system default) +* so that any VLAN tags in the frame are not modified by the +* switch egress VLAN tag processing. This preserves VLAN tags +* for reception on VLAN sub-interfaces. */ mt7530_rmw (priv,MT753X_BPC ,PAE_BPDU_FR |PAE_EG_TAG_MASK |PAE_PORT_FW_MASK |BPDU_EG_TAG_MASK |BPDU_PORT_FW_MASK , -PAE_BPDU_FR |PAE_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +PAE_BPDU_FR |PAE_EG_TAG (MT7530_VLAN_EG_DISABLED ) |PAE_PORT_FW (TO_CPU_FW_CPU_ONLY ) | -BPDU_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +BPDU_EG_TAG (MT7530_VLAN_EG_DISABLED ) |TO_CPU_FW_CPU_ONLY ); -/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress -* them VLAN-untagged. +/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and +* egress them with EG_TAG disabled. */ mt7530_rmw (priv,MT753X_RGAC1 ,R02_BPDU_FR |R02_EG_TAG_MASK |R02_PORT_FW_MASK |R01_BPDU_FR |R01_EG_TAG_MASK |R01_PORT_FW_MASK , -R02_BPDU_FR |R02_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +R02_BPDU_FR |R02_EG_TAG (MT7530_VLAN_EG_DISABLED ) |R02_PORT_FW (TO_CPU_FW_CPU_ONLY ) |R01_BPDU_FR | -R01_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +R01_EG_TAG (MT7530_VLAN_EG_DISABLED ) |TO_CPU_FW_CPU_ONLY ); -/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress -* them VLAN-untagged. +/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and +* egress them with EG_TAG disabled. */ mt7530_rmw (priv,MT753X_RGAC2 ,R0E_BPDU_FR |R0E_EG_TAG_MASK |R0E_PORT_FW_MASK |R03_BPDU_FR |R03_EG_TAG_MASK |R03_PORT_FW_MASK , -R0E_BPDU_FR |R0E_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +R0E_BPDU_FR |R0E_EG_TAG (MT7530_VLAN_EG_DISABLED ) |R0E_PORT_FW (TO_CPU_FW_CPU_ONLY ) |R03_BPDU_FR | -R03_EG_TAG (MT7530_VLAN_EG_UNTAGGED ) | +R03_EG_TAG (MT7530_VLAN_EG_DISABLED ) |TO_CPU_FW_CPU_ONLY ); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 955/969 net: mana: Fix TOCTOU double-fetch of hwc_msg_id from DMA buffer
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Erni Sri Satya Vennela <[email protected]>
[ Upstream commit 35f0f0a2536a4d604b4dbad92c85c4a8fdebb870 ]
In mana_hwc_rx_event_handler(), resp->response.hwc_msg_id is read from DMA-coherent memory and bounds-checked, then mana_hwc_handle_resp() re-reads the same field from the same DMA buffer for test_bit() and pointer arithmetic.
DMA-coherent memory is mapped uncacheable on x86 and is shared, unencrypted, in Confidential VMs (SEV-SNP/TDX), so each load goes directly to host-visible memory. A H/W can modify the value between the check and the use, bypassing the bounds validation.
Fix this by reading hwc_msg_id exactly once using READ_ONCE() into a stack-local variable in mana_hwc_rx_event_handler(), and passing the validated value as a parameter to mana_hwc_handle_resp().
--- .../net/ethernet/microsoft/mana/hw_channel.c | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-)
drivers/net/ethernet/microsoft/mana/hw_channel.c +13 -10
@@ -75,21 +75,19 @@ static int mana_hwc_post_rx_wqe(const struct hwc_wq *hwc_rxq, }static void mana_hwc_handle_resp (struct hw_channel_context *hwc,u32 resp_len, -struct hwc_work_request *rx_req) +struct hwc_work_request *rx_req,u16 msg_id) {const struct gdma_resp_hdr *resp_msg = rx_req->buf_va;struct hwc_caller_ctx *ctx;int err; -if (!test_bit (resp_msg->response.hwc_msg_id, - hwc->inflight_msg_res.map)) { -dev_err (hwc->dev,"hwc_rx: invalid msg_id = %u\n" , - resp_msg->response.hwc_msg_id); +if (!test_bit (msg_id, hwc->inflight_msg_res.map)) { +dev_err (hwc->dev,"hwc_rx: invalid msg_id = %u\n" , msg_id);mana_hwc_post_rx_wqe (hwc->rxq, rx_req);return ; } - ctx = hwc->caller_ctx + resp_msg->response.hwc_msg_id; + ctx = hwc->caller_ctx + msg_id; err =mana_hwc_verify_resp_msg (ctx, resp_msg, resp_len);if (err) goto out;
@@ -200,6 +198,7 @@ static void mana_hwc_rx_event_handler(void *ctx, u32 gdma_rxq_id,struct gdma_sge *sge;u64 rq_base_addr;u64 rx_req_idx; +u16 msg_id;u8 *wqe;if (WARN_ON_ONCE (hwc_rxq->gdma_wq->id != gdma_rxq_id))
@@ -218,13 +217,17 @@ static void mana_hwc_rx_event_handler(void *ctx, u32 gdma_rxq_id, rx_req = &hwc_rxq->msg_buf->reqs[rx_req_idx]; resp = (struct gdma_resp_hdr *)rx_req->buf_va; -if (resp->response.hwc_msg_id >= hwc->num_inflight_msg) { -dev_err (hwc->dev,"HWC RX: wrong msg_id=%u\n" , - resp->response.hwc_msg_id); +/* Read msg_id once from DMA buffer to prevent TOCTOU: +* DMA memory is shared/unencrypted in CVMs - host can +* modify it between reads. +*/ + msg_id =READ_ONCE (resp->response.hwc_msg_id); +if (msg_id >= hwc->num_inflight_msg) { +dev_err (hwc->dev,"HWC RX: wrong msg_id=%u\n" , msg_id);return ; } -mana_hwc_handle_resp (hwc, rx_oob->tx_oob_data_size, rx_req); +mana_hwc_handle_resp (hwc, rx_oob->tx_oob_data_size, rx_req, msg_id);/* Can no longer use 'resp', because the buffer is posted to the HW * in mana_hwc_handle_resp() above.
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 946/969 wifi: ath11k: update hal srng regs for IPQ5018
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sriram R <[email protected]>
[ Upstream commit 711b80acbdfb9667a9cf8374e13320a6e624ce73 ]
IPQ5018 hal srng register address & offsets are not similar to IPQ8074/IPQ6018/QCN9074, hence define a new set of srng register group data for IPQ5018.
Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
Stable-dep-of: 2a2451a34afd ("wifi: ath11k: fix peer resolution on rx path when peer_id=0")
--- drivers/net/wireless/ath/ath11k/core.c | 1 + drivers/net/wireless/ath/ath11k/hw.c | 79 ++++++++++++++++++++++++++ drivers/net/wireless/ath/ath11k/hw.h | 1 + 3 files changed, 81 insertions(+)
drivers/net/wireless/ath/ath11k/core.c +1 -0
@@ -634,6 +634,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = { .max_fft_bins = 1024, }, .internal_sleep_clock = false, + .regs = &ipq5018_regs, .host_ce_config = ath11k_host_ce_config_qcn9074, .ce_count = CE_CNT_5018, .target_ce_config = ath11k_target_ce_config_wlan_ipq5018,
drivers/net/wireless/ath/ath11k/hw.c +79 -0
85 lines not on this page · raw message
drivers/net/wireless/ath/ath11k/hw.h +1 -0
@@ -415,6 +415,7 @@ extern const struct ath11k_hw_regs qca6390_regs;extern const struct ath11k_hw_regs qcn9074_regs;extern const struct ath11k_hw_regs wcn6855_regs;extern const struct ath11k_hw_regs wcn6750_regs; +extern const struct ath11k_hw_regs ipq5018_regs;static inline const char *ath11k_bd_ie_type_str (enum ath11k_bd_ie_type type) {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 15/969 fs/smb/client: fix out-of-bounds read in cifs_sanitize_prepath
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fredric Cover <[email protected]>
[ Upstream commit 78ec5bf2f589ec7fd8f169394bfeca541b077317 ]
When cifs_sanitize_prepath is called with an empty string or a string containing only delimiters (e.g., "/"), the current logic attempts to check *(cursor2 - 1) before cursor2 has advanced. This results in an out-of-bounds read.
This patch adds an early exit check after stripping prepended delimiters. If no path content remains, the function returns NULL.
The bug was identified via manual audit and verified using a standalone test case compiled with AddressSanitizer, which triggered a SEGV on affected inputs.
--- fs/smb/client/fs_context.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/smb/client/fs_context.c +4 -0
@@ -454,6 +454,10 @@ char *cifs_sanitize_prepath(char *prepath, gfp_t gfp)while (IS_DELIM (*cursor1)) cursor1++; +/* exit in case of only delimiters */ +if (!*cursor1) +return NULL ; +/* copy the first letter */ *cursor2 = *cursor1;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 423/969 mtd: spi-nor: sst: Factor out common write operation to `sst_nor_write_data()`
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bence Csókás <[email protected]>
commit 18bcb4aa54eab75dce41e5c176a1c2bff94f0f79 upstream.
Writing to the Flash in sst_nor_write() is a 3-step process:
first an optional one-byte write to get 2-byte-aligned, then the bulk of the data is written out in vendor-specific 2-byte writes. Finally, if there's a byte left over, another one-byte write. This was implemented 3 times in the body of sst_nor_write(). To reduce code duplication, factor out these sub-steps to their own function.
--- drivers/mtd/spi-nor/sst.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-)
drivers/mtd/spi-nor/sst.c +19 -20
@@ -117,6 +117,21 @@ static const struct flash_info sst_nor_p .fixups = &sst26vf_nor_fixups }, }; +static int sst_nor_write_data (struct spi_nor *nor,loff_t to,size_t len, +const u_char *buf) +{ +u8 op = (len ==1 ) ?SPINOR_OP_BP :SPINOR_OP_AAI_WP ; +int ret; + + nor->program_opcode = op; + ret =spi_nor_write_data (nor, to,1 , buf); +if (ret <0 ) +return ret; +WARN (ret != len,"While writing %zu byte written %i bytes\n" , len, ret); + +return spi_nor_wait_till_ready (nor); +} +static int sst_nor_write (struct mtd_info *mtd,loff_t to,size_t len,size_t *retlen,const u_char *buf) {
@@ -138,16 +153,10 @@ static int sst_nor_write(struct mtd_info/* Start write from odd address. */ if (to %2 ) { - nor->program_opcode =SPINOR_OP_BP ; -/* write one byte. */ - ret =spi_nor_write_data (nor, to,1 , buf); + ret =sst_nor_write_data (nor, to,1 , buf);if (ret <0 ) goto out; -WARN (ret !=1 ,"While writing 1 byte written %i bytes\n" , ret); - ret =spi_nor_wait_till_ready (nor); -if (ret) - goto out; to++; actual++;
@@ -155,16 +164,11 @@ static int sst_nor_write(struct mtd_info/* Write out most of the data here. */ for (; actual < len -1 ; actual +=2 ) { - nor->program_opcode =SPINOR_OP_AAI_WP ; -/* write two bytes. */ - ret =spi_nor_write_data (nor, to,2 , buf + actual); + ret =sst_nor_write_data (nor, to,2 , buf + actual);if (ret <0 ) goto out; -WARN (ret !=2 ,"While writing 2 bytes written %i bytes\n" , ret); - ret =spi_nor_wait_till_ready (nor); -if (ret) - goto out; + to +=2 ; nor->sst_write_second = true; }
@@ -184,14 +188,9 @@ static int sst_nor_write(struct mtd_infoif (ret) goto out; - nor->program_opcode =SPINOR_OP_BP ; - ret =spi_nor_write_data (nor, to,1 , buf + actual); + ret =sst_nor_write_data (nor, to,1 , buf + actual);if (ret <0 ) goto out; -WARN (ret !=1 ,"While writing 1 byte written %i bytes\n" , ret); - ret =spi_nor_wait_till_ready (nor); -if (ret) - goto out; actual +=1 ;
Am 30.05.2026 um 17:52 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.1.175 release. There are 969 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 works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
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]
Quoted 8 lines · On Sat, 30 May 2026 17:52:04 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.1.175 release. There are 969 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, 01 Jun 2026 16:01:39 +0000. Anything received after that time might be too late.
Boot-tested under QEMU for Rust x86_64:
Thanks!
Cheers,
Miguel
Re: [PATCH 6.1 054/969] ALSA: usb-audio: Improve Focusrite sample rate filtering
In reply to Greg Kroah-Hartmansound/usb/format.c
Quoted 37 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geoffrey D. Bennett <[email protected]>
[ Upstream commit
24d2d3c5f94007a5a0554065ab7349bb69e28bcb]Replace the bLength == 10
max_ratecheck infocusrite_valid_sample_rate()with filtering that also examines the bmControlsVAL_ALT_SETTINGSbit.When
VAL_ALT_SETTINGSis readable, the device uses strict per-altsetting rate filtering (only the highest rate pair for that altsetting is valid). When it is not readable, all rates up tomax_rateare valid.For devices without the bLength == 10 Format Type descriptor extension but with
VAL_ALT_SETTINGSreadable and multiple altsettings (only seen in Scarlett 18i8 3rd Gen playback), fall back to the Focusrite
convention: alt 1 = 48kHz, alt 2 = 96kHz, alt 3 = 192kHz.This produces correct rate tables for all tested Focusrite devices (all Scarlett 2nd, 3rd, and 4th Gen, Clarett+, and Vocaster) using only USB descriptors, allowing
QUIRK_FLAG_VALIDATE_RATESto be removed for Focusrite in the next commit.Signed-off-by Geoffrey D. Bennett <[email protected]>Signed-off-by Takashi Iwai <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- sound/usb/format.c | 86 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 12 deletions(-)sound/usb/format.c +0
-0
[...]
Hi Greg,
Please drop these from 6.1 and 5.15. They're part of a 3-patch series that needs all 3 to get the benefit (plus 5 more fixes on top for the 1st Gen Scarletts that the series regressed).
The series avoids leaving the device at 192kHz after probe (which mutes the internal mixer and disables the Air/Safe modes until an application opens the PCM). But the part that actually fixes that, 38c322068a26 ("Add QUIRK_FLAG_SKIP_IFACE_SETUP"), wasn't selected. Without it, __snd_usb_parse_audio_interface() still calls snd_usb_init_sample_rate(rate_max) at probe, so removing VALIDATE_RATES on its own doesn't help.
Unfortunately 38c322068a26 is a regression for some 1st Gen Scarletts, and those exclusions were found one model at a time, so I'm not 100% confident every affected model is covered, although there have been no further reports in nearly 8 weeks. I'm not sure for 6.1/5.15 if the benefit outweighs the risk, but if you'd rather take it all, the full set in order is:
24d2d3c5f940 ALSA: usb-audio: Improve Focusrite sample rate filtering a8cc55bf81a4 ALSA: usb-audio: Remove VALIDATE_RATES quirk for Focusrite devices 38c322068a26 ALSA: usb-audio: Add QUIRK_FLAG_SKIP_IFACE_SETUP 8780f561f671 ALSA: usb-audio: Exclude Scarlett 2i2 1st Gen from SKIP_IFACE_SETUP 990a8b0732cf ALSA: usb-audio: Exclude Scarlett 2i4 1st Gen from SKIP_IFACE_SETUP f025ac8c698a ALSA: usb-audio: Exclude Scarlett Solo 1st Gen from SKIP_IFACE_SETUP a0dafdbd1049 ALSA: usb-audio: Exclude Scarlett 2i2 1st Gen (8016) from SKIP_IFACE_SETUP a47306a74c31 ALSA: usb-audio: Exclude Scarlett 18i20 1st Gen from SKIP_IFACE_SETUP
Same issue applies to 6.6 and 6.12: they took the first two (filter + VALIDATE_RATES removal) but not 38c322068a26, so the 192kHz behaviour is unchanged there. They should probably get the same treatment.
Thanks,
Geoffrey
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.175 release. There are 969 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, 01 Jun 2026 16:01:39 +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.1.175-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Sasha Levin
maintainerRe: [PATCH 6.1 054/969] ALSA: usb-audio: Improve Focusrite sample rate filtering
In reply to Geoffrey D. BennettQuoted 3 lines · Geoffrey D. Bennett
Please drop these from 6.1 and 5.15. They're part of a 3-patch series that needs all 3 to get the benefit (plus 5 more fixes on top for the 1st Gen Scarletts that the series regressed).
Dropped from the 6.1 and 5.15 queues. In 5.15 I also dropped the companion "ALSA: usb-audio: Remove VALIDATE_RATES quirk for Focusrite devices" (a8cc55bf81a4), since it builds on this one and dropping the filtering patch alone would leave validation removed atop the old filtering logic.
--
Thanks,
Sasha
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 6.1.175 release. There are 969 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.1.y
Best regards,
Pavel
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.175 release. There are 969 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 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.175 release. There are 969 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, 01 Jun 2026 16:01:39 +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.1.175-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Re: [PATCH 6.1 431/969] bcache: fix uninitialized closure object
In reply to Greg Kroah-HartmanHey Greg,
Quoted 8 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingzhe Zou <[email protected]>
commit
20a8e451ec1c7e99060b1bbaaad03ce88c39ddb8upstream.
Just a heads up, that this fix patch is missing from 6.6->6.18 kernels. While being backported to older kernels (< 6.1). Any blockers for it to be backported to newer kernels as well?
Regards,
Mahmoud Nagy Adam
Amazon Web Services Development Center Germany GmbH Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christof Hellmis, Andreas Stieger Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
Sasha Levin
maintainerRe: [PATCH 6.1 431/969] bcache: fix uninitialized closure object
Quoted 2 lines · Mahmoud Nagy Adam
This fix (
20a8e451ec1c"bcache: fix uninitialized closure object") is missing from 6.6 through 7.0.
Now queued from mainline (20a8e451ec1c) to 7.0.y, 6.18.y, 6.12.y and 6.6.y.
Thanks,
Sasha