Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965172AbeALUWo (ORCPT + 1 other); Fri, 12 Jan 2018 15:22:44 -0500 Received: from mail-wr0-f180.google.com ([209.85.128.180]:36603 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964995AbeALUWm (ORCPT ); Fri, 12 Jan 2018 15:22:42 -0500 X-Google-Smtp-Source: ACJfBovBNAxy+tLPUNX27iee49HHN7KxzNio3cku4+1l8YvodArwhW3XOcP7qAFUUx6Dhr9gKLmFbA== Date: Fri, 12 Jan 2018 21:22:38 +0100 From: Ingo Molnar To: Andy Lutomirski Cc: Linus Torvalds , Willy Tarreau , Andy Lutomirski , Dave Hansen , Peter Zijlstra , LKML , X86 ML , Borislav Petkov , Brian Gerst , Thomas Gleixner , Josh Poimboeuf , "H. Peter Anvin" , Greg Kroah-Hartman , Kees Cook Subject: Re: [RFC PATCH v2 6/6] x86/entry/pti: don't switch PGD on when pti_disable is set Message-ID: <20180112202238.hc2dkjvmu7wlz7xw@gmail.com> References: <20180111064259.GC14920@1wt.eu> <0f08d89e-61e1-20e3-5c59-0b2f7b32bf0c@linux.intel.com> <20180111154412.GA15296@1wt.eu> <20180111174025.GB15344@1wt.eu> <50EB5B67-E441-43A6-8DD7-650A75B6ABE7@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50EB5B67-E441-43A6-8DD7-650A75B6ABE7@amacapital.net> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: * Andy Lutomirski wrote: > > Oh, and yes, I think the npti flag should also break ptrace(). I do agree with > > Andy that it's a "capability", although I do not think it should actually be > > implemented as one. > > For all that Linux capabilities are crap, nopti walks like one and quacks like > one. It needs to affect ptrace() permissions, it needs a way to disable it > systemwide, it needs LSM integration, etc. Using CAP_DISABLE_PTI gives us all > of this without tons of churn, auditing, and a whole new configuration thingy > for each LSM. And I avoids permanently polluting ptrace checks, the LSM > interface, etc for what is, essentially, a performance hack to work around a > blatant error in the design of some CPUs. > > Plus, with ambient caps, we already did the nasty part of the with and finished > all the relevant bikeshedding. > > So I'd rather just hold my nose and add the new capability bit. Those all seem pretty valid arguments to me. Thanks, Ingo