linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Tim Harvey <tharvey@gateworks.com>
Cc: Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: arm32 insecure W+X mapping
Date: Fri, 20 Aug 2021 01:16:46 +0100	[thread overview]
Message-ID: <20210820001646.GN22278@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAJ+vNU05L1Fyvy1R6_HwpLeo92LSJhDY4BCr-0aqM7rYgh6TVQ@mail.gmail.com>

On Thu, Aug 19, 2021 at 04:59:15PM -0700, Tim Harvey wrote:
> On Thu, Aug 19, 2021 at 2:28 PM Russell King (Oracle)
> <linux@armlinux.org.uk> wrote:
> >
> > On Thu, Aug 19, 2021 at 10:19:46AM -0700, Tim Harvey wrote:
> > > Greetings,
> > >
> > > Since commit a8e53c151fe7 "(ARM: 8737/1: mm: dump: add checking for
> > > writable and executable)" I've been seeing the following appear on my
> > > arm32 kernel:
> > >
> > > arm/mm: Found insecure W+X mapping at address 0xf087d000
> > > ...
> > > Checked W+X mappings: FAILED, 1 W+X pages found
> > >
> > > As I haven't seen others report this I assume it's something unique to
> > > my kernel configuration. How do I debug what is causing the insecure
> > > page?
> >
> > If you check /proc/vmallocinfo, it should tell you the physical
> > address that was mapped there, and the function that created the
> > mapping. That should give enough clues to track it down.
> >
> 
> Russell,
> 
> Thanks for the tip!
> 
> # dmesg | grep insecure
> [   13.219582] arm/mm: Found insecure W+X mapping at address 0xf087d000
> # cat /proc/vmallocinfo | grep 0xf0
> 0x5f3045dd-0xf0020e05   20480 imx6_pm_get_base+0x64/0x98 phys=0x020e0000 ioremap
> 0xf0020e05-0x6e748217    8192 dma_common_contiguous_remap+0x88/0xa4 dma-coherent
> 0x127639d7-0x334ee291    4096 iotable_init+0x0/0xf0 phys=0x00a00000 ioremap

Oh... the kernel's %p pointer munging (for security reasons) is
affecting your ability to debug your problem. Assuming this is a
recent kernel, you can disable this by passing "no_hash_pointers"
on the kernel command line. You should then see real addresses (and
a big fat message at boot time about it.

-- 
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-08-20  0:18 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) [this message]
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)
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=20210820001646.GN22278@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).