mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Dave Hansen <dave.hansen@intel.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	hpa@zytor.com, jon.grimm@amd.com,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Thomas Lendacky <Thomas.Lendacky@amd.com>
Subject: Re: AMD / Memory Protection Keys
Date: Sat, 2 May 2020 06:50:25 +0700	[thread overview]
Message-ID: <01f3cf52-bb1e-f6a0-5810-c5e62ce5f302@amd.com> (raw)
In-Reply-To: <178377ad-efd6-d473-e10d-2928c171437e@intel.com>

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&amp;data=02%7C01%7Csuravee.suthikulpanit%40amd.com%7C9ea21438bce6488589a308d7ec720d0d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637237847630823928&amp;sdata=LZLQjvlVT5xSnjyRt0alN0lHleh8VD7Sxx53RL1UrX0%3D&amp;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

      reply	other threads:[~2020-05-01 23:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  9:01 [PATCH] x86/fpu: Warn only when CPU-provided sizes less than struct declaration Suravee Suthikulpanit
2019-12-03 10:34 ` Sebastian Andrzej Siewior
2019-12-06  8:14   ` Suravee Suthikulpanit
2019-12-03 17:27 ` Dave Hansen
2019-12-06  8:14   ` Suravee Suthikulpanit
2019-12-06 15:28     ` Dave Hansen
2019-12-11  5:24       ` Suravee Suthikulpanit
2019-12-11 14:13         ` Dave Hansen
2019-12-12  6:52           ` Suravee Suthikulpanit
2020-01-13  9:54             ` Suravee Suthikulpanit
2020-01-15 16:54               ` Dave Hansen
2020-04-29 19:18       ` AMD / Memory Protection Keys Dave Hansen
2020-05-01 23:50         ` Suravee Suthikulpanit [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=01f3cf52-bb1e-f6a0-5810-c5e62ce5f302@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=bigeasy@linutronix.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=jon.grimm@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®