From: "Raslan, KarimAllah" <karahmed@amazon•de>
To: "will@kernel•org" <will@kernel•org>
Cc: "mark.rutland@arm•com" <mark.rutland@arm•com>,
"anders.roxell@linaro•org" <anders.roxell@linaro•org>,
"yuzhao@google•com" <yuzhao@google•com>,
"ard.biesheuvel@linaro•org" <ard.biesheuvel@linaro•org>,
"info@metux•net" <info@metux•net>,
"anshuman.khandual@arm•com" <anshuman.khandual@arm•com>,
"linux@armlinux•org.uk" <linux@armlinux•org.uk>,
"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
"yaojun8558363@gmail•com" <yaojun8558363@gmail•com>,
"james.morse@arm•com" <james.morse@arm•com>,
"catalin.marinas@arm•com" <catalin.marinas@arm•com>,
"tglx@linutronix•de" <tglx@linutronix•de>,
"rppt@linux•ibm.com" <rppt@linux•ibm.com>,
"robin.murphy@arm•com" <robin.murphy@arm•com>,
"akpm@linux-foundation•org" <akpm@linux-foundation•org>,
"linux-arm-kernel@lists•infradead.org"
<linux-arm-kernel@lists•infradead.org>
Subject: Re: [PATCH] arm: Extend the check for RAM in /dev/mem
Date: Fri, 12 Jul 2019 15:46:59 +0000 [thread overview]
Message-ID: <1562946417.1345.20.camel@amazon.de> (raw)
In-Reply-To: <20190712153423.ypyqexfmajrmsa5r@willie-the-truck>
On Fri, 2019-07-12 at 16:34 +0100, Will Deacon wrote:
> On Fri, Jul 12, 2019 at 03:13:38PM +0000, Raslan, KarimAllah wrote:
> >
> > On Fri, 2019-07-12 at 15:57 +0100, Will Deacon wrote:
> > >
> > > On Fri, Jul 12, 2019 at 12:21:21AM +0200, KarimAllah Ahmed wrote:
> > > >
> > > >
> > > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> > > > index 3645f29..cdc3e8e 100644
> > > > --- a/arch/arm64/mm/mmu.c
> > > > +++ b/arch/arm64/mm/mmu.c
> > > > @@ -78,7 +78,7 @@ void set_swapper_pgd(pgd_t *pgdp, pgd_t pgd)
> > > > pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
> > > > unsigned long size, pgprot_t vma_prot)
> > > > {
> > > > - if (!pfn_valid(pfn))
> > > > + if (!memblock_is_memory(__pfn_to_phys(pfn)))
> > >
> > > This looks broken to me, since it will end up returning 'true' for nomap
> > > memory and we really don't want to map that using writeback attributes.
> >
> > True, I will fix this by using memblock_is_map_memory instead. That said, do
> > you have any concerns about this approach in general?
>
> If you do that, I don't understand why you need the patch at all given our
> implementation of pfn_valid() in arch/arm64/mm/init.c.
Oops! Right, I guess that would not work either.
Let me dig into a better way to do that.
>
> Will
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-07-12 15:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 22:21 [PATCH] arm: Extend the check for RAM in /dev/mem KarimAllah Ahmed
2019-07-12 2:36 ` Anshuman Khandual
2019-07-12 2:58 ` Raslan, KarimAllah
2019-07-12 8:56 ` Russell King - ARM Linux admin
2019-07-12 8:59 ` Raslan, KarimAllah
2019-07-12 14:57 ` Will Deacon
2019-07-12 15:13 ` Raslan, KarimAllah
2019-07-12 15:34 ` Will Deacon
2019-07-12 15:46 ` Raslan, KarimAllah [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=1562946417.1345.20.camel@amazon.de \
--to=karahmed@amazon$(echo .)de \
--cc=akpm@linux-foundation$(echo .)org \
--cc=anders.roxell@linaro$(echo .)org \
--cc=anshuman.khandual@arm$(echo .)com \
--cc=ard.biesheuvel@linaro$(echo .)org \
--cc=catalin.marinas@arm$(echo .)com \
--cc=info@metux$(echo .)net \
--cc=james.morse@arm$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=mark.rutland@arm$(echo .)com \
--cc=robin.murphy@arm$(echo .)com \
--cc=rppt@linux$(echo .)ibm.com \
--cc=tglx@linutronix$(echo .)de \
--cc=will@kernel$(echo .)org \
--cc=yaojun8558363@gmail$(echo .)com \
--cc=yuzhao@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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