public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@linux.intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
	Andy Lutomirski <luto@amacapital.net>, X86 ML <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Minor PKRU bug?
Date: Tue, 12 Jul 2016 15:59:32 -0700	[thread overview]
Message-ID: <57857654.1000309@linux.intel.com> (raw)
In-Reply-To: <bdb6c72a-9119-968f-9d85-c0db59835db7@zytor.com>

On 07/12/2016 03:55 PM, H. Peter Anvin wrote:
> On 07/12/16 08:32, Dave Hansen wrote:
>> On 07/09/2016 02:27 PM, Andy Lutomirski wrote:
>>> is_prefetch in arch/x86/mm/fault.c can be called on a user address
>>> that's not readable due to PKRU.  This could break it.  You might need
>>> to add a get_user_exec or similar.
>>
>> Thanks for the heads-up.  I think I'll just need a version that does
>> something along the lines of stac/clac, but with PKRU.
>>
>> I think I can do it with an "_exec" variant of probe_kernel_address(),
>> but it's a bit messy.
> 
> Can this particular codepath even be executed on a PKRU-equipped
> machine?  I thought it was a bug fix for a specific AMD CPU line.

Yeah, I think we hit it unconditionally in the naughty paths of the page
fault handler.  I don't see any CPU model detection in the call path.  I
think we just assume that everybody has prefetch bugs.

  reply	other threads:[~2016-07-12 23:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-09 21:27 Minor PKRU bug? Andy Lutomirski
2016-07-12 15:32 ` Dave Hansen
2016-07-12 22:55   ` H. Peter Anvin
2016-07-12 22:59     ` Dave Hansen [this message]
2016-07-12 22:59     ` Andy Lutomirski
2016-07-21 21:35       ` Dave Hansen
2016-07-21 21:45         ` Andy Lutomirski
2016-07-21 21:48           ` H. Peter Anvin
2016-07-21 22:26             ` Dave Hansen

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=57857654.1000309@linux.intel.com \
    --to=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --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