From: Andrew Morton <akpm@linux-foundation.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Ingo Molnar <mingo@elte.hu>,
Linux/m68k <linux-m68k@vger.kernel.org>,
Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: m68k libc5 regression
Date: Sun, 1 Jun 2008 00:53:38 -0700 [thread overview]
Message-ID: <20080601005338.3affe880.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0805270014110.6718@jikos.suse.cz>
On Tue, 27 May 2008 00:19:32 +0200 (CEST) Jiri Kosina <jkosina@suse.cz> wrote:
> On Mon, 26 May 2008, Geert Uytterhoeven wrote:
>
> > Recently I noticed a regression when running an old libc5 binary
> > (amiga-lilo) on m68k. It fails with the error message:
>
> Hmm, libc5 is known to make broken assumptions about brk location, that's
> why we introduced CONFIG_COMPAT_BRK, do you have that option turned on?
>
> > So I bisected it to:
> > commit 4cc6028d4040f95cdb590a87db478b42b8be0508
> > Author: Jiri Kosina <jkosina@suse.cz>
> > Date: Wed Feb 6 22:39:44 2008 +0100
> > brk: check the lower bound properly
>
> Indeed, this should take CONFIG_COMPAT_BRK into account. Does the patch
> below fix it? (assuming that you have CONFIG_COMPAT_BRK=y):
>
>
>
> From: Jiri Kosina <jkosina@suse.cz>
>
> brk: check lower bound properly
>
> The check in sys_brk() on minimum value the brk might have must take
> CONFIG_COMPAT_BRK setting into account. When this option is turned on
> (i.e. we support ancient legacy binaries, e.g. libc5-linked stuff), the
> lower bound on brk value is mm->end_code, otherwise the brk start is
> allowed to be arbitrarily shifted.
>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
>
> diff --git a/mm/mmap.c b/mm/mmap.c
> index fac6633..834118b 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -245,10 +245,16 @@ asmlinkage unsigned long sys_brk(unsigned long brk)
> unsigned long rlim, retval;
> unsigned long newbrk, oldbrk;
> struct mm_struct *mm = current->mm;
> + unsigned long min_brk;
>
> down_write(&mm->mmap_sem);
>
> - if (brk < mm->start_brk)
> +#ifdef CONFIG_COMPAT_BRK
> + min_brk = mm->end_code;
> +#else
> + min_brk = mm->start_brk;
> +#endif
> + if (brk < min_brk)
> goto out;
>
OK, we have a problem here.
Somebody has gone and checked this patch into their tree and it now
appears in linux-next.
I do not know how to work out how this patch got into linux-next.
It's not in any of the trees which I pull so I guess that person has
been shuffling URLs without telling me.
One of the reasons this is bad is that, frankly, I trust almost nobody
to remember to backport fixes into 2.6.25.x. I'm not even at all
confident that our mystery new part-time memory management maintainer
will remember to merge this into 2.6.26. The fact that this person
failed to add a Cc:stable@kernel.org to the changelog doesn't inspire
confidence.
I shall merge this fix into my tree (y'know - the one where memory
management patches are hosted) and I'll get it into 2.6.26 and shall
offer it to the -stable team. This will cause me to get collisions
with the duplicated patch in linux-next but fortunately it is small.
This time.
And to whoever did this: please don't.
next prev parent reply other threads:[~2008-06-01 7:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 20:38 m68k libc5 regression Geert Uytterhoeven
2008-05-26 22:19 ` Jiri Kosina
2008-05-29 11:03 ` Jiri Kosina
2008-05-29 11:28 ` Geert Uytterhoeven
2008-05-29 19:38 ` Geert Uytterhoeven
2008-06-02 10:28 ` Jiri Kosina
2008-06-01 7:53 ` Andrew Morton [this message]
2008-06-01 8:37 ` Geert Uytterhoeven
2008-06-01 8:48 ` Andrew Morton
2008-06-01 9:22 ` Sam Ravnborg
2008-06-01 9:41 ` Andrew Morton
2008-06-01 10:34 ` Sam Ravnborg
2008-06-01 9:56 ` Geert Uytterhoeven
2008-06-01 13:26 ` Diagnosing linux-next (Was: Re: m68k libc5 regression) Stephen Rothwell
2008-06-01 21:04 ` Andrew Morton
2008-06-02 0:39 ` Paul Mackerras
2008-06-02 1:06 ` Andrew Morton
2008-06-02 2:12 ` Paul Mackerras
2008-06-02 5:37 ` Andrew Morton
2008-06-02 5:49 ` Paul Mackerras
2008-06-02 6:22 ` Andrew Morton
2008-06-02 10:27 ` m68k libc5 regression Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080601005338.3affe880.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox