[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <01f3cf52-bb1e-f6a0-5810-c5e62ce5f302@amd.com>
Date: Sat, 2 May 2020 06:50:25 +0700
From: Suravee Suthikulpanit <suravee.suthikulpanit@....com>
To: Dave Hansen <dave.hansen@...el.com>, linux-kernel@...r.kernel.org,
x86@...nel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
jon.grimm@....com,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Thomas Lendacky <Thomas.Lendacky@....com>
Subject: Re: AMD / Memory Protection Keys
Dave,
On 4/30/20 2:18 AM, Dave Hansen wrote:
> The docs for AMD's implementation of protection keys showed up[1].
> Welcome to the party!
>
> It all looks fine, except for this nugget:
>
> The MPK mechanism is ignored in the following cases:
> ... for pages marked in the paging structures as read-only
> (R/W=0) or as supervisor addresses (U/S=0)
>
> That R/W=0 would mean that you can't access-disable read-only pages,
> which seems a bit goofy. It's certainly a feature that I could imagine
> folks wanting to have. Read-only pages might happen in unexpected
> places for things like mmap(PROT_WRITE)'d files or even CoW pages after
> fork().
>
> Is this an error in the docs?
>
> 1. https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.amd.com%2Fsystem%2Ffiles%2FTechDocs%2F24593.pdf&data=02%7C01%7Csuravee.suthikulpanit%40amd.com%7C9ea21438bce6488589a308d7ec720d0d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637237847630823928&sdata=LZLQjvlVT5xSnjyRt0alN0lHleh8VD7Sxx53RL1UrX0%3D&reserved=0
>
Yes, we have checked with the hardware team and this is a mistake in the documentation.
The access disable bit (ADi) bit does apply to read-only pages. We will be correcting
the documentation. Thanks for pointing it out :)
Suravee
Powered by blists - more mailing lists