Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030210AbbLRVEb (ORCPT ); Fri, 18 Dec 2015 16:04:31 -0500 Received: from mail-ig0-f176.google.com ([209.85.213.176]:35033 "EHLO mail-ig0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965379AbbLRVE2 (ORCPT ); Fri, 18 Dec 2015 16:04:28 -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> Date: Fri, 18 Dec 2015 13:04:27 -0800 X-Google-Sender-Auth: fgepavfCF6YT-Uq9ER8UmX3gQvc 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 Content-Length: 953 Lines: 24 On Fri, Dec 18, 2015 at 12:49 PM, Andy Lutomirski wrote: > > IOW, I like my idea in which signal delivery always sets PKRU to the > application-requested-by-syscall values and sigreturn restores it. So I don't mind that, as long as the whole "sigreturn restores it" is part of things. Your original email with the suggestion to *not* resture PKRU I didn't like. Setting it and restoring it is fine. I do wonder if you need an explicit value, though. I think it's reasonable to say that PKRU value 0 is special. It's what we'd start processes with, and why not just say that it's what we run signal handlers in? Would any other value ever make sense, really? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/