From: Sasha Levin Date: Mon, 16 Dec 2024 15:07:21 +0000 (-0500) Subject: Drop riscv-fix-ipis-usage-in-kfence_protect_page.patch from 6.1 X-Git-Tag: v5.4.288~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9c947ed1550566abdd009402326e06bfbb25264d;p=thirdparty%2Fkernel%2Fstable-queue.git Drop riscv-fix-ipis-usage-in-kfence_protect_page.patch from 6.1 Signed-off-by: Sasha Levin --- diff --git a/queue-6.1/riscv-fix-ipis-usage-in-kfence_protect_page.patch b/queue-6.1/riscv-fix-ipis-usage-in-kfence_protect_page.patch deleted file mode 100644 index e842f7ce07a..00000000000 --- a/queue-6.1/riscv-fix-ipis-usage-in-kfence_protect_page.patch +++ /dev/null @@ -1,81 +0,0 @@ -From b3431a8bb336cece8adc452437befa7d4534b2fd Mon Sep 17 00:00:00 2001 -From: Alexandre Ghiti -Date: Mon, 9 Dec 2024 08:41:25 +0100 -Subject: riscv: Fix IPIs usage in kfence_protect_page() - -From: Alexandre Ghiti - -commit b3431a8bb336cece8adc452437befa7d4534b2fd upstream. - -flush_tlb_kernel_range() may use IPIs to flush the TLBs of all the -cores, which triggers the following warning when the irqs are disabled: - -[ 3.455330] WARNING: CPU: 1 PID: 0 at kernel/smp.c:815 smp_call_function_many_cond+0x452/0x520 -[ 3.456647] Modules linked in: -[ 3.457218] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.12.0-rc7-00010-g91d3de7240b8 #1 -[ 3.457416] Hardware name: QEMU QEMU Virtual Machine, BIOS -[ 3.457633] epc : smp_call_function_many_cond+0x452/0x520 -[ 3.457736] ra : on_each_cpu_cond_mask+0x1e/0x30 -[ 3.457786] epc : ffffffff800b669a ra : ffffffff800b67c2 sp : ff2000000000bb50 -[ 3.457824] gp : ffffffff815212b8 tp : ff6000008014f080 t0 : 000000000000003f -[ 3.457859] t1 : ffffffff815221e0 t2 : 000000000000000f s0 : ff2000000000bc10 -[ 3.457920] s1 : 0000000000000040 a0 : ffffffff815221e0 a1 : 0000000000000001 -[ 3.457953] a2 : 0000000000010000 a3 : 0000000000000003 a4 : 0000000000000000 -[ 3.458006] a5 : 0000000000000000 a6 : ffffffffffffffff a7 : 0000000000000000 -[ 3.458042] s2 : ffffffff815223be s3 : 00fffffffffff000 s4 : ff600001ffe38fc0 -[ 3.458076] s5 : ff600001ff950d00 s6 : 0000000200000120 s7 : 0000000000000001 -[ 3.458109] s8 : 0000000000000001 s9 : ff60000080841ef0 s10: 0000000000000001 -[ 3.458141] s11: ffffffff81524812 t3 : 0000000000000001 t4 : ff60000080092bc0 -[ 3.458172] t5 : 0000000000000000 t6 : ff200000000236d0 -[ 3.458203] status: 0000000200000100 badaddr: ffffffff800b669a cause: 0000000000000003 -[ 3.458373] [] smp_call_function_many_cond+0x452/0x520 -[ 3.458593] [] on_each_cpu_cond_mask+0x1e/0x30 -[ 3.458625] [] __flush_tlb_range+0x118/0x1ca -[ 3.458656] [] flush_tlb_kernel_range+0x1e/0x26 -[ 3.458683] [] kfence_protect+0xc0/0xce -[ 3.458717] [] kfence_guarded_free+0xc6/0x1c0 -[ 3.458742] [] __kfence_free+0x62/0xc6 -[ 3.458764] [] kfree+0x106/0x32c -[ 3.458786] [] detach_buf_split+0x188/0x1a8 -[ 3.458816] [] virtqueue_get_buf_ctx+0xb6/0x1f6 -[ 3.458839] [] virtqueue_get_buf+0xe/0x16 -[ 3.458880] [] virtblk_done+0x5c/0xe2 -[ 3.458908] [] vring_interrupt+0x6a/0x74 -[ 3.458930] [] __handle_irq_event_percpu+0x7c/0xe2 -[ 3.458956] [] handle_irq_event+0x3c/0x86 -[ 3.458978] [] handle_simple_irq+0x9e/0xbe -[ 3.459004] [] generic_handle_domain_irq+0x1c/0x2a -[ 3.459027] [] imsic_handle_irq+0xba/0x120 -[ 3.459056] [] generic_handle_domain_irq+0x1c/0x2a -[ 3.459080] [] riscv_intc_aia_irq+0x24/0x34 -[ 3.459103] [] handle_riscv_irq+0x2e/0x4c -[ 3.459133] [] call_on_irq_stack+0x32/0x40 - -So only flush the local TLB and let the lazy kfence page fault handling -deal with the faults which could happen when a core has an old protected -pte version cached in its TLB. That leads to potential inaccuracies which -can be tolerated when using kfence. - -Fixes: 47513f243b45 ("riscv: Enable KFENCE for riscv64") -Signed-off-by: Alexandre Ghiti -Cc: stable@vger.kernel.org -Link: https://lore.kernel.org/r/20241209074125.52322-1-alexghiti@rivosinc.com -Signed-off-by: Palmer Dabbelt -Signed-off-by: Greg Kroah-Hartman ---- - arch/riscv/include/asm/kfence.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/arch/riscv/include/asm/kfence.h -+++ b/arch/riscv/include/asm/kfence.h -@@ -55,7 +55,9 @@ static inline bool kfence_protect_page(u - else - set_pte(pte, __pte(pte_val(*pte) | _PAGE_PRESENT)); - -- flush_tlb_kernel_range(addr, addr + PAGE_SIZE); -+ preempt_disable(); -+ local_flush_tlb_kernel_range(addr, addr + PAGE_SIZE); -+ preempt_enable(); - - return true; - } diff --git a/queue-6.1/series b/queue-6.1/series index 1a65513e3b9..a8639a7d1e2 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -3,7 +3,6 @@ ksmbd-fix-racy-issue-from-session-lookup-and-expire.patch tcp-check-space-before-adding-mptcp-syn-options.patch blk-cgroup-fix-uaf-in-blkcg_unpin_online.patch alsa-usb-audio-add-implicit-feedback-quirk-for-yamaha-thr5.patch -riscv-fix-ipis-usage-in-kfence_protect_page.patch usb-host-max3421-hcd-correctly-abort-a-usb-request.patch ata-sata_highbank-fix-of-node-reference-leak-in-highbank_initialize_phys.patch usb-dwc2-fix-hcd-resume.patch diff --git a/releases/4.14.180/alsa-hda-match-both-pci-id-and-ssid-for-driver-blacklist.patch b/releases/4.14.180/alsa-hda-match-both-pci-id-and-ssid-for-driver-blacklist.patch index dd89304a011..e69de29bb2d 100644 --- a/releases/4.14.180/alsa-hda-match-both-pci-id-and-ssid-for-driver-blacklist.patch +++ b/releases/4.14.180/alsa-hda-match-both-pci-id-and-ssid-for-driver-blacklist.patch @@ -1,54 +0,0 @@ -From 977dfef40c8996b69afe23a9094d184049efb7bb Mon Sep 17 00:00:00 2001 -From: Takashi Iwai -Date: Fri, 24 Apr 2020 08:12:22 +0200 -Subject: ALSA: hda: Match both PCI ID and SSID for driver blacklist - -From: Takashi Iwai - -commit 977dfef40c8996b69afe23a9094d184049efb7bb upstream. - -The commit 3c6fd1f07ed0 ("ALSA: hda: Add driver blacklist") added a -new blacklist for the devices that are known to have empty codecs, and -one of the entries was ASUS ROG Zenith II (PCI SSID 1043:874f). -However, it turned out that the very same PCI SSID is used for the -previous model that does have the valid HD-audio codecs and the change -broke the sound on it. - -Since the empty codec problem appear on the certain AMD platform (PCI -ID 1022:1487), this patch changes the blacklist matching to both PCI -ID and SSID using pci_match_id(). Also, the entry that was removed by -the previous fix for ASUS ROG Zenigh II is re-added. - -Link: https://lore.kernel.org/r/20200424061222.19792-1-tiwai@suse.de -Signed-off-by: Takashi Iwai -Signed-off-by: Greg Kroah-Hartman - ---- - sound/pci/hda/hda_intel.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - ---- a/sound/pci/hda/hda_intel.c -+++ b/sound/pci/hda/hda_intel.c -@@ -2172,9 +2172,10 @@ static const struct hdac_io_ops pci_hda_ - * some HD-audio PCI entries are exposed without any codecs, and such devices - * should be ignored from the beginning. - */ --static const struct snd_pci_quirk driver_blacklist[] = { -- SND_PCI_QUIRK(0x1462, 0xcb59, "MSI TRX40 Creator", 0), -- SND_PCI_QUIRK(0x1462, 0xcb60, "MSI TRX40", 0), -+static const struct pci_device_id driver_blacklist[] = { -+ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1043, 0x874f) }, /* ASUS ROG Zenith II / Strix */ -+ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb59) }, /* MSI TRX40 Creator */ -+ { PCI_DEVICE_SUB(0x1022, 0x1487, 0x1462, 0xcb60) }, /* MSI TRX40 */ - {} - }; - -@@ -2197,7 +2198,7 @@ static int azx_probe(struct pci_dev *pci - bool schedule_probe; - int err; - -- if (snd_pci_quirk_lookup(pci, driver_blacklist)) { -+ if (pci_match_id(driver_blacklist, pci)) { - dev_info(&pci->dev, "Skipping the blacklisted device\n"); - return -ENODEV; - }