From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753511AbcGLW4i (ORCPT ); Tue, 12 Jul 2016 18:56:38 -0400 Received: from terminus.zytor.com ([198.137.202.10]:58926 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932131AbcGLW4F (ORCPT ); Tue, 12 Jul 2016 18:56:05 -0400 Subject: Re: Minor PKRU bug? To: Dave Hansen , Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" References: <57850D8A.9090801@linux.intel.com> From: "H. Peter Anvin" Message-ID: Date: Tue, 12 Jul 2016 15:55:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <57850D8A.9090801@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -hpa