From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752139AbbLRXUU (ORCPT ); Fri, 18 Dec 2015 18:20:20 -0500 Received: from mail-io0-f176.google.com ([209.85.223.176]:32850 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbbLRXUS (ORCPT ); Fri, 18 Dec 2015 18:20:18 -0500 MIME-Version: 1.0 In-Reply-To: References: <56736BD1.5080700@linux.intel.com> <5673750B.606@linux.intel.com> <567453AF.5060808@linux.intel.com> <56746774.8000707@linux.intel.com> <567476CC.8080805@linux.intel.com> Date: Fri, 18 Dec 2015 15:20:18 -0800 X-Google-Sender-Auth: OYoCbBeWLajtBNedWN9C9ICcNIU Message-ID: Subject: Re: Rethinking sigcontext's xfeatures slightly for PKRU's benefit? From: Linus Torvalds To: Andy Lutomirski Cc: Dave Hansen , "H. Peter Anvin" , Oleg Nesterov , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Brian Gerst , "linux-kernel@vger.kernel.org" , Christoph Hellwig Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 18, 2015 at 3:16 PM, Andy Lutomirski wrote: > > Yes, I think. If I'm using protection keys to protect some critical > data structure (important stuff in shared memory, important memory > mapped files, pmem, etc), then I'll allocate a protection key and set > PKRU to deny writes. The problem is that I really, really want writes > denied except when explicitly enabled in narrow regions of code that > use wrpkru to enable them, and I don't want an asynchronous signal > delivered in those narrow regions of code or newly cloned threads to > pick up the write-allow value. So I want baseline_pkru to have the > deny writes entry. Hmm. Ok, that does sound like a valid and interesting usage case. Fair enough. Linus