linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390/boot: Use -D__DISABLE_EXPORTS
@ 2025-06-20 15:45 Petr Pavlu
  2025-06-23  9:25 ` Heiko Carstens
  2025-06-23 15:39 ` Alexander Gordeev
  0 siblings, 2 replies; 3+ messages in thread
From: Petr Pavlu @ 2025-06-20 15:45 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev
  Cc: Christian Borntraeger, Sven Schnelle, linux-s390, linux-kernel,
	Petr Pavlu

Files in the arch/s390/boot directory reuse logic from the rest of the
kernel by including certain C and assembly files from the kernel and lib
directories. Some of these included files contain EXPORT_SYMBOL directives.
For instance, arch/s390/boot/cmdline.c includes lib/cmdline.c, which
exports the get_option() function.

This inclusion triggers genksyms processing for the files in
arch/s390/boot, which is unnecessary and slows down the build.
Additionally, when KBUILD_SYMTYPES=1 is set, the generated symtypes data
contain exported symbols that are duplicated with the main kernel. This
duplication can confuse external kABI tools that process the symtypes data.

Address this issue by compiling the files in arch/s390/boot with
-D__DISABLE_EXPORTS.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
 arch/s390/boot/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile
index bee49626be4b..0986c7c67eaf 100644
--- a/arch/s390/boot/Makefile
+++ b/arch/s390/boot/Makefile
@@ -19,8 +19,8 @@ CC_FLAGS_MARCH_MINIMUM := -march=z10
 
 KBUILD_AFLAGS := $(filter-out $(CC_FLAGS_MARCH),$(KBUILD_AFLAGS_DECOMPRESSOR))
 KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_MARCH),$(KBUILD_CFLAGS_DECOMPRESSOR))
-KBUILD_AFLAGS += $(CC_FLAGS_MARCH_MINIMUM)
-KBUILD_CFLAGS += $(CC_FLAGS_MARCH_MINIMUM)
+KBUILD_AFLAGS += $(CC_FLAGS_MARCH_MINIMUM) -D__DISABLE_EXPORTS
+KBUILD_CFLAGS += $(CC_FLAGS_MARCH_MINIMUM) -D__DISABLE_EXPORTS
 
 CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char
 

base-commit: 75f5f23f8787c5e184fcb2fbcd02d8e9317dc5e7
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390/boot: Use -D__DISABLE_EXPORTS
  2025-06-20 15:45 [PATCH] s390/boot: Use -D__DISABLE_EXPORTS Petr Pavlu
@ 2025-06-23  9:25 ` Heiko Carstens
  2025-06-23 15:39 ` Alexander Gordeev
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2025-06-23  9:25 UTC (permalink / raw)
  To: Petr Pavlu
  Cc: Vasily Gorbik, Alexander Gordeev, Christian Borntraeger,
	Sven Schnelle, linux-s390, linux-kernel

On Fri, Jun 20, 2025 at 05:45:49PM +0200, Petr Pavlu wrote:
> Files in the arch/s390/boot directory reuse logic from the rest of the
> kernel by including certain C and assembly files from the kernel and lib
> directories. Some of these included files contain EXPORT_SYMBOL directives.
> For instance, arch/s390/boot/cmdline.c includes lib/cmdline.c, which
> exports the get_option() function.
> 
> This inclusion triggers genksyms processing for the files in
> arch/s390/boot, which is unnecessary and slows down the build.
> Additionally, when KBUILD_SYMTYPES=1 is set, the generated symtypes data
> contain exported symbols that are duplicated with the main kernel. This
> duplication can confuse external kABI tools that process the symtypes data.
> 
> Address this issue by compiling the files in arch/s390/boot with
> -D__DISABLE_EXPORTS.
> 
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
> ---
>  arch/s390/boot/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390/boot: Use -D__DISABLE_EXPORTS
  2025-06-20 15:45 [PATCH] s390/boot: Use -D__DISABLE_EXPORTS Petr Pavlu
  2025-06-23  9:25 ` Heiko Carstens
@ 2025-06-23 15:39 ` Alexander Gordeev
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Gordeev @ 2025-06-23 15:39 UTC (permalink / raw)
  To: Petr Pavlu
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	Sven Schnelle, linux-s390, linux-kernel

On Fri, Jun 20, 2025 at 05:45:49PM +0200, Petr Pavlu wrote:
> Files in the arch/s390/boot directory reuse logic from the rest of the
> kernel by including certain C and assembly files from the kernel and lib
> directories. Some of these included files contain EXPORT_SYMBOL directives.
> For instance, arch/s390/boot/cmdline.c includes lib/cmdline.c, which
> exports the get_option() function.
> 
> This inclusion triggers genksyms processing for the files in
> arch/s390/boot, which is unnecessary and slows down the build.
> Additionally, when KBUILD_SYMTYPES=1 is set, the generated symtypes data
> contain exported symbols that are duplicated with the main kernel. This
> duplication can confuse external kABI tools that process the symtypes data.
> 
> Address this issue by compiling the files in arch/s390/boot with
> -D__DISABLE_EXPORTS.
> 
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
> ---
>  arch/s390/boot/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-23 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-20 15:45 [PATCH] s390/boot: Use -D__DISABLE_EXPORTS Petr Pavlu
2025-06-23  9:25 ` Heiko Carstens
2025-06-23 15:39 ` Alexander Gordeev

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).