]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: fix swapcontext backwards compat. with VSX ucontext changes
authorMichael Neuling <mikey@neuling.org>
Tue, 8 Jul 2008 08:43:41 +0000 (18:43 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 9 Jul 2008 06:30:47 +0000 (16:30 +1000)
commit86b96eabb706977f76afac02f0e31cb9ad2a7159
treef61b78d06c8bc49e5b671bd065464613758dcefb
parent7306acb155fc4e75e97aef8314b33f5aa82dd080
powerpc: fix swapcontext backwards compat. with VSX ucontext changes

When the ucontext changed to add the VSX context, this broke backwards
compatibly on swapcontext.  swapcontext only compares the ucontext size
passed in from the user to the new kernel ucontext size.

This adds a check against the old ucontext size (with VMX but without
VSX).  It also adds some sanity check for ucontexts without VSX, but
where VSX is used according the MSR.  Fixes for both 32 and 64bit
processes on 64bit kernels

Kudos to Paulus for noticing.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c