Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965341AbbLRUh1 (ORCPT ); Fri, 18 Dec 2015 15:37:27 -0500 Received: from mail-ig0-f181.google.com ([209.85.213.181]:37644 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965320AbbLRUhY (ORCPT ); Fri, 18 Dec 2015 15:37:24 -0500 MIME-Version: 1.0 In-Reply-To: <56746774.8000707@linux.intel.com> 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 12:37:23 -0800 X-Google-Sender-Auth: Ya6mrg9bGY38bhCTW8L3iYeXOkE Message-ID: Subject: Re: Rethinking sigcontext's xfeatures slightly for PKRU's benefit? From: Linus Torvalds To: Dave Hansen Cc: Andy Lutomirski , "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: 1018 Lines: 24 On Fri, Dec 18, 2015 at 12:07 PM, Dave Hansen wrote: > > But, I think it's a small one. Basically, RSP would have to pointing at > a place which was allowed by protection keys for all of the sigframe > setup. Note that the whole "stack is special" is not at all a new issue. It's the main reason why sigaltstack() and SS_ONSTACK exists. This is in no way new to PKRU, people have had to handle the issue of stack-related SIGSEGV faults for a long time. So any application that uses PKRU and may play games that affects the stack, will always have to have a separate "safe stack" that it uses for signal handling. But that is in no way PKRU-specific, it's been the case for a lot of other memory management faults. 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/