public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@novell.com>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: heap-stack-gap for 2.6
Date: Wed, 29 Sep 2004 16:53:44 +0200	[thread overview]
Message-ID: <20040929145344.GA22008@dualathlon.random> (raw)
In-Reply-To: <20040929142521.GB22928@devserv.devel.redhat.com>

On Wed, Sep 29, 2004 at 04:25:21PM +0200, Arjan van de Ven wrote:
> the patch posted recently on this list reduced it to 1Mb.

I must have overlooked that post, sorry (I was just reading latest
kernel CVS).

> > > MAP_FIXED is to be used only on things YOU mmaped before. 
> > 
> > where is that written?
> 
> it's basic common sence 

that sounds a bit overoptimistic assumption to me, especially if it was
not written anywhere. Plus applications do use MAP_FIXED, and myself,
the only place I would use it, is slightly below the 1G mark. that's the
safest place if you can find today, especially if you do heavy mmaps
(normally the brk never gets as high as 1G, no matter what the app is
doing, while you can easily reach the stack, or easily go below 1G with
topdown).

> I know you can write a testcase, one can write a testcase even for your
> proposed patch showing breakage.

my patch, will never genrate random mm corruption that will make the app
behave randomly at runtime.

The only testcase you can write for my patch, is a testcase that will
get a sigsegv and it'll get killed gracefully, like it happened to java
in the past. that's a bit different than random mm corruption. And the
only application where this testcase was suprios todate was java, which
got fixed meanwhile, and nothing wrong could ever happen with a spurious
sigsegv. if an application can't handle sigsegv gracefully, then the
application itself is broken, since any software bug can always generate
the sigsegv.

if the overridden mmap with MAP_FIXED would be guaranteed to generate a
sigsegv I wouldn't be talking about that right now.

> You are wrong; the default is 8Mb stack limit in the kernel; I absolutely do
> not see where you claim from "most people run with unlimited stack" comes
> from.

maybe I'm biased because I do run with unlimited stack? And I'm not
going to change that since I really like recursion. I want a stack-gap
instead, to be sure to get a sisgsegv if the recursion overflows on the
heap ;)

> I am aware of 2 applications breaking. Both did

oh, so you see, I wasn't *that* wrong if you're already aware of 2 apps
breaking.

Frankly I don't see the need of these kind of 32bit hacks that may break
stuff, when people is finally moving x86-64.

  reply	other threads:[~2004-09-29 15:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25 16:22 heap-stack-gap for 2.6 Andrea Arcangeli
2004-09-25 23:57 ` Rik van Riel
2004-09-26  0:40   ` Andrea Arcangeli
2004-09-27  8:09 ` Arjan van de Ven
2004-09-27 13:09   ` Andrea Arcangeli
2004-09-28 19:43     ` Arjan van de Ven
2004-09-28 22:19       ` Andrea Arcangeli
2004-09-29  6:05         ` Arjan van de Ven
2004-09-29 14:11           ` Andrea Arcangeli
2004-09-29 14:24             ` Alan Cox
2004-09-29 15:44               ` Andrea Arcangeli
2004-09-29 14:25             ` Arjan van de Ven
2004-09-29 14:53               ` Andrea Arcangeli [this message]
2004-09-29 15:01                 ` Arjan van de Ven
2004-09-29 15:40                   ` Andrea Arcangeli
2004-09-28  6:25 ` Hui Huang
2004-09-28 14:19   ` Andrea Arcangeli
2004-09-29  8:42     ` Hui Huang
2004-09-29 14:23       ` Andrea Arcangeli
2004-09-29 22:01         ` Hui Huang
2004-10-12  0:51           ` Andrea Arcangeli

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=20040929145344.GA22008@dualathlon.random \
    --to=andrea@novell.com \
    --cc=akpm@osdl.org \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@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