Re: [RFC PATCH v2 3/6] x86/pti: add a per-cpu variable pti_disable

From: Ingo Molnar
Date: Wed Jan 10 2018 - 02:20:00 EST



* Willy Tarreau <w@xxxxxx> 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