linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH for mm] Remove iBCS support
Date: Sat, 19 Jan 2008 05:59:18 +0100	[thread overview]
Message-ID: <20080119045918.GA12215@basil.nowhere.org> (raw)


Hi Andrew,

Can you please queue this patch in -mm for .25. It was posted earlier
and nobody complained.

Thanks,
-Andi

----


Remove ibcs2 support in ELF loader too

ibcs2 support has never been supported on 2.6 kernels as far as I know,
and if it has it must have been an external patch. Anyways, if anybody
applies an external patch they could as well readd the ibcs checking
code to the ELF loader in the same patch. But there is no reason
to keep this code running in all Linux kernels. This will save at least
two strcmps each ELF execution.

No deprecation period because it could not have been used anyways.

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

---
 fs/binfmt_elf.c |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

Index: linux/fs/binfmt_elf.c
===================================================================
--- linux.orig/fs/binfmt_elf.c
+++ linux/fs/binfmt_elf.c
@@ -530,7 +530,6 @@ static int load_elf_binary(struct linux_
  	unsigned long load_addr = 0, load_bias = 0;
 	int load_addr_set = 0;
 	char * elf_interpreter = NULL;
-	unsigned char ibcs2_interpreter = 0;
 	unsigned long error;
 	struct elf_phdr *elf_ppnt, *elf_phdata;
 	unsigned long elf_bss, elf_brk;
@@ -647,14 +646,6 @@ static int load_elf_binary(struct linux_
 			if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0')
 				goto out_free_interp;
 
-			/* If the program interpreter is one of these two,
-			 * then assume an iBCS2 image. Otherwise assume
-			 * a native linux image.
-			 */
-			if (strcmp(elf_interpreter,"/usr/lib/libc.so.1") == 0 ||
-			    strcmp(elf_interpreter,"/usr/lib/ld.so.1") == 0)
-				ibcs2_interpreter = 1;
-
 			/*
 			 * The early SET_PERSONALITY here is so that the lookup
 			 * for the interpreter happens in the namespace of the 
@@ -674,7 +665,7 @@ static int load_elf_binary(struct linux_
 			 * switch really is going to happen - do this in
 			 * flush_thread().	- akpm
 			 */
-			SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter);
+			SET_PERSONALITY(loc->elf_ex, 0);
 
 			interpreter = open_exec(elf_interpreter);
 			retval = PTR_ERR(interpreter);
@@ -725,7 +716,7 @@ static int load_elf_binary(struct linux_
 			goto out_free_dentry;
 	} else {
 		/* Executables without an interpreter also need a personality  */
-		SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter);
+		SET_PERSONALITY(loc->elf_ex, 0);
 	}
 
 	/* OK, we are done with that, now set up the arg stuff,
@@ -748,7 +739,7 @@ static int load_elf_binary(struct linux_
 
 	/* Do this immediately, since STACK_TOP as used in setup_arg_pages
 	   may depend on the personality.  */
-	SET_PERSONALITY(loc->elf_ex, ibcs2_interpreter);
+	SET_PERSONALITY(loc->elf_ex, 0);
 	if (elf_read_implies_exec(loc->elf_ex, executable_stack))
 		current->personality |= READ_IMPLIES_EXEC;
 

             reply	other threads:[~2008-01-19  4:59 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19  4:59 Andi Kleen [this message]
2008-01-20  2:27 ` [PATCH for mm] Remove iBCS support David Newall
2008-01-20  3:11   ` Andi Kleen
2008-01-20  4:46     ` David Newall
2008-01-20  5:18       ` Andi Kleen
2008-01-20  5:33         ` David Newall
2008-01-20  5:55           ` Andi Kleen
2008-01-20  6:23             ` David Newall
2008-01-20  7:29               ` Andi Kleen
2008-01-21  1:37                 ` David Newall
2008-01-22 10:24                   ` Karl Kiniger
2008-01-22 15:06                     ` David Newall
2008-01-22 15:52                       ` Adrian Bunk
2008-01-23  8:48                     ` Andi Kleen
2008-01-23 14:12                       ` Karl Kiniger
2008-01-23 14:24                         ` Andi Kleen
2008-01-24 17:06                           ` David Newall
2008-01-22 11:12                   ` Ingo Molnar
2008-01-22 12:42                     ` Karl Kiniger
2008-01-22 15:13                     ` David Newall
2008-01-22 15:49                       ` Ingo Molnar
2008-01-24 17:01                         ` David Newall
2008-01-22 16:01                       ` Adrian Bunk
2008-01-24 17:04                         ` David Newall
2008-01-24 17:24                           ` Adrian Bunk
2008-01-24 17:55                             ` David Newall
2008-01-24 18:14                               ` Adrian Bunk
2008-01-25  2:14                                 ` David Newall
2008-01-25  5:12                                   ` Valdis.Kletnieks
2008-01-25 16:40                                   ` Alan Cox
2008-01-24 19:51                               ` Pavel Machek
2008-01-25  2:17                                 ` David Newall
2008-01-24 20:37                               ` Andi Kleen
2008-01-25  2:16                                 ` David Newall
2008-01-22 16:50                       ` Alan Cox
2008-01-24 17:08                         ` David Newall
2008-01-22 13:20                 ` Giulio
2008-01-20 13:06           ` Alan Cox
2008-01-20 13:43             ` David Newall
2008-01-20 13:51               ` Alan Cox
2008-01-25 12:17 ` Ingo Molnar

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=20080119045918.GA12215@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=akpm@osdl.org \
    --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;
as well as URLs for NNTP newsgroup(s).