From d8c32853ebc4f3a49f1658ddfe0a9a42e19fc658 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Tue, 21 Feb 2023 21:19:52 +1100 Subject: powerpc: Drop orphaned VAS MAINTAINERS entry The MAINTAINERS entry for VAS (Virtual Accelerator Switchboard) no longer has any maintainers, it just points to linuxppc-dev, since commit 60496069d0ae ("powerpc: Update MAINTAINERS for ibmvnic and VAS"). So just drop the VAS entry, all the paths are already covered by the main powerpc entry, ie. the output of get_maintainer.pl is unchanged. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230221101952.2697101-1-mpe@ellerman.id.au --- MAINTAINERS | 7 ------- 1 file changed, 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 324a857e0784..bc24b2e8f088 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9789,13 +9789,6 @@ L: netdev@vger.kernel.org S: Supported F: drivers/net/ethernet/ibm/ibmvnic.* -IBM Power Virtual Accelerator Switchboard -L: linuxppc-dev@lists.ozlabs.org -S: Supported -F: arch/powerpc/include/asm/vas.h -F: arch/powerpc/platforms/powernv/copy-paste.h -F: arch/powerpc/platforms/powernv/vas* - IBM Power Virtual Ethernet Device Driver M: Nick Child L: netdev@vger.kernel.org -- cgit v1.2.3 From acd35dbab871d61021284ff06daccdc0ebb51e61 Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 22 Feb 2023 17:00:37 +1100 Subject: powerpc/vmlinux.lds: Add .text.asan/tsan sections When KASAN/KCSAN are enabled clang generates .text.asan/tsan sections. Because they are not mentioned in the linker script warnings are generated, and when orphan handling is set to error that becomes a build error, eg: ld.lld: error: vmlinux.a(init/main.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor' ld.lld: error: vmlinux.a(init/version.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor' Fix it by adding the sections to our linker script, similar to the generic change made in 848378812e40 ("vmlinux.lds.h: Handle clang's module.{c,d}tor sections"). Reviewed-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230222060037.2897169-1-mpe@ellerman.id.au --- arch/powerpc/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index f128c7cf9c1d..ee86753e444e 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -124,6 +124,7 @@ SECTIONS * included with the main text sections, so put it by itself. */ *(.sfpr); + *(.text.asan.* .text.tsan.*) MEM_KEEP(init.text) MEM_KEEP(exit.text) } :text -- cgit v1.2.3 From f8b2336f15f3bc30e37ce5c052cde5b6319bb6df Mon Sep 17 00:00:00 2001 From: Michael Ellerman Date: Wed, 22 Feb 2023 00:03:31 +1100 Subject: powerpc: Avoid dead code/data elimination when using recordmcount Although powerpc now has objtool mcount support, it's not enabled in all configurations due to dependencies. On those configurations, with some linkers (binutils 2.37 at least), it's still possible to hit the dreaded "recordmcount bug", eg. errors such as: CC kernel/kexec_file.o Cannot find symbol for section 10: .text.unlikely. kernel/kexec_file.o: failed make[1]: *** [scripts/Makefile.build:287 : kernel/kexec_file.o] Error 1 Those errors are much more prevalent when building with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION, because it places every function in a separate section. CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is marked experimental and is not enabled in any powerpc defconfigs or by major distros. Although it does have at least some users on 32-bit where kernel size tends to be more important. Avoid the build errors by blocking CONFIG_LD_DEAD_CODE_DATA_ELIMINATION when the build is using recordmcount, rather than objtool. In practice that means for 64-bit big endian builds, or 64-bit clang builds - both because they lack CONFIG_MPROFILE_KERNEL. On 32-bit objtool is always used, so CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is still available there. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230221130331.2714199-1-mpe@ellerman.id.au --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2c9cdf1d8761..a6c4407d3ec8 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -236,7 +236,7 @@ config PPC select HAVE_KPROBES select HAVE_KPROBES_ON_FTRACE select HAVE_KRETPROBES - select HAVE_LD_DEAD_CODE_DATA_ELIMINATION + select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if HAVE_OBJTOOL_MCOUNT select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS select HAVE_MOD_ARCH_SPECIFIC select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S) -- cgit v1.2.3