Re: [Patch v3 07/13] x86/process Add arch_set_dumpable
From: Tim Chen
Date: Thu Oct 18 2018 - 14:46:39 EST
On 10/18/2018 06:28 AM, Thomas Gleixner wrote:
> So now the obvious question. set_dumpable() operates on tsk->mm. i.e. it's
> a process wide operation. But arch_set_dumpable() operates on the task
> itself. What about the other tasks of that process?
I missed this part.
Fixing this is tricky as I don't see an easy way to
reverse map mm back to all tasks that use the same mm
to update their STIBP flags.
One possible solution is to not use STIBP flag for
We check during context switch whether
get_dumpable(prev) != get_dumpable(next) in addition
to STIBP flag changes to update SPEC_CTRL MSR and IBPB.
We will need to IPI all other CPUs to update
their SPEC_CTRL MSR if they are using the mm
that has dumpable property changes.
Any better suggestions?