mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: Bug? Sparc linux defines MAP_LOCKED == MAP_GROWSDOWN
Date: Sat, 18 Jan 2003 08:53:31 +0000	[thread overview]
Message-ID: <20030118085331.GB19390@bjl1.asuk.net> (raw)
In-Reply-To: <20030118.001218.52982745.davem@redhat.com>

David S. Miller wrote:
>    From: Jamie Lokier <jamie@shareable.org>
>    Date: Sat, 18 Jan 2003 03:29:40 +0000
> 
>    On Sparc and Sparc64, MAP_LOCKED and MAP_GROWSDOWN are both defined
>    as 0x100.  This is a bug, isn't it?
>    
> Unfortunately it's one we're going to have to live with somehow.
> Probably by just saying MAP_GROWSDOWN is totally unsupported.
> I see no real use for it anyways.

I've never seen the point of it either - MAP_GROWSDOWN just allows the
stack to grow until it overwrites the next vma down, as far as I can
tell.  No guard page or anything.

I think MAP_GROWSDOWN should simply be deleted on all architectures
(some don't support it even though they define the flag anyway).

However if that doesn't happen, isn't it best if MAP_LOCKED on the
Sparc _doesn't_ imply MAP_GROWSDOWN?  That could lead to some peculiar
failure modes, if a program pokes an unmapped address (which a few do
for one reason or another) and happens to have a MAP_LOCKED region
above it.

I.e. I suggest renumbering MAP_GROWSDOWN in <asm-sparc{,64}/mman.h>.
Nobody in userspace will be using that, whereas there probably are a
few programs using MAP_LOCKED, and getting MAP_GROWSDOWN behaviour as
a bonus is a genuine bug.

cheers,
-- Jamie

  reply	other threads:[~2003-01-18  8:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-18  3:29 Jamie Lokier
2003-01-18  8:12 ` David S. Miller
2003-01-18  8:53   ` Jamie Lokier [this message]
2003-01-18 11:49     ` David S. Miller

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=20030118085331.GB19390@bjl1.asuk.net \
    --to=jamie@shareable.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.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

all inboxes | Powered by JetHome®