Re: [patch V2 21/28] x86/speculation: Prepare for conditional IBPB in switch_mm()

From: Thomas Gleixner
Date: Sun Nov 25 2018 - 14:20:50 EST


On Sun, 25 Nov 2018, Thomas Gleixner wrote:
> /*
> + * Use bit 0 to mangle the TIF_SPEC_IB state into the mm pointer which is
> + * stored in cpu_tlb_state.last_user_mm_ibpb.
> + */
> +#define LAST_USER_MM_IBPB 0x1UL
> +
> +/*
> + unsigned long next_tif = task_thread_info(next)->flags;
> + unsigned long ibpb = (next_tif >> TIF_SPEC_IB) & LAST_USR_MM_IBPB;

That wants to be LAST_USER_ of course. That's what you get for last minute
changes...