Re: [PATCH] x86/speculation: Use Indirect Branch Prediction Barrier in context switch
From: Borislav Petkov
Date: Tue Jan 30 2018 - 19:42:08 EST
On Tue, Jan 30, 2018 at 04:25:26PM -0800, Tim Chen wrote:
> As dumpable is a property in mm->flags, it affects all threads running
> on other cpus sharing the same mm.
It is not about sharing the same mm - it is about sharing the RSB. How
many logical CPUs share an RSB? If it is per core (which can have two
threads) then issuing the barrier should have effect on both threads.
Thus one barrier is enough.
IOW, the granularity is determined by how many logical CPUs share the
RSB not by how many logical CPUs share an mm.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.