diff options
author | Cyril Bur <cyrilbur@gmail.com> | 2016-09-23 16:18:12 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-10-04 16:43:07 +1100 |
commit | d11994314b2bfe028bc39be24b44298787925160 (patch) | |
tree | 09bf53fd6dfb5958d20f2cc2ab0849a8df17c911 /include/linux/mmu_notifier.h | |
parent | e909fb83d39292679118761426d7784715ad79ad (diff) | |
download | blackbird-op-linux-d11994314b2bfe028bc39be24b44298787925160.tar.gz blackbird-op-linux-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 'include/linux/mmu_notifier.h')
0 files changed, 0 insertions, 0 deletions