mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Heckenbach <f.heckenbach@fh-soft.de>
To: linux-kernel@vger.kernel.org, jkosina@suse.cz
Subject: Re: brk() should check randomize_va_space rather then CONFIG_COMPAT_BRK
Date: Tue, 1 Mar 2011 06:33:21 +0100	[thread overview]
Message-ID: <1298957601.20632.221121@goedel.fjf.gnu.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1102281530060.2160@pobox.suse.cz>

Jiri Kosina wrote:

> On Mon, 28 Feb 2011, Jiri Kosina wrote:
> 
> > how do you avoid race here?
> > 
> > More precisely -- randomize_va_space can be changed in runtime, when 
> > already running processess have been started with different 
> > randomize_va_space value (and thus the shifting of mm->brk already 
> > happened in arch_randomize_brk())

I see. So would it help setting mm->brk = mm->start_brk =
mm->end_code if randomize_va_space < 2 in load_elf_binary() (and
elsewhere if needed -- not sure if other binformats are affected)?

> Oh, and also see the commit
> 
> 	commit 5520e89485252c759ee60d313e9422447659947b
> 	Author: Jiri Kosina <jkosina@suse.cz>
> 	Date:   Thu Jan 13 15:47:23 2011 -0800
> 
> 	    brk: fix min_brk lower bound computation for COMPAT_BRK
> 
> which is quite relevant here as well

AFAICS, this patch only changes the CONFIG_COMPAT_BRK case. I'm more
interested in the !CONFIG_COMPAT_BRK case (since my old binaries
work with CONFIG_COMPAT_BRK as is). Since e.g., Debian's default
kernel doesn't set CONFIG_COMPAT_BRK, I had hoped I could get them
to run by setting randomize_va_space to 0 or 1.

> (and you seem to be sending patch
> against code that doesn't have this patch applied).

Well, I used the last stable release; I hadn't noticed there was a
more recent change, sorry.

Frank

      reply	other threads:[~2011-03-01  5:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27  7:37 Frank Heckenbach
2011-02-28 14:29 ` Jiri Kosina
2011-02-28 14:31   ` Jiri Kosina
2011-03-01  5:33     ` Frank Heckenbach [this message]

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=1298957601.20632.221121@goedel.fjf.gnu.de \
    --to=f.heckenbach@fh-soft.de \
    --cc=jkosina@suse.cz \
    --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

all inboxes | Powered by JetHome®