linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for mm] Remove iBCS support
@ 2008-01-19  4:59 Andi Kleen
  2008-01-20  2:27 ` David Newall
  2008-01-25 12:17 ` Ingo Molnar
  0 siblings, 2 replies; 41+ messages in thread
From: Andi Kleen @ 2008-01-19  4:59 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel


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;
 

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2008-01-25 15:44 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-19  4:59 [PATCH for mm] Remove iBCS support Andi Kleen
2008-01-20  2:27 ` 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

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).