Re: [PATCH v2 3/3] x86/fpu/xstate: Invalidate fpregs when __fpu_restore_sig() fails

From: Sebastian Andrzej Siewior
Date: Thu Dec 19 2019 - 12:16:44 EST


On 2019-12-19 08:44:08 [-0800], Yu-cheng Yu wrote:
> Yes, this works. But then everywhere that calls copy_*_to_xregs_*() etc. needs to be checked.
> Are there other alternatives?

I don't like the big hammer approach of your very much. It might make
all it "correct" but then it might lead to more "invalids" then needed.
It also required to export the symbol which I would like to avoid.

So if this patch works for you and you don't find anything else where it
falls apart then I will audit tomorrow all callers which got the
"invalidator" added and check for that angle.

Unless someone here complains big tyme and wants this insteadâ

> Yu-cheng

Sebastian