[PATCH] MXS: Fix mxs_defconfig MMAP_MIN_ADDR
Marek Vasut
marex at denx.de
Fri Aug 3 15:08:06 EDT 2012
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
More information about the linux-arm-kernel
mailing list