[PATCH for mm] Remove iBCS support

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <akpm@...>
Cc: <linux-kernel@...>
Date: Saturday, January 19, 2008 - 12:59 am

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;
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH for mm] Remove iBCS support, Andi Kleen, (Sat Jan 19, 12:59 am)
Re: [PATCH for mm] Remove iBCS support, Ingo Molnar, (Fri Jan 25, 8:17 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Sat Jan 19, 10:27 pm)
Re: [PATCH for mm] Remove iBCS support, Andi Kleen, (Sat Jan 19, 11:11 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Sun Jan 20, 12:46 am)
Re: [PATCH for mm] Remove iBCS support, Andi Kleen, (Sun Jan 20, 1:18 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Sun Jan 20, 1:33 am)
Re: [PATCH for mm] Remove iBCS support, Alan Cox, (Sun Jan 20, 9:06 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Sun Jan 20, 9:43 am)
Re: [PATCH for mm] Remove iBCS support, Alan Cox, (Sun Jan 20, 9:51 am)
Re: [PATCH for mm] Remove iBCS support, Andi Kleen, (Sun Jan 20, 1:55 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Sun Jan 20, 2:23 am)
Re: [PATCH for mm] Remove iBCS support, Andi Kleen, (Sun Jan 20, 3:29 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Sun Jan 20, 9:37 pm)
Re: [PATCH for mm] Remove iBCS support, Ingo Molnar, (Tue Jan 22, 7:12 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Tue Jan 22, 11:13 am)
Re: [PATCH for mm] Remove iBCS support, Alan Cox, (Tue Jan 22, 12:50 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 1:08 pm)
Re: [PATCH for mm] Remove iBCS support, Adrian Bunk, (Tue Jan 22, 12:01 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 1:04 pm)
Re: [PATCH for mm] Remove iBCS support, Adrian Bunk, (Thu Jan 24, 1:24 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 1:55 pm)
Re: [PATCH for mm] Remove iBCS support, Pavel Machek, (Thu Jan 24, 3:51 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 10:17 pm)
Re: [PATCH for mm] Remove iBCS support, Andi Kleen, (Thu Jan 24, 4:37 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 10:16 pm)
Re: [PATCH for mm] Remove iBCS support, Adrian Bunk, (Thu Jan 24, 2:14 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 10:14 pm)
Re: [PATCH for mm] Remove iBCS support, Alan Cox, (Fri Jan 25, 12:40 pm)
Re: [PATCH for mm] Remove iBCS support, Ingo Molnar, (Tue Jan 22, 11:49 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 1:01 pm)
Re: [PATCH for mm] Remove iBCS support, Karl Kiniger, (Tue Jan 22, 8:42 am)
Re: [PATCH for mm] Remove iBCS support, Karl Kiniger, (Tue Jan 22, 6:24 am)
Re: [PATCH for mm] Remove iBCS support, Andi Kleen, (Wed Jan 23, 4:48 am)
Re: [PATCH for mm] Remove iBCS support, Karl Kiniger, (Wed Jan 23, 10:12 am)
Re: [PATCH for mm] Remove iBCS support, Andi Kleen, (Wed Jan 23, 10:24 am)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Thu Jan 24, 1:06 pm)
Re: [PATCH for mm] Remove iBCS support, David Newall, (Tue Jan 22, 11:06 am)
Re: [PATCH for mm] Remove iBCS support, Adrian Bunk, (Tue Jan 22, 11:52 am)