disallow modular BINFMT_ELF
Subsystems (9)
PATCH 1/1 disallow modular BINFMT_ELF
Hi Marcelo,
with no 2.4 kernel BINFMT_ELF=m actually worked, you always get a
<-- snip -->
depmod: *** Unresolved symbols in /lib/modules/2.4.25-pre4/kernel/fs/binfmt_elf.o depmod: smp_num_siblings depmod: put_files_struct depmod: steal_locks
<-- snip -->
Since BINFMT_ELF=m is a very unusual case, the patch below simply disallows modular BINFMT_ELF.
A similar patch I sent was already accepted into 2.6.
diffstat output:
Documentation/Configure.help | 6 ------ arch/alpha/config.in | 2 +- arch/arm/config.in | 2 +- arch/cris/config.in | 2 +- arch/i386/config.in | 2 +- arch/ia64/config.in | 2 +- arch/m68k/config.in | 2 +- arch/mips/config-shared.in | 2 +- arch/parisc/config.in | 2 +- arch/s390/config.in | 2 +- arch/s390x/config.in | 2 +- arch/sh/config.in | 2 +- arch/sh64/config.in | 2 +- arch/sparc/config.in | 2 +- arch/sparc64/config.in | 2 +- arch/x86_64/config.in | 2 +- 16 files changed, 15 insertions(+), 21 deletions(-)
Please apply
Adrian
arch/sh64/config.in renamed from arch/sh64/config.in.old +1 -1
@@ -152,7 +152,7 @@ "ELF CONFIG_KCORE_ELF \ A.OUT CONFIG_KCORE_AOUT" ELF fi -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
arch/x86_64/config.in renamed from arch/x86_64/config.in.old +1 -1
@@ -106,7 +106,7 @@ define_bool CONFIG_KCORE_ELF y fi #tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Power Management support' CONFIG_PM
arch/i386/config.in renamed from arch/i386/config.in.old +1 -1
@@ -326,7 +326,7 @@ A.OUT CONFIG_KCORE_AOUT" ELF fi tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
arch/alpha/config.in renamed from arch/alpha/config.in.old +1 -1
@@ -314,7 +314,7 @@ bool ' OSF/1 v4 readv/writev compatibility' CONFIG_OSF4_COMPAT fi -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86 source drivers/parport/Config.in
arch/sparc/config.in renamed from arch/sparc/config.in.old +1 -1
@@ -73,7 +73,7 @@ define_bool CONFIG_KCORE_ELF y fi tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
arch/mips/config-shared.in renamed from arch/mips/config-shared.in.old +1 -1
@@ -930,7 +930,7 @@ define_bool CONFIG_KCORE_ELF y define_bool CONFIG_KCORE_AOUT n define_bool CONFIG_BINFMT_AOUT n -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF dep_bool 'Kernel support for Linux/MIPS 32-bit binary compatibility' CONFIG_MIPS32_COMPAT $CONFIG_MIPS64 dep_bool 'Kernel support for o32 binaries' CONFIG_MIPS32_O32 $CONFIG_MIPS32_COMPAT dep_bool 'Kernel support for n32 binaries' CONFIG_MIPS32_N32 $CONFIG_MIPS32_COMPAT
arch/m68k/config.in renamed from arch/m68k/config.in.old +1 -1
@@ -98,7 +98,7 @@ A.OUT CONFIG_KCORE_AOUT" ELF fi tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC if [ "$CONFIG_AMIGA" = "y" ]; then
arch/sparc64/config.in renamed from arch/sparc64/config.in.old +1 -1
@@ -76,7 +76,7 @@ tristate ' Kernel support for 32-bit ELF binaries' CONFIG_BINFMT_ELF32 bool ' Kernel support for 32-bit (ie. SunOS) a.out binaries' CONFIG_BINFMT_AOUT32 fi -tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
arch/arm/config.in renamed from arch/arm/config.in.old +1 -1
@@ -498,7 +498,7 @@ "ELF CONFIG_KCORE_ELF \ A.OUT CONFIG_KCORE_AOUT" ELF tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC dep_bool 'Power Management support (experimental)' CONFIG_PM $CONFIG_EXPERIMENTAL dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32
arch/sh/config.in renamed from arch/sh/config.in.old +1 -1
@@ -282,7 +282,7 @@ "ELF CONFIG_KCORE_ELF \ A.OUT CONFIG_KCORE_AOUT" ELF fi -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
arch/ia64/config.in renamed from arch/ia64/config.in.old +1 -1
@@ -99,7 +99,7 @@ bool 'System V IPC' CONFIG_SYSVIPC bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
arch/s390/config.in renamed from arch/s390/config.in.old +1 -1
@@ -57,7 +57,7 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL define_bool CONFIG_KCORE_ELF y -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG bool 'Pseudo page fault support' CONFIG_PFAULT
arch/parisc/config.in renamed from arch/parisc/config.in.old +1 -1
@@ -88,7 +88,7 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL define_bool CONFIG_KCORE_ELF y -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for SOM binaries' CONFIG_BINFMT_SOM tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
arch/cris/config.in renamed from arch/cris/config.in.old +1 -1
@@ -30,7 +30,7 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF string 'Kernel command line' CONFIG_ETRAX_CMDLINE "root=/dev/mtdblock3"
arch/s390x/config.in renamed from arch/s390x/config.in.old +1 -1
@@ -60,7 +60,7 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL define_bool CONFIG_KCORE_ELF y -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG bool 'Pseudo page fault support' CONFIG_PFAULT
Documentation/Configure.help renamed from Documentation/Configure.help.old +0 -6
@@ -4553,12 +4553,6 @@ ld.so (check the file <file:Documentation/Changes> for location and latest version). - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called binfmt_elf.o. Saying M or N here is dangerous because - some crucial programs on your system might be in ELF format. - Kernel support for a.out binaries CONFIG_BINFMT_AOUT A.out (Assembler.OUTput) is a set of formats for libraries and
Quoted 9 lines · Adrian Bunk
with no 2.4 kernel BINFMT_ELF=m actually worked, you always get a
<-- snip -->
depmod: *** Unresolved symbols in
/lib/modules/2.4.25-pre4/kernel/fs/binfmt_elf.odepmod: smp_num_siblings depmod: put_files_struct depmod: steal_locks
In 2.6 we gave up and made CONFIG_BINFMT_ELF a def_bool. So people who want it get it statically linked. People who are making tiny a.out systems set it to 'n'.
Quoted 6 lines · Andrew Morton
Quoted 5 lines · Adrian Bunk
with no 2.4 kernel BINFMT_ELF=m actually worked, you always get a
<-- snip -->
Quoted 8 lines
Quoted 4 lines
depmod: *** Unresolved symbols in
/lib/modules/2.4.25-pre4/kernel/fs/binfmt_elf.odepmod: smp_num_siblings depmod: put_files_struct depmod: steal_locksIn 2.6 we gave up and made
CONFIG_BINFMT_ELFadef_bool. So people who want it get it statically linked. People who are making tiny a.out systems set it to 'n'.
Could you please give some hint about what's hindering ELF support from being a module?
Just curious, thanks.
Quoted 5 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 3 lines
Regards, Isaac () ascii ribbon campaign - against html e-mail /\ - against microsoft attachments