From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Neri Subject: Re: [PATCH v9 02/29] x86/boot: Relocate definition of the initial state of CR0 Date: Fri, 27 Oct 2017 12:02:19 -0700 Message-ID: <20171027190219.GA7057@voyager> References: <1507089272-32733-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1507089272-32733-3-git-send-email-ricardo.neri-calderon@linux.intel.com> <20171026090045.GA6438@nazgul.tnic> <20171026125513.GB12068@nazgul.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga11.intel.com ([192.55.52.93]:51188 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbdJ0TD3 (ORCPT ); Fri, 27 Oct 2017 15:03:29 -0400 Content-Disposition: inline In-Reply-To: <20171026125513.GB12068@nazgul.tnic> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Borislav Petkov Cc: Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Peter Zijlstra , Andrew Morton , Brian Gerst , Chris Metcalf , Dave Hansen , Paolo Bonzini , Masami Hiramatsu , Huang Rui , Jiri Slaby , Jonathan Corbet , "Michael S. Tsirkin" , Paul Gortmaker , Vlastimil Babka , Chen Yucong , "Ravi V. Shankar" , Shuah Khan , linux-kernel@vg On Thu, Oct 26, 2017 at 02:55:13PM +0200, Borislav Petkov wrote: > On Thu, Oct 26, 2017 at 02:02:02AM -0700, Andy Lutomirski wrote: > > I'm assuming that UMIP_REPORTED_CR0 will never change. If CR0 gets a > > new field that we set some day, then I assume that CR0_STATE would add > > that bit but UMIP_REPORTED_CR0 would not. > > Yeah, let's do that when it is actually needed. Thanks Andy! I reasoned that for UMIP could report CR0_STATE a value that is already revealed in the source code. Thus, if CR0 ever changes at run time, an attacker could only see what is set programmatically. BR, Ricardo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com ([192.55.52.93]:51188 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbdJ0TD3 (ORCPT ); Fri, 27 Oct 2017 15:03:29 -0400 Date: Fri, 27 Oct 2017 12:02:19 -0700 From: Ricardo Neri Subject: Re: [PATCH v9 02/29] x86/boot: Relocate definition of the initial state of CR0 Message-ID: <20171027190219.GA7057@voyager> References: <1507089272-32733-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1507089272-32733-3-git-send-email-ricardo.neri-calderon@linux.intel.com> <20171026090045.GA6438@nazgul.tnic> <20171026125513.GB12068@nazgul.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171026125513.GB12068@nazgul.tnic> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Borislav Petkov Cc: Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Peter Zijlstra , Andrew Morton , Brian Gerst , Chris Metcalf , Dave Hansen , Paolo Bonzini , Masami Hiramatsu , Huang Rui , Jiri Slaby , Jonathan Corbet , "Michael S. Tsirkin" , Paul Gortmaker , Vlastimil Babka , Chen Yucong , "Ravi V. Shankar" , Shuah Khan , "linux-kernel@vger.kernel.org" , X86 ML , "Neri, Ricardo" , Dave Hansen , Denys Vlasenko , Josh Poimboeuf , Linus Torvalds , linux-arch , "linux-mm@kvack.org" Message-ID: <20171027190219.-_cad-cFCpmElwLNltBY6UxjGUcru2rGYLZQv9JlYdw@z> On Thu, Oct 26, 2017 at 02:55:13PM +0200, Borislav Petkov wrote: > On Thu, Oct 26, 2017 at 02:02:02AM -0700, Andy Lutomirski wrote: > > I'm assuming that UMIP_REPORTED_CR0 will never change. If CR0 gets a > > new field that we set some day, then I assume that CR0_STATE would add > > that bit but UMIP_REPORTED_CR0 would not. > > Yeah, let's do that when it is actually needed. Thanks Andy! I reasoned that for UMIP could report CR0_STATE a value that is already revealed in the source code. Thus, if CR0 ever changes at run time, an attacker could only see what is set programmatically. BR, Ricardo