Skip to contentSkip to conversation

disallow modular binfmt_elf32

PATCH In review Christoph Hellwig 4 participants 4 messages Jul 8, 2006 – Jul 10, 2006 s390

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 disallow modular binfmt_elf32

Currently most architectures either always build binfmt_elf32 in the kernel image or make it a boolean option. Only sparc64 and s390 allow to build it modularly. This patch turns the option into a boolean aswell because elf requires various symbols that shouldn't be available to modules. The most urgent one is tasklist_lock whos export this patch series kills, but there are others like force_sgi aswell.

Note that sparc doesn't allow a modular 32bit a.out handler either, and that would be the more useful case as only few people want 32bit sunos compatibility and 99.9% of all sparc64 users need 32bit linux native elf support.

arch/s390/Kconfig +1 -1
Index: linux-2.6/arch/s390/Kconfig
===================================================================
@@ -119,7 +119,7 @@
 	default y
 
 config BINFMT_ELF32
-	tristate "Kernel support for 31 bit ELF binaries"
+	bool "Kernel support for 31 bit ELF binaries"
 	depends on COMPAT
 	help
 	  This allows you to run 32-bit Linux/ELF binaries on your zSeries
arch/sparc64/Kconfig +1 -1
Index: linux-2.6/arch/sparc64/Kconfig
===================================================================
@@ -334,7 +334,7 @@
 	default y
 
 config BINFMT_ELF32
-	tristate "Kernel support for 32-bit ELF binaries"
+	bool "Kernel support for 32-bit ELF binaries"
 	depends on SPARC32_COMPAT
 	help
 	  This allows you to run 32-bit Linux/ELF binaries on your Ultra.
#1 lore raw

From: Christoph Hellwig <[email protected]>
Date: Sat, 8 Jul 2006 20:05:54 +0200

Quoted 7 lines

Currently most architectures either always build binfmt_elf32 in the kernel image or make it a boolean option. Only sparc64 and s390 allow to build it modularly. This patch turns the option into a boolean aswell because elf requires various symbols that shouldn't be available to modules. The most urgent one is tasklist_lock whos export this patch series kills, but there are others like force_sgi aswell.

Quoted 6 lines

Note that sparc doesn't allow a modular 32bit a.out handler either, and that would be the more useful case as only few people want 32bit sunos compatibility and 99.9% of all sparc64 users need 32bit linux native elf support.

Yeah, I'm ok with this:

#2 lore raw
In reply to Christoph Hellwig
Quoted 12 lines · Christoph Hellwig

Currently most architectures either always build binfmt_elf32 in the kernel image or make it a boolean option. Only sparc64 and s390 allow to build it modularly. This patch turns the option into a boolean aswell because elf requires various symbols that shouldn't be available to modules. The most urgent one is tasklist_lock whos export this patch series kills, but there are others like force_sgi aswell. [...]
Index: linux-2.6/arch/s390/Kconfig
===================================================================

arch/s390/Kconfig line 124

Quoted 7 lines
arch/s390/Kconfig +1 -1
@@ -119,7 +119,7 @@
 	default y
 
 config BINFMT_ELF32
-	tristate "Kernel support for 31 bit ELF binaries"
+	bool "Kernel support for 31 bit ELF binaries"
 	depends on COMPAT
 	help

Martin and I discussed this already a few days ago. This config option should go away on s390, since everybody who wants CONFIG_COMPAT also wants CONFIG_BINFMT_ELF32. See patch below which applies on top of yours:

From: Heiko Carstens <[email protected]>

[PATCH] s390: remove BINFMT_ELF32 config option

Remove BINFMT_ELF32 config option. Support should be always compiled in if CONFIG_COMPAT is set.

Cc Martin Schwidefsky <[email protected]>

---

 arch/s390/Kconfig         |    7 -------
 arch/s390/kernel/Makefile |    4 ++--
 2 files changed, 2 insertions(+), 9 deletions(-)
arch/s390/Kconfig +0 -7
Index: linux-2.6/arch/s390/Kconfig
===================================================================
@@ -118,13 +118,6 @@ config SYSVIPC_COMPAT
 	depends on COMPAT && SYSVIPC
 	default y
 
-config BINFMT_ELF32
-	bool "Kernel support for 31 bit ELF binaries"
-	depends on COMPAT
-	help
-	  This allows you to run 32-bit Linux/ELF binaries on your zSeries
-	  in 64 bit mode. Everybody wants this; say Y.
-
 comment "Code generation options"
 
 choice
arch/s390/kernel/Makefile +2 -2
Index: linux-2.6/arch/s390/kernel/Makefile
===================================================================
@@ -17,8 +17,8 @@ obj-$(CONFIG_MODULES)		+= s390_ksyms.o m
 obj-$(CONFIG_SMP)		+= smp.o
 
 obj-$(CONFIG_COMPAT)		+= compat_linux.o compat_signal.o \
-					compat_wrapper.o compat_exec_domain.o
-obj-$(CONFIG_BINFMT_ELF32)	+= binfmt_elf32.o
+					compat_wrapper.o compat_exec_domain.o \
+					binfmt_elf32.o
 
 obj-$(CONFIG_VIRT_TIMER)	+= vtime.o
 obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
#3 lore raw
Quoted 15 lines · Heiko Carstens
Quoted 14 lines · Christoph Hellwig

Currently most architectures either always build binfmt_elf32 in the kernel image or make it a boolean option. Only sparc64 and s390 allow to build it modularly. This patch turns the option into a boolean aswell because elf requires various symbols that shouldn't be available to modules. The most urgent one is tasklist_lock whos export this patch series kills, but there are others like force_sgi aswell. [...]
Index: linux-2.6/arch/s390/Kconfig
===================================================================

arch/s390/Kconfig +0 -0
@@ -119,7 +119,7 @@
 	default y
 
Quoted 9 lines

arch/s390/Kconfig line 124

Quoted 5 lines
arch/s390/Kconfig +1 -1
 config BINFMT_ELF32
-	tristate "Kernel support for 31 bit ELF binaries"
+	bool "Kernel support for 31 bit ELF binaries"
 	depends on COMPAT
 	help

Martin and I discussed this already a few days ago. This config option should go away on s390, since everybody who wants CONFIG_COMPAT also wants CONFIG_BINFMT_ELF32. See patch below which applies on top of yours:

Yes, the removal of the BINFMT_ELF32 Kconfig option has been part of the s390 Kconfig cleanup patch as well, it is supposed to go away.

Signature · 8 lines
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.