Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932550AbeAJHT5 (ORCPT + 1 other); Wed, 10 Jan 2018 02:19:57 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:34031 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932482AbeAJHTz (ORCPT ); Wed, 10 Jan 2018 02:19:55 -0500 X-Google-Smtp-Source: ACJfBosZtWbuKlbTZjiVjmG8gTPhPoAA0RMDSCGvryL0QEaOESqLkdeKKxfyzD1ffqW3Rv9WfyGS6w== Date: Wed, 10 Jan 2018 08:19:51 +0100 From: Ingo Molnar To: Willy Tarreau 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 3/6] x86/pti: add a per-cpu variable pti_disable Message-ID: <20180110071951.t4vbwlnlw2qycnpm@gmail.com> References: <1515502580-12261-1-git-send-email-w@1wt.eu> <1515502580-12261-4-git-send-email-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515502580-12261-4-git-send-email-w@1wt.eu> 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: * Willy Tarreau wrote: > +#ifdef CONFIG_PAGE_TABLE_ISOLATION > + this_cpu_write(pti_disable, > + next_p->mm && next_p->mm->context.pti_disable); > +#endif Another pet peeve, please write: > + this_cpu_write(pti_disable, next_p->mm && next_p->mm->context.pti_disable); or consider introducing an 'mm_next' local variable, set to next_p->mm, and use that to shorten the sequence. More importantly, any strong reasons why the flag is logic-inverted? I.e. why not ::pti_enabled? Thanks, Ingo