* [PATCH] vmlinux.lds.h: catch .bss..L* sections into BSS")
@ 2024-07-12 5:51 Christophe Leroy
2024-07-12 6:53 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2024-07-12 5:51 UTC (permalink / raw)
To: Arnd Bergmann, Alexander Lobakin, Nathan Chancellor, Kees Cook,
Thomas Bogendoerfer
Cc: linux-arch, kernel test robot, Peter Zijlstra, linux-kernel,
Christophe Leroy, linuxppc-dev
Commit 9a427556fb8e ("vmlinux.lds.h: catch compound literals into
data and BSS") added catches for .data..L* and .rodata..L* but missed
.bss..L*
Since commit 5431fdd2c181 ("ptrace: Convert ptrace_attach() to use
lock guards") the following appears at build:
LD .tmp_vmlinux.kallsyms1
powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
NM .tmp_vmlinux.kallsyms1.syms
KSYMS .tmp_vmlinux.kallsyms1.S
AS .tmp_vmlinux.kallsyms1.S
LD .tmp_vmlinux.kallsyms2
powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
NM .tmp_vmlinux.kallsyms2.syms
KSYMS .tmp_vmlinux.kallsyms2.S
AS .tmp_vmlinux.kallsyms2.S
LD vmlinux
powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
Lets add .bss..L* to BSS_MAIN macro to catch those sections into BSS.
Fixes: 9a427556fb8e ("vmlinux.lds.h: catch compound literals into data and BSS")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404031349.nmKhyuUG-lkp@intel.com/
---
include/asm-generic/vmlinux.lds.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 5703526d6ebf..70bf1004076b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -103,7 +103,7 @@
#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliteral* .data.$__unnamed_* .data.$L*
#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]*
#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* .rodata..L*
-#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..compoundliteral*
+#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..L* .bss..compoundliteral*
#define SBSS_MAIN .sbss .sbss.[0-9a-zA-Z_]*
#else
#define TEXT_MAIN .text
--
2.44.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] vmlinux.lds.h: catch .bss..L* sections into BSS")
2024-07-12 5:51 [PATCH] vmlinux.lds.h: catch .bss..L* sections into BSS") Christophe Leroy
@ 2024-07-12 6:53 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2024-07-12 6:53 UTC (permalink / raw)
To: Christophe Leroy, Alexander Lobakin, Nathan Chancellor, Kees Cook,
Thomas Bogendoerfer
Cc: Linux-Arch, Peter Zijlstra, linuxppc-dev, linux-kernel,
kernel test robot
On Fri, Jul 12, 2024, at 07:51, Christophe Leroy wrote:
> Commit 9a427556fb8e ("vmlinux.lds.h: catch compound literals into
> data and BSS") added catches for .data..L* and .rodata..L* but missed
> .bss..L*
>
> Since commit 5431fdd2c181 ("ptrace: Convert ptrace_attach() to use
> lock guards") the following appears at build:
>
> LD .tmp_vmlinux.kallsyms1
> powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from
> `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
> NM .tmp_vmlinux.kallsyms1.syms
> KSYMS .tmp_vmlinux.kallsyms1.S
> AS .tmp_vmlinux.kallsyms1.S
> LD .tmp_vmlinux.kallsyms2
> powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from
> `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
> NM .tmp_vmlinux.kallsyms2.syms
> KSYMS .tmp_vmlinux.kallsyms2.S
> AS .tmp_vmlinux.kallsyms2.S
> LD vmlinux
> powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from
> `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
>
> Lets add .bss..L* to BSS_MAIN macro to catch those sections into BSS.
>
> Fixes: 9a427556fb8e ("vmlinux.lds.h: catch compound literals into data
> and BSS")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes:
> https://lore.kernel.org/oe-kbuild-all/202404031349.nmKhyuUG-lkp@intel.com/
Applied to the asm-generic tree, thanks!
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-12 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 5:51 [PATCH] vmlinux.lds.h: catch .bss..L* sections into BSS") Christophe Leroy
2024-07-12 6:53 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).