aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/math/vsx_preempt.c
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2016-09-23 16:18:12 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2016-10-04 16:43:07 +1100
commitd11994314b2bfe028bc39be24b44298787925160 (patch)
tree09bf53fd6dfb5958d20f2cc2ab0849a8df17c911 /tools/testing/selftests/powerpc/math/vsx_preempt.c
parentpowerpc: Never giveup a reclaimed thread when enabling kernel {fp, altivec, vsx} (diff)
downloadlinux-dev-d11994314b2bfe028bc39be24b44298787925160.tar.xz
linux-dev-d11994314b2bfe028bc39be24b44298787925160.zip
powerpc: signals: Stop using current in signal code
Much of the signal code takes a pt_regs on which it operates. Over time the signal code has needed to know more about the thread than what pt_regs can supply, this information is obtained as needed by using 'current'. This approach is not strictly incorrect however it does mean that there is now a hard requirement that the pt_regs being passed around does belong to current, this is never checked. A safer approach is for the majority of the signal functions to take a task_struct from which they can obtain pt_regs and any other information they need. The caveat that the task_struct they are passed must be current doesn't go away but can more easily be checked for. Functions called from outside powerpc signal code are passed a pt_regs and they can confirm that the pt_regs is that of current and pass current to other functions, furthurmore, powerpc signal functions can check that the task_struct they are passed is the same as current avoiding possible corruption of current (or the task they are passed) if this assertion ever fails. CC: paulus@samba.org Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions