linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>
Cc: Tim Harvey <tharvey@gateworks.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>,
	Lee Jones <lee.jones@linaro.org>,
	Robin Murphy <robin.murphy@arm.com>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: arm32 insecure W+X mapping
Date: Tue, 21 Sep 2021 16:13:46 +0100	[thread overview]
Message-ID: <YUn2qpc5iBAIvCsd@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAOMZO5AfBdDnPb-p0pzwofALvEUSGFWDWcC75iXaur0kGAd+Wg@mail.gmail.com>

On Mon, Sep 20, 2021 at 09:21:53PM -0300, Fabio Estevam wrote:
> Hi Russell,
> 
> On Mon, Sep 20, 2021 at 8:19 PM Russell King (Oracle)
> <linux@armlinux.org.uk> wrote:
> 
> > I think what I'd like to see is a wrapper around set_memory_ro() that
> > gets passed the __iomem pointer and size. change_memory_common()
> > should accept it as the ioremap() will be located in the vmalloc
> > area which change_memory_common() accepts.
> >
> > Probably something like:
> >
> > void __arm_iomem_set_ro(void __iomem *ptr, size_t size)
> > {
> >         set_memory_ro((unsigned long)ptr, PAGE_ALIGN(size) / PAGE_SIZE);
> > }
> >
> > in arch/arm/mm/ioremap.c would be nice, just after __arm_ioremap_exec().
> > I've probably just written the patch in wordy words. :) Something like
> > this (untested):
> 
> Just tested your patch and DEBUG_WX is happy now:
> 
> [    5.610346] Checked W+X mappings: passed, no W+X pages found
> 
> Thanks a lot, appreciate it!
> 
> Tested-by: Fabio Estevam <festevam@gmail.com>

Thanks, I've split the patch into two parts - one for generic ARM bits
and the other touching imx6 bits. They'll probably be in linux-next
this evening. I would like an Ack from Shawn on the imx6 part of the
patch before I sent it to Linus at the next merge window.

At some point, I will be rebuilding my "misc" branch - I've just thrown
a bunch of commits on top of the 5.14-rc based branch from the last
cycle as a temporary measure.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-09-21 15:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 17:19 arm32 insecure W+X mapping Tim Harvey
2021-08-19 21:28 ` Russell King (Oracle)
2021-08-19 23:59   ` Tim Harvey
2021-08-20  0:16     ` Russell King (Oracle)
2021-08-20 16:06       ` Tim Harvey
2021-08-20 17:48         ` Robin Murphy
2021-08-20 18:41           ` Tim Harvey
2021-09-07 17:48             ` Tim Harvey
2021-09-07 19:22               ` Russell King (Oracle)
2021-09-15  9:44               ` Fabio Estevam
2021-09-15 15:07                 ` Tim Harvey
2021-09-20 16:22                 ` Russell King (Oracle)
2021-09-20 20:56                   ` Tim Harvey
2021-09-20 21:13                     ` Russell King (Oracle)
2021-09-20 22:53                       ` Tim Harvey
2021-09-20 23:12                         ` Fabio Estevam
2021-09-20 23:19                         ` Russell King (Oracle)
2021-09-21  0:21                           ` Fabio Estevam
2021-09-21 15:13                             ` Russell King (Oracle) [this message]
2021-09-22  3:37                           ` Shawn Guo

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=YUn2qpc5iBAIvCsd@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=robin.murphy@arm.com \
    --cc=shawnguo@kernel.org \
    --cc=tharvey@gateworks.com \
    /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;
as well as URLs for NNTP newsgroup(s).