Re: powerpc: set used_vsr/used_vr/used_spe in sigreturn path when MSR bits are active

From
Michael Ellerman <hidden>
Date
2016-09-13 12:16:55
Also in
lkml
Reply to
unknown sender, 2016-07-26
On Tue, 2016-26-07 at 08:06:01 UTC, Simon Guo wrote:
From: Simon Guo <redacted>

Normally, when MSR[VSX/VR/SPE] bits = 1, the used_vsr/used_vr/used_spe
bit have already been set. However signal frame locates at user space
and it is controlled by user application. It is up to kernel to make
sure used_vsr/used_vr/used_spe(in kernel)=1 and consistent with MSR
bits.

For example, CRIU application, who utilizes sigreturn to restore
checkpointed process, will lead to the case where MSR[VSX] bit is
active in signal frame, but used_vsx bit is not set. (the same applies
to VR/SPE).

This patch will reinforce this at kernel by always setting used_* bit
when MSR related bits are active in signal frame and we are doing
sigreturn.

This patch is based on Ben's Proposal.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Simon Guo <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/e1c0d66fcb179a1737b3d5cc11

cheers
Thread (3 messages) 3 messages, 2 authors, 2016-09-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help