From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030304AbcGLPc3 (ORCPT ); Tue, 12 Jul 2016 11:32:29 -0400 Received: from mga01.intel.com ([192.55.52.88]:30607 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933462AbcGLPc1 (ORCPT ); Tue, 12 Jul 2016 11:32:27 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,352,1464678000"; d="scan'208";a="844916140" Subject: Re: Minor PKRU bug? To: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" References: From: Dave Hansen Message-ID: <57850D8A.9090801@linux.intel.com> Date: Tue, 12 Jul 2016 08:32:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: 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/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.