All of lore.kernel.org
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] MXS: Fix mxs_defconfig MMAP_MIN_ADDR
Date: Fri, 3 Aug 2012 21:08:06 +0200	[thread overview]
Message-ID: <201208032108.06819.marex@denx.de> (raw)
In-Reply-To: <20120803190640.GF10335@n2100.arm.linux.org.uk>

Dear Russell King - ARM Linux,

> On Fri, Aug 03, 2012 at 08:46:27PM +0200, Marek Vasut wrote:
> > Dear Russell King - ARM Linux,
> > 
> > [...]
> > 
> > > > > No need to set it to 32768.
> > > > > 
> > > > > If you just remove the 'CONFIG_DEFAULT_MMAP_MIN_ADDR=65536' then
> > > > > this symbol will be 32768.
> > > > 
> > > > Sorry, ignore what I said. I just realized that the default is 4096.
> > > 
> > > 4096 is also fine for ARM too.  There's not much point in having
> > > defconfigs change it - that would just be pure noise in the config
> > > files.
> > 
> > Wasn't there a security concern being the reason for setting this higher?
> 
> I don't believe there is.  The only requirement is that the first page
> on older CPUs isn't stomped on (and we preserve that for later CPUs so
> that NULL pointer derefs get caught.)
> 
> The higher it is the better though, because it means NULL pointer + offset
> deref with larger offsets also gets caught.

Understood!

> > Also,
> > I still don't completely understand why ARM has to set it lower than
> > others, is that an ABI thing?
> 
> Yes, we have always loaded user programs at 0x8000 by default, which are
> generally not relocatable.  So if you set it to 64K, you prevent non-root
> user programs being mapped in, which is why stuff gets killed as soon as
> UID != 0.

I see! Thanks for explaining!

Best regards,
Marek Vasut

      reply	other threads:[~2012-08-03 19:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 15:55 [PATCH] MXS: Fix mxs_defconfig MMAP_MIN_ADDR Marek Vasut
2012-08-03 16:46 ` Fabio Estevam
2012-08-03 16:48   ` Fabio Estevam
2012-08-03 16:54   ` Fabio Estevam
2012-08-03 17:40     ` Russell King - ARM Linux
2012-08-03 18:23       ` Fabio Estevam
2012-08-03 18:46       ` Marek Vasut
2012-08-03 19:06         ` Russell King - ARM Linux
2012-08-03 19:08           ` Marek Vasut [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=201208032108.06819.marex@denx.de \
    --to=marex@denx.de \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.