Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932479AbeAJHSs (ORCPT + 1 other); Wed, 10 Jan 2018 02:18:48 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:39295 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932139AbeAJHSr (ORCPT ); Wed, 10 Jan 2018 02:18:47 -0500 Date: Wed, 10 Jan 2018 08:18:04 +0100 From: Willy Tarreau To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Andy Lutomirski , Borislav Petkov , Brian Gerst , Dave Hansen , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf , "H. Peter Anvin" , Kees Cook Subject: Re: [RFC PATCH v2 5/6] x86/entry/pti: avoid setting CR3 when it's already correct Message-ID: <20180110071804.GA14066@1wt.eu> References: <1515502580-12261-1-git-send-email-w@1wt.eu> <1515502580-12261-6-git-send-email-w@1wt.eu> <20180110071624.gllkdls2eo7jfhaf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180110071624.gllkdls2eo7jfhaf@gmail.com> 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 Wed, Jan 10, 2018 at 08:16:24AM +0100, Ingo Molnar wrote: > > * Willy Tarreau wrote: > > > + /* if we're already on the kernel PGD, we don't switch */ > > + * If we're already on the kernel PGD, we don't switch, > > + * If we saved a kernel context on entry, we didn't switch the CR3, > > It's hard enough to read assembly code, please use consistent capitalization: > > s/if > /If Will do, thanks for the review ;-) Willy