patch-2.1.5 linux/fs/binfmt_elf.c

Next file: linux/fs/buffer.c
Previous file: linux/drivers/net/slip.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.4/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -84,22 +84,11 @@
 static void padzero(unsigned long elf_bss)
 {
 	unsigned long nbyte;
-	char * fpnt;
   
 	nbyte = elf_bss & (PAGE_SIZE-1);
 	if (nbyte) {
 		nbyte = PAGE_SIZE - nbyte;
-		/* FIXME: someone should investigate, why a bad binary
-		   is allowed to bring a wrong elf_bss until here,
-		   and how to react. Suffice the plain return?
-		   rossius@hrz.tu-chemnitz.de */
-		if (verify_area(VERIFY_WRITE, (void *) elf_bss, nbyte)) {
-			return;
-		}
-		fpnt = (char *) elf_bss;
-		do {
-			put_user(0, fpnt++);
-		} while (--nbyte);
+		clear_user((void *) elf_bss, nbyte);
 	}
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov