public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@novell.com>
To: linux-kernel@vger.kernel.org
Subject: [RFC] [PATCH] Deprecate a.out ELF interpreters
Date: Wed, 1 Aug 2007 14:33:09 +0200	[thread overview]
Message-ID: <200708011433.09433.ak@novell.com> (raw)


[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?

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux-2.6.23-rc1-misc/Documentation/feature-removal-schedule.txt
===================================================================
--- linux-2.6.23-rc1-misc.orig/Documentation/feature-removal-schedule.txt
+++ linux-2.6.23-rc1-misc/Documentation/feature-removal-schedule.txt
@@ -306,3 +306,12 @@ Why:	All mthca hardware also supports MS
 Who:	Roland Dreier <rolandd@cisco.com>
 
 ---------------------------
+
+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 <ak@suse.de>
Index: linux-2.6.23-rc1-misc/fs/binfmt_elf.c
===================================================================
--- linux-2.6.23-rc1-misc.orig/fs/binfmt_elf.c
+++ linux-2.6.23-rc1-misc/fs/binfmt_elf.c
@@ -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;



             reply	other threads:[~2007-08-01 12:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 12:33 Andi Kleen [this message]
2007-08-01 15:02 ` [RFC] [PATCH] Deprecate a.out ELF interpreters H. Peter Anvin
2007-08-01 18:30 ` Jan Engelhardt
2007-08-01 18:35   ` Andi Kleen
2007-08-01 19:26     ` Jan Engelhardt
2007-08-01 20:02       ` Christoph Hellwig
2007-08-01 20:13       ` Andi Kleen
2007-08-01 20:42       ` Jiri Kosina
2007-08-01 21:18   ` Rene Herman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200708011433.09433.ak@novell.com \
    --to=ak@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox