Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261745AbVBICLs (ORCPT ); Tue, 8 Feb 2005 21:11:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261747AbVBICLr (ORCPT ); Tue, 8 Feb 2005 21:11:47 -0500 Received: from fw.osdl.org ([65.172.181.6]:54712 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261745AbVBICK3 (ORCPT ); Tue, 8 Feb 2005 21:10:29 -0500 Date: Tue, 8 Feb 2005 18:10:18 -0800 From: Andrew Morton To: Stephen Hemminger Cc: linux-kernel@vger.kernel.org, Pavel Machek , Daniel Jacobowitz Subject: Re: 2.6.11-rc3: Kylix application no longer works? Message-Id: <20050208181018.5592beab.akpm@osdl.org> In-Reply-To: <20050208111625.0bb1896d@dxpl.pdx.osdl.net> References: <20050207221107.GA1369@elf.ucw.cz> <20050207145100.6208b8b9.akpm@osdl.org> <20050208175106.GA1091@elf.ucw.cz> <20050208111625.0bb1896d@dxpl.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3604 Lines: 101 Stephen Hemminger wrote: > > On Tue, 8 Feb 2005 18:51:06 +0100 > Pavel Machek wrote: > > > Hi! > > > > > I wonder if reverting the patch will restore the old behaviour? > > > > This seems to be minimal fix to get Kylix application back to the > > working state... Maybe it is good idea for 2.6.11? > > > > Signed-off-by: Pavel Machek > > Pavel > > > > --- clean/fs/binfmt_elf.c 2005-02-03 22:27:19.000000000 +0100 > > +++ linux/fs/binfmt_elf.c 2005-02-08 18:46:38.000000000 +0100 > > @@ -803,11 +803,8 @@ > > nbyte = ELF_MIN_ALIGN - nbyte; > > if (nbyte > elf_brk - elf_bss) > > nbyte = elf_brk - elf_bss; > > - if (clear_user((void __user *) elf_bss + load_bias, nbyte)) { > > - retval = -EFAULT; > > - send_sig(SIGKILL, current, 0); > > - goto out_free_dentry; > > - } > > + if (clear_user((void __user *) elf_bss + load_bias, nbyte)) > > + printk(KERN_ERR "Error clearing BSS, wrong ELF executable? (Kylix?!)\n"); > > do once or rate limit rather than log spamming. We could just remove the printk and stick a comment over it. If the application later tries to access the not-there pages then it'll just fault. However I worry if there is some way in which we can leave unzeroed memory accessible to the application, although it's hard to see how that could happen. Daniel, Pavel cruelly chopped you off the Cc when replying. What's your diagnosis on the below? Begin forwarded message: Date: Tue, 8 Feb 2005 23:27:59 +0100 From: Pavel Machek To: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: 2.6.11-rc3: Kylix application no longer works? Hi! > > > I wonder if reverting the patch will restore the old behaviour? > > > > This seems to be minimal fix to get Kylix application back to the > > working state... Maybe it is good idea for 2.6.11? > > Why does clearing the BSS fail? Are the program headers bogus? > (readelf -l). No idea, probably yes. Here's readelf -l result: Pavel Elf file type is EXEC (Executable file) Entry point 0x80614b4 There are 5 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x000a0 0x000a0 R E 0x4 INTERP 0x0000d4 0x080480d4 0x080480d4 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0xb7354 0x1b7354 R E 0x1000 LOAD 0x0b7354 0x08200354 0x08200354 0x1e3e4 0x1f648 RW 0x1000 DYNAMIC 0x0d56a0 0x0821e6a0 0x0821e6a0 0x00098 0x00098 RW 0x4 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .dynsym .dynstr .hash .rel.plt .plt .text borland.ressym borland.resstr borland.reshash borland.resdata borland.resspare 03 .data .rodata .got .dynamic .bss 04 .dynamic -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/