From: Greg Kroah-Hartman Date: Mon, 9 May 2022 14:16:51 +0000 (+0200) Subject: drop revert-parisc-fix-patch-code-locking-and-flushing.patch X-Git-Tag: v4.9.313~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c46d5e97b898c61495dc947011c4b6faed1ee124;p=thirdparty%2Fkernel%2Fstable-queue.git drop revert-parisc-fix-patch-code-locking-and-flushing.patch --- diff --git a/queue-5.10/revert-parisc-fix-patch-code-locking-and-flushing.patch b/queue-5.10/revert-parisc-fix-patch-code-locking-and-flushing.patch deleted file mode 100644 index 9bcba6fb134..00000000000 --- a/queue-5.10/revert-parisc-fix-patch-code-locking-and-flushing.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 6c800d7f55fcd78e17deae5ae4374d8e73482c13 Mon Sep 17 00:00:00 2001 -From: Helge Deller -Date: Sun, 8 May 2022 10:18:40 +0200 -Subject: Revert "parisc: Fix patch code locking and flushing" - -From: Helge Deller - -commit 6c800d7f55fcd78e17deae5ae4374d8e73482c13 upstream. - -This reverts commit a9fe7fa7d874a536e0540469f314772c054a0323. - -Leads to segfaults on 32bit kernel. - -Signed-off-by: Helge Deller -Signed-off-by: Greg Kroah-Hartman ---- - arch/parisc/kernel/patch.c | 25 ++++++++++++++----------- - 1 file changed, 14 insertions(+), 11 deletions(-) - ---- a/arch/parisc/kernel/patch.c -+++ b/arch/parisc/kernel/patch.c -@@ -40,7 +40,10 @@ static void __kprobes *patch_map(void *a - - *need_unmap = 1; - set_fixmap(fixmap, page_to_phys(page)); -- raw_spin_lock_irqsave(&patch_lock, *flags); -+ if (flags) -+ raw_spin_lock_irqsave(&patch_lock, *flags); -+ else -+ __acquire(&patch_lock); - - return (void *) (__fix_to_virt(fixmap) + (uintaddr & ~PAGE_MASK)); - } -@@ -49,7 +52,10 @@ static void __kprobes patch_unmap(int fi - { - clear_fixmap(fixmap); - -- raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ if (flags) -+ raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ else -+ __release(&patch_lock); - } - - void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len) -@@ -61,9 +67,8 @@ void __kprobes __patch_text_multiple(voi - int mapped; - - /* Make sure we don't have any aliases in cache */ -- flush_kernel_dcache_range_asm(start, end); -- flush_kernel_icache_range_asm(start, end); -- flush_tlb_kernel_range(start, end); -+ flush_kernel_vmap_range(addr, len); -+ flush_icache_range(start, end); - - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, &mapped); - -@@ -76,10 +81,8 @@ void __kprobes __patch_text_multiple(voi - * We're crossing a page boundary, so - * need to remap - */ -- flush_kernel_dcache_range_asm((unsigned long)fixmap, -- (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, -- (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, -+ (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, -@@ -87,10 +90,10 @@ void __kprobes __patch_text_multiple(voi - } - } - -- flush_kernel_dcache_range_asm((unsigned long)fixmap, (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); -+ flush_icache_range(start, end); - } - - void __kprobes __patch_text(void *addr, u32 insn) diff --git a/queue-5.10/series b/queue-5.10/series index b81b12f2c72..5f75126e408 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -1,5 +1,4 @@ mips-fix-cp0-counter-erratum-detection-for-r4k-cpus.patch -revert-parisc-fix-patch-code-locking-and-flushing.patch parisc-merge-model-and-model-name-into-one-line-in-proc-cpuinfo.patch alsa-hda-realtek-add-quirk-for-yoga-duet-7-13itl6-speakers.patch alsa-fireworks-fix-wrong-return-count-shorter-than-expected-by-4-bytes.patch diff --git a/queue-5.15/revert-parisc-fix-patch-code-locking-and-flushing.patch b/queue-5.15/revert-parisc-fix-patch-code-locking-and-flushing.patch deleted file mode 100644 index 9bcba6fb134..00000000000 --- a/queue-5.15/revert-parisc-fix-patch-code-locking-and-flushing.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 6c800d7f55fcd78e17deae5ae4374d8e73482c13 Mon Sep 17 00:00:00 2001 -From: Helge Deller -Date: Sun, 8 May 2022 10:18:40 +0200 -Subject: Revert "parisc: Fix patch code locking and flushing" - -From: Helge Deller - -commit 6c800d7f55fcd78e17deae5ae4374d8e73482c13 upstream. - -This reverts commit a9fe7fa7d874a536e0540469f314772c054a0323. - -Leads to segfaults on 32bit kernel. - -Signed-off-by: Helge Deller -Signed-off-by: Greg Kroah-Hartman ---- - arch/parisc/kernel/patch.c | 25 ++++++++++++++----------- - 1 file changed, 14 insertions(+), 11 deletions(-) - ---- a/arch/parisc/kernel/patch.c -+++ b/arch/parisc/kernel/patch.c -@@ -40,7 +40,10 @@ static void __kprobes *patch_map(void *a - - *need_unmap = 1; - set_fixmap(fixmap, page_to_phys(page)); -- raw_spin_lock_irqsave(&patch_lock, *flags); -+ if (flags) -+ raw_spin_lock_irqsave(&patch_lock, *flags); -+ else -+ __acquire(&patch_lock); - - return (void *) (__fix_to_virt(fixmap) + (uintaddr & ~PAGE_MASK)); - } -@@ -49,7 +52,10 @@ static void __kprobes patch_unmap(int fi - { - clear_fixmap(fixmap); - -- raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ if (flags) -+ raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ else -+ __release(&patch_lock); - } - - void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len) -@@ -61,9 +67,8 @@ void __kprobes __patch_text_multiple(voi - int mapped; - - /* Make sure we don't have any aliases in cache */ -- flush_kernel_dcache_range_asm(start, end); -- flush_kernel_icache_range_asm(start, end); -- flush_tlb_kernel_range(start, end); -+ flush_kernel_vmap_range(addr, len); -+ flush_icache_range(start, end); - - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, &mapped); - -@@ -76,10 +81,8 @@ void __kprobes __patch_text_multiple(voi - * We're crossing a page boundary, so - * need to remap - */ -- flush_kernel_dcache_range_asm((unsigned long)fixmap, -- (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, -- (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, -+ (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, -@@ -87,10 +90,10 @@ void __kprobes __patch_text_multiple(voi - } - } - -- flush_kernel_dcache_range_asm((unsigned long)fixmap, (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); -+ flush_icache_range(start, end); - } - - void __kprobes __patch_text(void *addr, u32 insn) diff --git a/queue-5.15/series b/queue-5.15/series index 9d4d5c319ce..47491a0a738 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -1,5 +1,4 @@ mips-fix-cp0-counter-erratum-detection-for-r4k-cpus.patch -revert-parisc-fix-patch-code-locking-and-flushing.patch parisc-merge-model-and-model-name-into-one-line-in-proc-cpuinfo.patch alsa-hda-realtek-add-quirk-for-yoga-duet-7-13itl6-speakers.patch alsa-fireworks-fix-wrong-return-count-shorter-than-expected-by-4-bytes.patch diff --git a/queue-5.17/revert-parisc-fix-patch-code-locking-and-flushing.patch b/queue-5.17/revert-parisc-fix-patch-code-locking-and-flushing.patch deleted file mode 100644 index 9bcba6fb134..00000000000 --- a/queue-5.17/revert-parisc-fix-patch-code-locking-and-flushing.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 6c800d7f55fcd78e17deae5ae4374d8e73482c13 Mon Sep 17 00:00:00 2001 -From: Helge Deller -Date: Sun, 8 May 2022 10:18:40 +0200 -Subject: Revert "parisc: Fix patch code locking and flushing" - -From: Helge Deller - -commit 6c800d7f55fcd78e17deae5ae4374d8e73482c13 upstream. - -This reverts commit a9fe7fa7d874a536e0540469f314772c054a0323. - -Leads to segfaults on 32bit kernel. - -Signed-off-by: Helge Deller -Signed-off-by: Greg Kroah-Hartman ---- - arch/parisc/kernel/patch.c | 25 ++++++++++++++----------- - 1 file changed, 14 insertions(+), 11 deletions(-) - ---- a/arch/parisc/kernel/patch.c -+++ b/arch/parisc/kernel/patch.c -@@ -40,7 +40,10 @@ static void __kprobes *patch_map(void *a - - *need_unmap = 1; - set_fixmap(fixmap, page_to_phys(page)); -- raw_spin_lock_irqsave(&patch_lock, *flags); -+ if (flags) -+ raw_spin_lock_irqsave(&patch_lock, *flags); -+ else -+ __acquire(&patch_lock); - - return (void *) (__fix_to_virt(fixmap) + (uintaddr & ~PAGE_MASK)); - } -@@ -49,7 +52,10 @@ static void __kprobes patch_unmap(int fi - { - clear_fixmap(fixmap); - -- raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ if (flags) -+ raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ else -+ __release(&patch_lock); - } - - void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len) -@@ -61,9 +67,8 @@ void __kprobes __patch_text_multiple(voi - int mapped; - - /* Make sure we don't have any aliases in cache */ -- flush_kernel_dcache_range_asm(start, end); -- flush_kernel_icache_range_asm(start, end); -- flush_tlb_kernel_range(start, end); -+ flush_kernel_vmap_range(addr, len); -+ flush_icache_range(start, end); - - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, &mapped); - -@@ -76,10 +81,8 @@ void __kprobes __patch_text_multiple(voi - * We're crossing a page boundary, so - * need to remap - */ -- flush_kernel_dcache_range_asm((unsigned long)fixmap, -- (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, -- (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, -+ (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, -@@ -87,10 +90,10 @@ void __kprobes __patch_text_multiple(voi - } - } - -- flush_kernel_dcache_range_asm((unsigned long)fixmap, (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); -+ flush_icache_range(start, end); - } - - void __kprobes __patch_text(void *addr, u32 insn) diff --git a/queue-5.17/series b/queue-5.17/series index 4fcccf3817d..8bbf482ee0e 100644 --- a/queue-5.17/series +++ b/queue-5.17/series @@ -2,7 +2,6 @@ pci_irq_vector-can-t-be-used-in-atomic-context-any-longer.-this-conflicts-with-t ipmi-when-handling-send-message-responses-don-t-process-the-message.patch ipmi-ipmi_ipmb-fix-null-ptr-deref-in-ipmi_unregister_smi.patch mips-fix-cp0-counter-erratum-detection-for-r4k-cpus.patch -revert-parisc-fix-patch-code-locking-and-flushing.patch revert-parisc-mark-cr16-cpu-clocksource-unstable-on-all-smp-machines.patch revert-parisc-mark-sched_clock-unstable-only-if-clocks-are-not-syncronized.patch parisc-merge-model-and-model-name-into-one-line-in-proc-cpuinfo.patch diff --git a/queue-5.4/revert-parisc-fix-patch-code-locking-and-flushing.patch b/queue-5.4/revert-parisc-fix-patch-code-locking-and-flushing.patch deleted file mode 100644 index 9bcba6fb134..00000000000 --- a/queue-5.4/revert-parisc-fix-patch-code-locking-and-flushing.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 6c800d7f55fcd78e17deae5ae4374d8e73482c13 Mon Sep 17 00:00:00 2001 -From: Helge Deller -Date: Sun, 8 May 2022 10:18:40 +0200 -Subject: Revert "parisc: Fix patch code locking and flushing" - -From: Helge Deller - -commit 6c800d7f55fcd78e17deae5ae4374d8e73482c13 upstream. - -This reverts commit a9fe7fa7d874a536e0540469f314772c054a0323. - -Leads to segfaults on 32bit kernel. - -Signed-off-by: Helge Deller -Signed-off-by: Greg Kroah-Hartman ---- - arch/parisc/kernel/patch.c | 25 ++++++++++++++----------- - 1 file changed, 14 insertions(+), 11 deletions(-) - ---- a/arch/parisc/kernel/patch.c -+++ b/arch/parisc/kernel/patch.c -@@ -40,7 +40,10 @@ static void __kprobes *patch_map(void *a - - *need_unmap = 1; - set_fixmap(fixmap, page_to_phys(page)); -- raw_spin_lock_irqsave(&patch_lock, *flags); -+ if (flags) -+ raw_spin_lock_irqsave(&patch_lock, *flags); -+ else -+ __acquire(&patch_lock); - - return (void *) (__fix_to_virt(fixmap) + (uintaddr & ~PAGE_MASK)); - } -@@ -49,7 +52,10 @@ static void __kprobes patch_unmap(int fi - { - clear_fixmap(fixmap); - -- raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ if (flags) -+ raw_spin_unlock_irqrestore(&patch_lock, *flags); -+ else -+ __release(&patch_lock); - } - - void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len) -@@ -61,9 +67,8 @@ void __kprobes __patch_text_multiple(voi - int mapped; - - /* Make sure we don't have any aliases in cache */ -- flush_kernel_dcache_range_asm(start, end); -- flush_kernel_icache_range_asm(start, end); -- flush_tlb_kernel_range(start, end); -+ flush_kernel_vmap_range(addr, len); -+ flush_icache_range(start, end); - - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, &mapped); - -@@ -76,10 +81,8 @@ void __kprobes __patch_text_multiple(voi - * We're crossing a page boundary, so - * need to remap - */ -- flush_kernel_dcache_range_asm((unsigned long)fixmap, -- (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, -- (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, -+ (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); - p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags, -@@ -87,10 +90,10 @@ void __kprobes __patch_text_multiple(voi - } - } - -- flush_kernel_dcache_range_asm((unsigned long)fixmap, (unsigned long)p); -- flush_tlb_kernel_range((unsigned long)fixmap, (unsigned long)p); -+ flush_kernel_vmap_range((void *)fixmap, (p-fixmap) * sizeof(*p)); - if (mapped) - patch_unmap(FIX_TEXT_POKE0, &flags); -+ flush_icache_range(start, end); - } - - void __kprobes __patch_text(void *addr, u32 insn) diff --git a/queue-5.4/series b/queue-5.4/series index e9dac8dd207..c95811ea833 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -1,5 +1,4 @@ mips-fix-cp0-counter-erratum-detection-for-r4k-cpus.patch -revert-parisc-fix-patch-code-locking-and-flushing.patch parisc-merge-model-and-model-name-into-one-line-in-proc-cpuinfo.patch alsa-fireworks-fix-wrong-return-count-shorter-than-expected-by-4-bytes.patch gpiolib-of-fix-bounds-check-for-gpio-reserved-ranges.patch