From: Greg Kroah-Hartman Date: Tue, 17 Jan 2023 09:37:52 +0000 (+0100) Subject: drop some broken 4.19 and 5.4 patches X-Git-Tag: v4.14.303~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=caa0bfa0216d88a8688ed50597ae4f7b072af4bc;p=thirdparty%2Fkernel%2Fstable-queue.git drop some broken 4.19 and 5.4 patches --- diff --git a/queue-4.19/perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch b/queue-4.19/perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch deleted file mode 100644 index 1f8e989dc74..00000000000 --- a/queue-4.19/perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 73755a7d233fcdf2d35ea943bb23f3e761fffbbd Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 20 Dec 2022 11:57:00 +0800 -Subject: perf debug: Set debug_peo_args and redirect_to_stderr variable to - correct values in perf_quiet_option() - -From: Yang Jihong - -[ Upstream commit 188ac720d364035008a54d249cf47b4cc100f819 ] - -When perf uses quiet mode, perf_quiet_option() sets the 'debug_peo_args' -variable to -1, and display_attr() incorrectly determines the value of -'debug_peo_args'. As a result, unexpected information is displayed. - -Before: - - # perf record --quiet -- ls > /dev/null - ------------------------------------------------------------ - perf_event_attr: - size 128 - { sample_period, sample_freq } 4000 - sample_type IP|TID|TIME|PERIOD - read_format ID|LOST - disabled 1 - inherit 1 - mmap 1 - comm 1 - freq 1 - enable_on_exec 1 - task 1 - precise_ip 3 - sample_id_all 1 - exclude_guest 1 - mmap2 1 - comm_exec 1 - ksymbol 1 - bpf_event 1 - ------------------------------------------------------------ - ... - -After: - # perf record --quiet -- ls > /dev/null - # - -redirect_to_stderr is a similar problem. - -Fixes: f78eaef0e0493f60 ("perf tools: Allow to force redirect pr_debug to stderr.") -Fixes: ccd26741f5e6bdf2 ("perf tool: Provide an option to print perf_event_open args and return value") -Suggested-by: Adrian Hunter -Reviewed-by: Adrian Hunter -Signed-off-by: Yang Jihong -Cc: Alexander Shishkin -Cc: Andi Kleen -Cc: Carsten Haitzler -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Leo Yan -Cc: Mark Rutland -Cc: martin.lau@kernel.org -Cc: Masami Hiramatsu -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Ravi Bangoria -Cc: Ravi Bangoria -Link: https://lore.kernel.org/r/20221220035702.188413-2-yangjihong1@huawei.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/debug.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c -index 3d6459626c2a..9f9875ba2edf 100644 ---- a/tools/perf/util/debug.c -+++ b/tools/perf/util/debug.c -@@ -232,6 +232,10 @@ int perf_quiet_option(void) - var++; - } - -+ /* For debug variables that are used as bool types, set to 0. */ -+ redirect_to_stderr = 0; -+ debug_peo_args = 0; -+ - return 0; - } - --- -2.35.1 - diff --git a/queue-4.19/riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch b/queue-4.19/riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch deleted file mode 100644 index 20041f65562..00000000000 --- a/queue-4.19/riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 25e0560ab7e86c2b9ddd753f22b26fdb0f928ccf Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 11 Jan 2021 20:40:14 +0800 -Subject: riscv/stacktrace: Fix stack output without ra on the stack top - -From: Chen Huang - -[ Upstream commit f766f77a74f5784d8d4d3c36b1900731f97d08d0 ] - -When a function doesn't have a callee, then it will not -push ra into the stack, such as lkdtm_BUG() function, - -addi sp,sp,-16 -sd s0,8(sp) -addi s0,sp,16 -ebreak - -The struct stackframe use {fp,ra} to get information from -stack, if walk_stackframe() with pr_regs, we will obtain -wrong value and bad stacktrace, - -[] lkdtm_BUG+0x6/0x8 ----[ end trace 18da3fbdf08e25d5 ]--- - -Correct the next fp and pc, after that, full stacktrace -shown as expects, - -[] lkdtm_BUG+0x6/0x8 -[] lkdtm_do_action+0x14/0x1c -[] direct_entry+0xc0/0x10a -[] full_proxy_write+0x42/0x6a -[] vfs_write+0x7e/0x214 -[] ksys_write+0x98/0xc0 -[] sys_write+0xe/0x16 -[] ret_from_syscall+0x0/0x2 ----[ end trace 61917f3d9a9fadcd ]--- - -Signed-off-by: Chen Huang -Signed-off-by: Kefeng Wang -Signed-off-by: Palmer Dabbelt -Stable-dep-of: 5c3022e4a616 ("riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument") -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/stacktrace.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c -index 39cd3cf9f06b..3d1e184e39e9 100644 ---- a/arch/riscv/kernel/stacktrace.c -+++ b/arch/riscv/kernel/stacktrace.c -@@ -63,9 +63,15 @@ static void notrace walk_stackframe(struct task_struct *task, - /* Unwind stack frame */ - frame = (struct stackframe *)fp - 1; - sp = fp; -- fp = frame->fp; -- pc = ftrace_graph_ret_addr(current, NULL, frame->ra, -- (unsigned long *)(fp - 8)); -+ if (regs && (regs->epc == pc) && (frame->fp & 0x7)) { -+ fp = frame->ra; -+ pc = regs->ra; -+ } else { -+ fp = frame->fp; -+ pc = ftrace_graph_ret_addr(current, NULL, frame->ra, -+ (unsigned long *)(fp - 8)); -+ } -+ - } - } - --- -2.35.1 - diff --git a/queue-4.19/riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch b/queue-4.19/riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch deleted file mode 100644 index 12152b1dc47..00000000000 --- a/queue-4.19/riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 72dea6c020220e8f4916d698293730b8f3dc8b27 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 9 Nov 2022 01:49:36 -0500 -Subject: riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument - -From: Guo Ren - -[ Upstream commit 5c3022e4a616d800cf5f4c3a981d7992179e44a1 ] - -The 'retp' is a pointer to the return address on the stack, so we -must pass the current return address pointer as the 'retp' -argument to ftrace_push_return_trace(). Not parent function's -return address on the stack. - -Fixes: b785ec129bd9 ("riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support") -Signed-off-by: Guo Ren -Signed-off-by: Guo Ren -Link: https://lore.kernel.org/r/20221109064937.3643993-2-guoren@kernel.org -Cc: stable@vger.kernel.org -Signed-off-by: Palmer Dabbelt -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/stacktrace.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c -index 3d1e184e39e9..75ed5b5b1f9b 100644 ---- a/arch/riscv/kernel/stacktrace.c -+++ b/arch/riscv/kernel/stacktrace.c -@@ -69,7 +69,7 @@ static void notrace walk_stackframe(struct task_struct *task, - } else { - fp = frame->fp; - pc = ftrace_graph_ret_addr(current, NULL, frame->ra, -- (unsigned long *)(fp - 8)); -+ &frame->ra); - } - - } --- -2.35.1 - diff --git a/queue-4.19/series b/queue-4.19/series index 717deffb915..30538b87956 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -349,7 +349,6 @@ asoc-wm8994-fix-potential-deadlock.patch asoc-rockchip-spdif-add-missing-clk_disable_unprepar.patch asoc-rt5670-remove-unbalanced-pm_runtime_put.patch pstore-switch-pmsg_lock-to-an-rt_mutex-to-avoid-prio.patch -perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch pstore-make-sure-config_pstore_pmsg-selects-config_r.patch usb-dwc3-core-defer-probe-on-ulpi_read_id-timeout.patch hid-wacom-ensure-bootloader-pid-is-usable-in-hidraw-mode.patch @@ -424,8 +423,6 @@ perf-probe-use-dwarf_attr_integrate-as-generic-dwarf.patch perf-probe-fix-to-get-the-dw_at_decl_file-and-dw_at_.patch ravb-fix-failed-to-switch-device-to-config-mode-mess.patch riscv-remove-unreachable-have_function_graph_ret_add.patch -riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch -riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch driver-core-set-deferred_probe_timeout-to-a-longer-d.patch ext4-goto-right-label-failed_mount3a.patch ext4-correct-inconsistent-error-msg-in-nojournal-mod.patch diff --git a/queue-5.4/perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch b/queue-5.4/perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch deleted file mode 100644 index 353794b3d58..00000000000 --- a/queue-5.4/perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 89c993022aa6a6726562fff7cb6f6bb78acd2520 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 20 Dec 2022 11:57:00 +0800 -Subject: perf debug: Set debug_peo_args and redirect_to_stderr variable to - correct values in perf_quiet_option() - -From: Yang Jihong - -[ Upstream commit 188ac720d364035008a54d249cf47b4cc100f819 ] - -When perf uses quiet mode, perf_quiet_option() sets the 'debug_peo_args' -variable to -1, and display_attr() incorrectly determines the value of -'debug_peo_args'. As a result, unexpected information is displayed. - -Before: - - # perf record --quiet -- ls > /dev/null - ------------------------------------------------------------ - perf_event_attr: - size 128 - { sample_period, sample_freq } 4000 - sample_type IP|TID|TIME|PERIOD - read_format ID|LOST - disabled 1 - inherit 1 - mmap 1 - comm 1 - freq 1 - enable_on_exec 1 - task 1 - precise_ip 3 - sample_id_all 1 - exclude_guest 1 - mmap2 1 - comm_exec 1 - ksymbol 1 - bpf_event 1 - ------------------------------------------------------------ - ... - -After: - # perf record --quiet -- ls > /dev/null - # - -redirect_to_stderr is a similar problem. - -Fixes: f78eaef0e0493f60 ("perf tools: Allow to force redirect pr_debug to stderr.") -Fixes: ccd26741f5e6bdf2 ("perf tool: Provide an option to print perf_event_open args and return value") -Suggested-by: Adrian Hunter -Reviewed-by: Adrian Hunter -Signed-off-by: Yang Jihong -Cc: Alexander Shishkin -Cc: Andi Kleen -Cc: Carsten Haitzler -Cc: Ian Rogers -Cc: Ingo Molnar -Cc: Jiri Olsa -Cc: Leo Yan -Cc: Mark Rutland -Cc: martin.lau@kernel.org -Cc: Masami Hiramatsu -Cc: Namhyung Kim -Cc: Peter Zijlstra -Cc: Ravi Bangoria -Cc: Ravi Bangoria -Link: https://lore.kernel.org/r/20221220035702.188413-2-yangjihong1@huawei.com -Signed-off-by: Arnaldo Carvalho de Melo -Signed-off-by: Sasha Levin ---- - tools/perf/util/debug.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c -index 682146d04379..112cb85f6086 100644 ---- a/tools/perf/util/debug.c -+++ b/tools/perf/util/debug.c -@@ -232,6 +232,10 @@ int perf_quiet_option(void) - var++; - } - -+ /* For debug variables that are used as bool types, set to 0. */ -+ redirect_to_stderr = 0; -+ debug_peo_args = 0; -+ - return 0; - } - --- -2.35.1 - diff --git a/queue-5.4/riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch b/queue-5.4/riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch deleted file mode 100644 index 966c534d6f7..00000000000 --- a/queue-5.4/riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch +++ /dev/null @@ -1,72 +0,0 @@ -From e92954d051587a06c852db0cb6f3173e9f9f651e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 11 Jan 2021 20:40:14 +0800 -Subject: riscv/stacktrace: Fix stack output without ra on the stack top - -From: Chen Huang - -[ Upstream commit f766f77a74f5784d8d4d3c36b1900731f97d08d0 ] - -When a function doesn't have a callee, then it will not -push ra into the stack, such as lkdtm_BUG() function, - -addi sp,sp,-16 -sd s0,8(sp) -addi s0,sp,16 -ebreak - -The struct stackframe use {fp,ra} to get information from -stack, if walk_stackframe() with pr_regs, we will obtain -wrong value and bad stacktrace, - -[] lkdtm_BUG+0x6/0x8 ----[ end trace 18da3fbdf08e25d5 ]--- - -Correct the next fp and pc, after that, full stacktrace -shown as expects, - -[] lkdtm_BUG+0x6/0x8 -[] lkdtm_do_action+0x14/0x1c -[] direct_entry+0xc0/0x10a -[] full_proxy_write+0x42/0x6a -[] vfs_write+0x7e/0x214 -[] ksys_write+0x98/0xc0 -[] sys_write+0xe/0x16 -[] ret_from_syscall+0x0/0x2 ----[ end trace 61917f3d9a9fadcd ]--- - -Signed-off-by: Chen Huang -Signed-off-by: Kefeng Wang -Signed-off-by: Palmer Dabbelt -Stable-dep-of: 5c3022e4a616 ("riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument") -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/stacktrace.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c -index 19e46f4160cc..1a512a24879e 100644 ---- a/arch/riscv/kernel/stacktrace.c -+++ b/arch/riscv/kernel/stacktrace.c -@@ -55,9 +55,15 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, - /* Unwind stack frame */ - frame = (struct stackframe *)fp - 1; - sp = fp; -- fp = frame->fp; -- pc = ftrace_graph_ret_addr(current, NULL, frame->ra, -- (unsigned long *)(fp - 8)); -+ if (regs && (regs->epc == pc) && (frame->fp & 0x7)) { -+ fp = frame->ra; -+ pc = regs->ra; -+ } else { -+ fp = frame->fp; -+ pc = ftrace_graph_ret_addr(current, NULL, frame->ra, -+ (unsigned long *)(fp - 8)); -+ } -+ - } - } - --- -2.35.1 - diff --git a/queue-5.4/riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch b/queue-5.4/riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch deleted file mode 100644 index 43f712c7231..00000000000 --- a/queue-5.4/riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch +++ /dev/null @@ -1,41 +0,0 @@ -From eacfe5acf0bf82c6079fc7250a2c8731b481e7a6 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 9 Nov 2022 01:49:36 -0500 -Subject: riscv: stacktrace: Fixup ftrace_graph_ret_addr retp argument - -From: Guo Ren - -[ Upstream commit 5c3022e4a616d800cf5f4c3a981d7992179e44a1 ] - -The 'retp' is a pointer to the return address on the stack, so we -must pass the current return address pointer as the 'retp' -argument to ftrace_push_return_trace(). Not parent function's -return address on the stack. - -Fixes: b785ec129bd9 ("riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support") -Signed-off-by: Guo Ren -Signed-off-by: Guo Ren -Link: https://lore.kernel.org/r/20221109064937.3643993-2-guoren@kernel.org -Cc: stable@vger.kernel.org -Signed-off-by: Palmer Dabbelt -Signed-off-by: Sasha Levin ---- - arch/riscv/kernel/stacktrace.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c -index 1a512a24879e..a1ee7f33c205 100644 ---- a/arch/riscv/kernel/stacktrace.c -+++ b/arch/riscv/kernel/stacktrace.c -@@ -61,7 +61,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, - } else { - fp = frame->fp; - pc = ftrace_graph_ret_addr(current, NULL, frame->ra, -- (unsigned long *)(fp - 8)); -+ &frame->ra); - } - - } --- -2.35.1 - diff --git a/queue-5.4/series b/queue-5.4/series index 9b4ca519583..ba829e835ec 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -436,7 +436,6 @@ asoc-wm8994-fix-potential-deadlock.patch asoc-rockchip-spdif-add-missing-clk_disable_unprepar.patch asoc-rt5670-remove-unbalanced-pm_runtime_put.patch pstore-switch-pmsg_lock-to-an-rt_mutex-to-avoid-prio.patch -perf-debug-set-debug_peo_args-and-redirect_to_stderr.patch pstore-make-sure-config_pstore_pmsg-selects-config_r.patch alsa-hda-realtek-add-quirk-for-lenovo-tianyi510pro-14iob.patch alsa-hda-hdmi-add-hp-device-0x8711-to-force-connect-list.patch @@ -548,8 +547,6 @@ kvm-vmx-rename-nmi_pending-to-nmi_window.patch kvm-vmx-fix-the-spelling-of-cpu_based_use_tsc_offset.patch kvm-nvmx-properly-expose-enable_usr_wait_pause-contr.patch ravb-fix-failed-to-switch-device-to-config-mode-mess.patch -riscv-stacktrace-fix-stack-output-without-ra-on-the-.patch -riscv-stacktrace-fixup-ftrace_graph_ret_addr-retp-ar.patch ext4-goto-right-label-failed_mount3a.patch ext4-correct-inconsistent-error-msg-in-nojournal-mod.patch mm-highmem-lift-memcpy_-to-from-_page-to-core.patch