Re: [regression v2.6.38] Re: [PATCH v2] brk: fix min_brk lower boundcomputation for COMPAT_BRK
From: Jiri Kosina
Date: Mon Mar 28 2011 - 10:21:04 EST
On Sat, 26 Mar 2011, Geert Uytterhoeven wrote:
> >> | RAMDISK: gzip image found at block 0
> >> | VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
> >> | warning: process `update' used the obsolete bdflush system call
> >> | Fix your initscripts?
> >> | init: cannot open inittab
> >> | Kernel panic - not syncing: Attempted to kill init!
> >>
> >> Sorry for not noticing earlier, I usually boot full Debians under ARAnyM,
> >> instead of booting old ramdisks with libc5-based binaries that once were
> >> considered new.
> >
> > Oh well, one has to love the libc5-based binaries indeed.
>
> Yeah, binaries from 1996 ;-)
>
> > Is the patch below fixing the issue you are seeing on your Amiga/m68k?
> > Thanks.
> >
> >
> > diff --git a/mm/mmap.c b/mm/mmap.c
> > index 2ec8eb5..0a02531 100644
> > --- a/mm/mmap.c
> > +++ b/mm/mmap.c
> > @@ -262,7 +262,7 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
> > Â Â Â Âif (mm->start_brk > PAGE_ALIGN(mm->end_data))
> > Â Â Â Â Â Â Â Âmin_brk = mm->start_brk;
> > Â Â Â Âelse
> > - Â Â Â Â Â Â Â min_brk = mm->end_data;
> > + Â Â Â Â Â Â Â min_brk = mm->end_code;
> > Â#else
> > Â Â Â Âmin_brk = mm->start_brk;
> > Â#endif
>
> Unfortunately not...
>
> I added some printk()s:
>
> mm->start_brk = 0x8000a000, PAGE_ALIGN(mm->end_data = 0x8000a000)
> mm->start_brk = 0x8000a000, PAGE_ALIGN(mm->end_data = 0x8000a000)
> mm->start_brk = 0x8000a000, PAGE_ALIGN(mm->end_data = 0x8000a000)
> mm->start_brk = 0x8000a000, PAGE_ALIGN(mm->end_data = 0x8000a000)
> mm->start_brk = 0x80006000, PAGE_ALIGN(mm->end_data = 0x80004000)
>
> I.e. just before the failure, "mm->start_brk > PAGE_ALIGN(mm->end_data)"
> became true.
Hmm, I think we'd need some refresh on what the ancient libc5-based
binaries are actually doing.
Could you please send me strace of this application (restricting it to
brk()/mmap() calls should be enough).
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/