Deprecate a.out ELF interpreters
Subsystems (3)
RFC PATCH 1/1 Deprecate a.out ELF interpreters
[apologies for the empty mail earlier; wetware error]
RFC: Deprecate a.out ELF interpreter support
The Linux ELF loader is quite complicated and messy code (that could probably need a rewrite, but that's a different chapter). One particular messy part in it is the support for non ELF a.out ld.sos. This was originally added to make transition from a.out to ELF easier because an a.out ELF ld.so could be still build using an older a.out toolkit. But by now that should be fully obsolete and removing it would clean up binfmt_elf.c up a bit.
I propose to deprecate this support and remove for 2.6.25.
Drawback is that someone still runs their system with a.out ld.so they would need to update the ld.so when updating to a new kernel.
This patch just adds an entry to the deprecation file and a printk warning users.
Comments?
Documentation/feature-removal-schedule.txt +9 -0
@@ -306,3 +306,12 @@ Why: All mthca hardware also supports MS Who: Roland Dreier <[email protected]> --------------------------- + +What: a.out interpreter support for ELF executables +When: 2.6.25 +Files: fs/binfmt_elf.c +Why: Using a.out interpreters for ELF executables was a feature for + transition from a.out to ELF. But now it is unlikely to be still + needed anymore and removing it would simplify the hairy ELF + loader code. +Who: Andi Kleen <[email protected]>
fs/binfmt_elf.c +7 -0
@@ -730,6 +730,7 @@ static int load_elf_binary(struct linux_/* Some simple consistency checks for the interpreter */ if (elf_interpreter) { +static int warn; interpreter_type =INTERPRETER_ELF |INTERPRETER_AOUT ;/* Now figure out which format our binary is */
@@ -741,6 +742,12 @@ static int load_elf_binary(struct linux_if (memcmp (loc->interp_elf_ex.e_ident,ELFMAG ,SELFMAG ) !=0 ) interpreter_type &= ~INTERPRETER_ELF ; +if (interpreter_type ==INTERPRETER_AOUT && warn <10 ) { +printk (KERN_WARNING "a.out ELF interpreter %s is " +"deprecated and will not be supported anymore\n" , elf_interpreter); + warn++; + } + retval = -ELIBBAD ;if (!interpreter_type) goto out_free_dentry;
Quoted 11 lines · Andi Kleen
I propose to deprecate this support and remove for 2.6.25.
Drawback is that someone still runs their system with a.out ld.so they would need to update the ld.so when updating to a new kernel.
This patch just adds an entry to the deprecation file and a printk warning users.
Comments?
Makes total sense. This is a highly oddball configuration, and *extremely* unlikely to have a significant user base of modern kernels.
It's been 12 years since we switched to ELF.
-hpa
Quoted 1 line · Andi Kleen
Comments?
A kconfig entry "(OBSOLETE)"/"(DEPRECATED)" would be nice.
(And if you want to test people, 'depends on EMBEDDED' for CONFIG_BINFMT_AOUT)
Jan
Quoted 6 lines · On Wednesday 01 August 2007 20:30:18 Jan Engelhardt wrote:
Quoted 1 line · Andi Kleen
Comments?
A kconfig entry "(OBSOLETE)"/"(DEPRECATED)" would be nice.
(And if you want to test people, 'depends on EMBEDDED' forCONFIG_BINFMT_AOUT)
The point is to have less clutter in binfmt_elf.c (which really could need a rewrite btw or at least a lot of cleanup) not add more in form of ifdefs.
-Andi
Quoted 9 lines · Andi Kleen
Quoted 5 lines · Andi Kleen
Quoted 1 line
Comments?
A kconfig entry "(OBSOLETE)"/"(DEPRECATED)" would be nice.
(And if you want to test people, 'depends on EMBEDDED' forCONFIG_BINFMT_AOUT)The point is to have less clutter in
binfmt_elf.c(which really could need a rewrite btw or at least a lot of cleanup) not add more in form of ifdefs.
--- fs/Kconfig.binfmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/Kconfig.binfmt +1 -1
@@ -56,7 +56,7 @@ config BINFMT_SHARED_FLAT Support FLAT shared libraries config BINFMT_AOUT - tristate "Kernel support for a.out and ECOFF binaries" + tristate "Kernel support for a.out and ECOFF binaries (OBSOLETE)" depends on X86_32 || ALPHA || ARM || M68K || SPARC32 ---help--- A.out (Assembler.OUTput) is a set of formats for libraries and
Plusminus "depends on EMBEDDED" to already hide it in the short term until removal. (Yes, ideally, one would use the yet-to-be-introduced CONFIG_OBSOLETE)
Jan
Quoted 22 lines · Jan Engelhardt
Quoted 9 lines · Andi Kleen
Quoted 5 lines · Andi Kleen
Quoted 1 line
Comments?
A kconfig entry "(OBSOLETE)"/"(DEPRECATED)" would be nice.
(And if you want to test people, 'depends on EMBEDDED' forCONFIG_BINFMT_AOUT)The point is to have less clutter in
binfmt_elf.c(which really could need a rewrite btw or at least a lot of cleanup) not add more in form of ifdefs.--- fs/Kconfig.binfmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Index: linux-2.6.23/fs/Kconfig.binfmt
===================================================================
fs/Kconfig.binfmt config BINFMT_SHARED_FLAT · line 59
Quoted 5 lines
fs/Kconfig.binfmt +1
-1@@ -56,7 +56,7 @@ config BINFMT_SHARED_FLAT Support FLAT shared libraries config BINFMT_AOUT - tristate "Kernel support for a.out and ECOFF binaries" + tristate "Kernel support for a.out and ECOFF binaries (OBSOLETE)"
NAK, binfmt a.out support is something entirely different from what we're talking about here.
fs/Kconfig.binfmt config BINFMT_SHARED_FLAT · line 59
Quoted 4 lines
config
BINFMT_AOUTfs/Kconfig.binfmt +1
-1- tristate "Kernel support for a.out and ECOFF binaries" + tristate "Kernel support for a.out and ECOFF binaries (OBSOLETE)"
I'm _NOT_ proposing to obsolete a.out support. Just a.out ld.so support for ELF executables. The relevant code is in binfmt_elf.c
-Andi
fs/Kconfig.binfmt config BINFMT_SHARED_FLAT · line 59
Quoted 3 lines · Jan Engelhardt
config
BINFMT_AOUTfs/Kconfig.binfmt +1
-1- tristate "Kernel support for a.out and ECOFF binaries" + tristate "Kernel support for a.out and ECOFF binaries (OBSOLETE)"
I beg your pardon?! This definitely is not what Andi meant, right? We want to remove the legacy support for a.out ELF-interpreters, not a.out binaries.
Signature · 1 line
Jiri Kosina
Quoted 5 lines · Jan Engelhardt
Quoted 1 line · Andi Kleen
Comments?
A kconfig entry "(OBSOLETE)"/"(DEPRECATED)" would be nice. (And if you want to test people, 'depends on EMBEDDED' for
CONFIG_BINFMT_AOUT)
Or just remove that junk.
Rene.