From: Greg Kroah-Hartman Date: Tue, 29 Apr 2025 15:22:13 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v5.4.293~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2dd20e6f63098677b1d3c3c6931cdc5f3f1c91f;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: mips-cm-fix-warning-if-mips_cm-is-disabled.patch nvme-fixup-scan-failure-for-non-ana-multipath-controllers.patch objtool-ignore-end-of-section-jumps-for-kcov-gcov.patch objtool-silence-more-kcov-warnings-part-2.patch --- diff --git a/queue-6.6/mips-cm-fix-warning-if-mips_cm-is-disabled.patch b/queue-6.6/mips-cm-fix-warning-if-mips_cm-is-disabled.patch new file mode 100644 index 0000000000..272bbfb37c --- /dev/null +++ b/queue-6.6/mips-cm-fix-warning-if-mips_cm-is-disabled.patch @@ -0,0 +1,38 @@ +From b73c3ccdca95c237750c981054997c71d33e09d7 Mon Sep 17 00:00:00 2001 +From: Thomas Bogendoerfer +Date: Fri, 28 Feb 2025 15:37:02 +0100 +Subject: MIPS: cm: Fix warning if MIPS_CM is disabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Thomas Bogendoerfer + +commit b73c3ccdca95c237750c981054997c71d33e09d7 upstream. + +Commit e27fbe16af5c ("MIPS: cm: Detect CM quirks from device tree") +introduced + +arch/mips/include/asm/mips-cm.h:119:13: error: ‘mips_cm_update_property’ + defined but not used [-Werror=unused-function] + +Fix this by making empty function implementation inline + +Fixes: e27fbe16af5c ("MIPS: cm: Detect CM quirks from device tree") +Signed-off-by: Thomas Bogendoerfer +Signed-off-by: Greg Kroah-Hartman +--- + arch/mips/include/asm/mips-cm.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/mips/include/asm/mips-cm.h ++++ b/arch/mips/include/asm/mips-cm.h +@@ -104,7 +104,7 @@ static inline bool mips_cm_present(void) + #ifdef CONFIG_MIPS_CM + extern void mips_cm_update_property(void); + #else +-static void mips_cm_update_property(void) {} ++static inline void mips_cm_update_property(void) {} + #endif + + /** diff --git a/queue-6.6/nvme-fixup-scan-failure-for-non-ana-multipath-controllers.patch b/queue-6.6/nvme-fixup-scan-failure-for-non-ana-multipath-controllers.patch new file mode 100644 index 0000000000..0c82d2b70a --- /dev/null +++ b/queue-6.6/nvme-fixup-scan-failure-for-non-ana-multipath-controllers.patch @@ -0,0 +1,36 @@ +From 26d7fb4fd4ca1180e2fa96587dea544563b4962a Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Mon, 14 Apr 2025 14:05:09 +0200 +Subject: nvme: fixup scan failure for non-ANA multipath controllers + +From: Hannes Reinecke + +commit 26d7fb4fd4ca1180e2fa96587dea544563b4962a upstream. + +Commit 62baf70c3274 caused the ANA log page to be re-read, even on +controllers that do not support ANA. While this should generally +harmless, some controllers hang on the unsupported log page and +never finish probing. + +Fixes: 62baf70c3274 ("nvme: re-read ANA log page after ns scan completes") +Signed-off-by: Hannes Reinecke +Tested-by: Srikanth Aithal +[hch: more detailed commit message] +Signed-off-by: Christoph Hellwig +Reviewed-by: Sagi Grimberg +Signed-off-by: Greg Kroah-Hartman +--- + drivers/nvme/host/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvme/host/core.c ++++ b/drivers/nvme/host/core.c +@@ -3977,7 +3977,7 @@ static void nvme_scan_work(struct work_s + if (test_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events)) + nvme_queue_scan(ctrl); + #ifdef CONFIG_NVME_MULTIPATH +- else ++ else if (ctrl->ana_log_buf) + /* Re-read the ANA log page to not miss updates */ + queue_work(nvme_wq, &ctrl->ana_work); + #endif diff --git a/queue-6.6/objtool-ignore-end-of-section-jumps-for-kcov-gcov.patch b/queue-6.6/objtool-ignore-end-of-section-jumps-for-kcov-gcov.patch new file mode 100644 index 0000000000..520c17dbb9 --- /dev/null +++ b/queue-6.6/objtool-ignore-end-of-section-jumps-for-kcov-gcov.patch @@ -0,0 +1,102 @@ +From 0d7597749f5a3ac67851d3836635d084df15fb66 Mon Sep 17 00:00:00 2001 +From: Josh Poimboeuf +Date: Mon, 31 Mar 2025 21:26:37 -0700 +Subject: objtool: Ignore end-of-section jumps for KCOV/GCOV + +From: Josh Poimboeuf + +commit 0d7597749f5a3ac67851d3836635d084df15fb66 upstream. + +When KCOV or GCOV is enabled, dead code can be left behind, in which +case objtool silences unreachable and undefined behavior (fallthrough) +warnings. + +Fallthrough warnings, and their variant "end of section" warnings, were +silenced with the following commit: + + 6b023c784204 ("objtool: Silence more KCOV warnings") + +Another variant of a fallthrough warning is a jump to the end of a +function. If that function happens to be at the end of a section, the +jump destination doesn't actually exist. + +Normally that would be a fatal objtool error, but for KCOV/GCOV it's +just another undefined behavior fallthrough. Silence it like the +others. + +Fixes the following warning: + + drivers/iommu/dma-iommu.o: warning: objtool: iommu_dma_sw_msi+0x92: can't find jump dest instruction at .text+0x54d5 + +Fixes: 6b023c784204 ("objtool: Silence more KCOV warnings") +Reported-by: Randy Dunlap +Signed-off-by: Josh Poimboeuf +Signed-off-by: Ingo Molnar +Cc: Linus Torvalds +Link: https://lore.kernel.org/r/08fbe7d7e1e20612206f1df253077b94f178d93e.1743481539.git.jpoimboe@kernel.org +Closes: https://lore.kernel.org/314f8809-cd59-479b-97d7-49356bf1c8d1@infradead.org/ +Signed-off-by: Greg Kroah-Hartman +--- + tools/objtool/check.c | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +--- a/tools/objtool/check.c ++++ b/tools/objtool/check.c +@@ -1552,6 +1552,8 @@ static int add_jump_destinations(struct + unsigned long dest_off; + + for_each_insn(file, insn) { ++ struct symbol *func = insn_func(insn); ++ + if (insn->jump_dest) { + /* + * handle_group_alt() may have previously set +@@ -1575,7 +1577,7 @@ static int add_jump_destinations(struct + } else if (reloc->sym->return_thunk) { + add_return_call(file, insn, true); + continue; +- } else if (insn_func(insn)) { ++ } else if (func) { + /* + * External sibling call or internal sibling call with + * STT_FUNC reloc. +@@ -1608,6 +1610,15 @@ static int add_jump_destinations(struct + continue; + } + ++ /* ++ * GCOV/KCOV dead code can jump to the end of the ++ * function/section. ++ */ ++ if (file->ignore_unreachables && func && ++ dest_sec == insn->sec && ++ dest_off == func->offset + func->len) ++ continue; ++ + WARN_INSN(insn, "can't find jump dest instruction at %s+0x%lx", + dest_sec->name, dest_off); + return -1; +@@ -1616,8 +1627,7 @@ static int add_jump_destinations(struct + /* + * Cross-function jump. + */ +- if (insn_func(insn) && insn_func(jump_dest) && +- insn_func(insn) != insn_func(jump_dest)) { ++ if (func && insn_func(jump_dest) && func != insn_func(jump_dest)) { + + /* + * For GCC 8+, create parent/child links for any cold +@@ -1634,10 +1644,10 @@ static int add_jump_destinations(struct + * case where the parent function's only reference to a + * subfunction is through a jump table. + */ +- if (!strstr(insn_func(insn)->name, ".cold") && ++ if (!strstr(func->name, ".cold") && + strstr(insn_func(jump_dest)->name, ".cold")) { +- insn_func(insn)->cfunc = insn_func(jump_dest); +- insn_func(jump_dest)->pfunc = insn_func(insn); ++ func->cfunc = insn_func(jump_dest); ++ insn_func(jump_dest)->pfunc = func; + } + } + diff --git a/queue-6.6/objtool-silence-more-kcov-warnings-part-2.patch b/queue-6.6/objtool-silence-more-kcov-warnings-part-2.patch new file mode 100644 index 0000000000..8f71766a0c --- /dev/null +++ b/queue-6.6/objtool-silence-more-kcov-warnings-part-2.patch @@ -0,0 +1,46 @@ +From 55c78035a1a8dfb05f1472018ce2a651701adb7d Mon Sep 17 00:00:00 2001 +From: Josh Poimboeuf +Date: Mon, 31 Mar 2025 21:26:36 -0700 +Subject: objtool: Silence more KCOV warnings, part 2 + +From: Josh Poimboeuf + +commit 55c78035a1a8dfb05f1472018ce2a651701adb7d upstream. + +Similar to GCOV, KCOV can leave behind dead code and undefined behavior. +Warnings related to those should be ignored. + +The previous commit: + + 6b023c784204 ("objtool: Silence more KCOV warnings") + +... only did so for CONFIG_CGOV_KERNEL. Also do it for CONFIG_KCOV, but +for real this time. + +Fixes the following warning: + + vmlinux.o: warning: objtool: synaptics_report_mt_data: unexpected end of section .text.synaptics_report_mt_data + +Fixes: 6b023c784204 ("objtool: Silence more KCOV warnings") +Reported-by: kernel test robot +Signed-off-by: Josh Poimboeuf +Signed-off-by: Ingo Molnar +Cc: Linus Torvalds +Link: https://lore.kernel.org/r/a44ba16e194bcbc52c1cef3d3cd9051a62622723.1743481539.git.jpoimboe@kernel.org +Closes: https://lore.kernel.org/oe-kbuild-all/202503282236.UhfRsF3B-lkp@intel.com/ +Signed-off-by: Greg Kroah-Hartman +--- + scripts/Makefile.lib | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/Makefile.lib ++++ b/scripts/Makefile.lib +@@ -268,7 +268,7 @@ objtool-args-$(CONFIG_SLS) += --sls + objtool-args-$(CONFIG_STACK_VALIDATION) += --stackval + objtool-args-$(CONFIG_HAVE_STATIC_CALL_INLINE) += --static-call + objtool-args-$(CONFIG_HAVE_UACCESS_VALIDATION) += --uaccess +-objtool-args-$(CONFIG_GCOV_KERNEL) += --no-unreachable ++objtool-args-$(or $(CONFIG_GCOV_KERNEL),$(CONFIG_KCOV)) += --no-unreachable + objtool-args-$(CONFIG_PREFIX_SYMBOLS) += --prefix=$(CONFIG_FUNCTION_PADDING_BYTES) + + objtool-args = $(objtool-args-y) \ diff --git a/queue-6.6/series b/queue-6.6/series index d55d134480..2c08e1cb36 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -198,3 +198,7 @@ net-dsa-mv88e6xxx-enable-pvt-for-6321-switch.patch net-dsa-mv88e6xxx-enable-.port_set_policy-for-6320-family.patch net-dsa-mv88e6xxx-enable-stu-methods-for-6320-family.patch iommu-handle-race-with-default-domain-setup.patch +mips-cm-fix-warning-if-mips_cm-is-disabled.patch +nvme-fixup-scan-failure-for-non-ana-multipath-controllers.patch +objtool-ignore-end-of-section-jumps-for-kcov-gcov.patch +objtool-silence-more-kcov-warnings-part-2.patch