aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2008-10-23 00:42:36 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-17 09:46:16 -0800
commitde1107d35bee044e8f2620e2f396458a10842719 (patch)
treeb1443f3a7a598f0c56e3aa86098451fbcbe47cb7 /arch/powerpc/kernel/vmlinux.lds.S
parentbc6c369cd1e7d71c25d659b5c855b510e312f4b5 (diff)
powerpc: Fix swapcontext system for VSX + old ucontext size
commit 16c29d180becc5bdf92fd0fc7314a44a671b5f4e upstream. Since VSX support was added, we now have two sizes of ucontext_t; the older, smaller size without the extra VSX state, and the new larger size with the extra VSX state. A program using the sys_swapcontext system call and supplying smaller ucontext_t structures will currently get an EINVAL error if the task has used VSX (e.g. because of calling library code that uses VSX) and the old_ctx argument is non-NULL (i.e. the program is asking for its current context to be saved). Thus the program will start getting EINVAL errors on calls that previously worked. This commit changes this behaviour so that we don't send an EINVAL in this case. It will now return the smaller context but the VSX MSR bit will always be cleared to indicate that the ucontext_t doesn't include the extra VSX state, even if the task has executed VSX instructions. Both 32 and 64 bit cases are updated. [paulus@samba.org - also fix some access_ok() and get_user() calls] Thanks to Ben Herrenschmidt for noticing this problem. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/powerpc/kernel/vmlinux.lds.S')
0 files changed, 0 insertions, 0 deletions