[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180110071951.t4vbwlnlw2qycnpm@gmail.com>
Date: Wed, 10 Jan 2018 08:19:51 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Willy Tarreau <w@....eu>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Brian Gerst <brgerst@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Josh Poimboeuf <jpoimboe@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Kees Cook <keescook@...omium.org>
Subject: Re: [RFC PATCH v2 3/6] x86/pti: add a per-cpu variable pti_disable
* Willy Tarreau <w@....eu> 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
Powered by blists - more mailing lists