Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965504AbeAKSgP (ORCPT + 1 other); Thu, 11 Jan 2018 13:36:15 -0500 Received: from mail-io0-f182.google.com ([209.85.223.182]:39259 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932215AbeAKSgL (ORCPT ); Thu, 11 Jan 2018 13:36:11 -0500 X-Google-Smtp-Source: ACJfBosOE0X0pZ/aUNz2II9ddWTbZ26qT8W04jk/nhcEUzhUTRIQDS4wcKzIgVOS67Itw9gK6eNK7PQBdRpePnYgdl4= MIME-Version: 1.0 In-Reply-To: <20180111183207.dah7imbuvuhvrrk6@treble> References: <20180110082207.GX29822@worktop.programming.kicks-ass.net> <20180110091102.GH14066@1wt.eu> <20180111064259.GC14920@1wt.eu> <0f08d89e-61e1-20e3-5c59-0b2f7b32bf0c@linux.intel.com> <20180111154412.GA15296@1wt.eu> <20180111182147.masunghp5km6igjq@ast-mbp.dhcp.thefacebook.com> <20180111183207.dah7imbuvuhvrrk6@treble> From: Linus Torvalds Date: Thu, 11 Jan 2018 10:36:10 -0800 X-Google-Sender-Auth: xtM7cL_jN_m45kVRvcEpZWsXnlE Message-ID: Subject: Re: [RFC PATCH v2 6/6] x86/entry/pti: don't switch PGD on when pti_disable is set To: Josh Poimboeuf Cc: Alexei Starovoitov , Andy Lutomirski , Dave Hansen , Willy Tarreau , Peter Zijlstra , LKML , X86 ML , Borislav Petkov , Brian Gerst , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Greg Kroah-Hartman , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 11, 2018 at 10:32 AM, Josh Poimboeuf wrote: > On Thu, Jan 11, 2018 at 10:21:49AM -0800, Alexei Starovoitov wrote: >> >> hmm. Exposing cr3 to user space will make it trivial for user process >> to know whether kpti is active. Not sure how exploitable such >> information leak. > > It's already trivial to detect PTI from user space. I agree. I don't think the whole "is PTI on" is all that much of a secret. But exposing all of %cr3 to user space is completely unacceptable. That's just about *the* best attack vector information you could give to somebody, and would make KASLR almost totally uninteresting. If you have access to the page directory pointer, and some other weakness that allows you to access it, you're golden. You can do anything. Linus