Re: Nokia N900: insecure W+X mapping at 0xd0050000

From: Tony Lindgren
Date: Wed Mar 21 2018 - 11:24:18 EST


* Pavel Machek <pavel@xxxxxx> [180308 18:06]:
> Hi!
>
> > > * Pavel Machek <pavel@xxxxxx> [180308 06:29]:
> > > > Insecure W+X mappings, who cares about those? I have 7 pages...
> > >
> > > Is this with CONFIG_DEBUG_WX=y?
> > >
> > > My guess is that it's for mapping the PM assembly to SRAM. This
> > > is already fixed for am335x that is using drivers/misc/sram*.c.
> > > I think omap2 - omap4 still need fixing if this is the culprit.
> >
> > Adding Dave to Cc, here's a quick fix for this one.
>
> I did a quick testing and warning is gone. Thanks!

Turns out init time configuration is not enough here.
It causes an oops on omap3 after off mode coming back
from idle. So we need to reconfigure things when
omap_sram_push() is called after idle too.

Below is an updated patch.

Regards,

Tony

8< ----------------------