* Re: - binfmt_elf-bss-padding-fix.patch removed from -mm tree
[not found] <200510112000.j9BK0lCF024476@shell0.pdx.osdl.net>
@ 2005-10-12 0:42 ` Coywolf Qi Hunt
2005-10-12 1:03 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Coywolf Qi Hunt @ 2005-10-12 0:42 UTC (permalink / raw)
To: Andrew Morton; +Cc: tzachar, dan, roland, pluto, linux-kernel, jbglaw, vonbrand
On 10/12/05, akpm@osdl.org <akpm@osdl.org> wrote:
>
> The patch titled
>
> binfmt_elf bss padding fix
>
> has been removed from the -mm tree. Its filename is
>
> binfmt_elf-bss-padding-fix.patch
>
> This patch was probably dropped from -mm because
> it has already been merged into a subsystem tree
> or into Linus's tree
>
>
>
> Nir Tzachar <tzachar@cs.bgu.ac.il> points out that if an ELF file specifies a
> zero-length bss at a whacky address, we cannot load that binary because
> padzero() tries to zero out the end of the page at the whacky address, and
> that may not be writeable.
>
> See also http://bugzilla.kernel.org/show_bug.cgi?id=5411
>
> So teach load_elf_binary() to skip the bss settng altogether if the elf file
> has a zero-length bss segment.
>
> Cc: Roland McGrath <roland@redhat.com>
> Cc: Daniel Jacobowitz <dan@debian.org>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
>
> fs/binfmt_elf.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN fs/binfmt_elf.c~binfmt_elf-bss-padding-fix fs/binfmt_elf.c
> --- devel/fs/binfmt_elf.c~binfmt_elf-bss-padding-fix 2005-10-11 08:15:14.000000000 -0700
> +++ devel-akpm/fs/binfmt_elf.c 2005-10-11 08:15:14.000000000 -0700
> @@ -905,7 +905,7 @@ static int load_elf_binary(struct linux_
> send_sig(SIGKILL, current, 0);
> goto out_free_dentry;
> }
> - if (padzero(elf_bss)) {
> + if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
> send_sig(SIGSEGV, current, 0);
> retval = -EFAULT; /* Nobody gets to see this, but.. */
> goto out_free_dentry;
> _
This is simply not complete. load_elf_binary() is fixed.
load_elf_library() need to be fixed too. And theoretically
load_elf_interp() too.
--
Coywolf Qi Hunt
http://sosdg.org/~coywolf/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: - binfmt_elf-bss-padding-fix.patch removed from -mm tree
2005-10-12 0:42 ` - binfmt_elf-bss-padding-fix.patch removed from -mm tree Coywolf Qi Hunt
@ 2005-10-12 1:03 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-10-12 1:03 UTC (permalink / raw)
To: Coywolf Qi Hunt
Cc: Andrew Morton, tzachar, roland, pluto, linux-kernel, jbglaw,
vonbrand
On Wed, Oct 12, 2005 at 08:42:31AM +0800, Coywolf Qi Hunt wrote:
> This is simply not complete. load_elf_binary() is fixed.
> load_elf_library() need to be fixed too. And theoretically
> load_elf_interp() too.
Hardly: one would require a wacky ELF interpreter to trigger, which is
your own fault, and the other is only reachable from sys_uselib and
deserves death.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-12 1:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200510112000.j9BK0lCF024476@shell0.pdx.osdl.net>
2005-10-12 0:42 ` - binfmt_elf-bss-padding-fix.patch removed from -mm tree Coywolf Qi Hunt
2005-10-12 1:03 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox