Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965229AbeALThK (ORCPT + 1 other); Fri, 12 Jan 2018 14:37:10 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:39783 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965123AbeALThJ (ORCPT ); Fri, 12 Jan 2018 14:37:09 -0500 Date: Fri, 12 Jan 2018 20:36:06 +0100 From: Willy Tarreau To: Linus Torvalds Cc: David Laight , Andy Lutomirski , Dave Hansen , Peter Zijlstra , LKML , X86 ML , Borislav Petkov , Brian Gerst , Ingo Molnar , 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: <20180112193606.GB16424@1wt.eu> References: <20180111064259.GC14920@1wt.eu> <0f08d89e-61e1-20e3-5c59-0b2f7b32bf0c@linux.intel.com> <20180111154412.GA15296@1wt.eu> <20180111174025.GB15344@1wt.eu> <6590e2b183c740f6896f57ae100c2ac3@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 12, 2018 at 09:55:45AM -0800, Linus Torvalds wrote: > On Fri, Jan 12, 2018 at 8:27 AM, David Laight wrote: > > > > You need to allow for libraries that create threads before main() > > is called. > > I really don't think we do. I think the normal case is the wrapper. > > Processes should never say "I'm so important that I'm disabling PTI". > That's crazy talk, and wrong. > > It's wrong for all the usual reasons - everybody always thinks that > _their_ own work is so important and bug-free, and that things like > PTI are about protecting all those other imcompetent people. > > No. Bullshit. Nobody should ever disable PTI for themselves, because > nobody is inherently trustworthy. > > Instead, we have the case of something _external_ saying "this > process is so important that it should be started without PTI". I totally agree, and what I initially envisionned (for my use case) was a config option with a scary enough name if we couldn't have the wrapper. But the wrapper brings the long term benefit of allowing us to do what we want with the pgd, which is a nice add-on. Willy