public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andi Kleen <ak@suse.de>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [BUG] get_unmapped_area() change -> non booting machine
Date: Wed, 11 Feb 2004 09:17:02 +1100	[thread overview]
Message-ID: <1076451422.866.55.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.58.0402100814410.2128@home.osdl.org>


> What I find strange is that bash passed in something else than NULL as the 
> argument in the first place. Doing a quick trace of my bash executable 
> shows non-NULL hints only for MAP_FIXED mmap's. So what triggered this? 

It's ld.so which passed the prelink'ed address as a hit on a part glibc
itself. Since glibc is prelinked below the executable on PPC and since
my prelink'ed informations are outdated (prelink somewhat broke on PPC
in latest debian SID), the library wouldn't fit, thus mmap tried to
move it upward... to the brk hole. At least that is my explanation, I
didn't trace the code in ld.so

> Random special cases in code are just evil, and end up biting us in the 
> end. Which is why I'd rather see the revert, along with more of a look at 
> _why_ bash does what it does for you.

It's not bash, it's ld.so... Note that Andi's patch also fix a potential
similar issue with the free_area_cache, if somebody does a MAP_FIXED to
low addresses, then a un-hinted mmap, then that mmap will have chances
to be put straight after brk, causing the same kind of interesting issues.

So if you don't take Andi's latest patch, maybe you should still take
the part that avoid playing with free_area_cache on MAP_FIXED mappings ?

Ben.



  parent reply	other threads:[~2004-02-10 22:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-10  3:47 [BUG] get_unmapped_area() change -> non booting machine Benjamin Herrenschmidt
2004-02-10 16:25 ` Linus Torvalds
2004-02-10 17:37   ` Jamie Lokier
2004-02-10 22:25     ` Benjamin Herrenschmidt
2004-02-12 23:23     ` Andi Kleen
2004-02-12 10:04       ` Ingo Molnar
2004-02-12 16:36         ` Linus Torvalds
2004-02-12 17:02           ` Dave McCracken
2004-02-12 17:17             ` Linus Torvalds
2004-02-12 17:31               ` Dave McCracken
2004-02-12 18:19                 ` Linus Torvalds
2004-02-12 18:25                   ` Dave McCracken
2004-02-12 20:49           ` Benjamin Herrenschmidt
2004-02-13  3:26           ` Jamie Lokier
2004-02-15  5:25             ` Andi Kleen
2004-02-13 18:33               ` Martin J. Bligh
2004-02-13  1:52                 ` Andi Kleen
2004-02-13  6:26           ` H. Peter Anvin
2004-02-10 22:17   ` Benjamin Herrenschmidt [this message]
2004-02-14  8:34     ` Andi Kleen
2004-02-11 23:23 ` Andi Kleen
2004-02-10  7:48   ` Benjamin Herrenschmidt

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=1076451422.866.55.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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