From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756072AbbJGUYE (ORCPT ); Wed, 7 Oct 2015 16:24:04 -0400 Received: from www.sr71.net ([198.145.64.142]:40180 "EHLO blackbird.sr71.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbbJGUYD (ORCPT ); Wed, 7 Oct 2015 16:24:03 -0400 Subject: Re: [PATCH 26/26] x86, pkeys: Documentation To: Ingo Molnar References: <20150916174903.E112E464@viggo.jf.intel.com> <20150916174913.AF5FEA6D@viggo.jf.intel.com> <20150920085554.GA21906@gmail.com> <55FF88BA.6080006@sr71.net> <20150924094956.GA30349@gmail.com> <20151003081710.GA26206@gmail.com> Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andrew Morton , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Kees Cook , Brian Gerst From: Dave Hansen Message-ID: <56157F60.1000503@sr71.net> Date: Wed, 7 Oct 2015 13:24:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151003081710.GA26206@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/03/2015 01:17 AM, Ingo Molnar wrote: > Right now the native x86 PTE format allows two protection related bits for > user-space pages: > > _PAGE_BIT_RW: if 0 the page is read-only, if 1 then it's read-write > _PAGE_BIT_NX: if 0 the page is executable, if 1 then it's not executable > > As discussed previously, pkeys allows 'true execute only (--x)' mappings. > > Another possibility would be 'true write-only (-w-)' mappings. How would those work? Protection Keys has a Write-Disable and an Access-Disable bit. But, Access-Disable denies _all_ data access to the region. There's no way to allow only writes. Or am I missing something?