aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/signal.h
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 /arch/powerpc/include/asm/signal.h
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 'arch/powerpc/include/asm/signal.h')
-rw-r--r--arch/powerpc/include/asm/signal.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/signal.h b/arch/powerpc/include/asm/signal.h
index 9322c28aebd2..5ff77722a52d 100644
--- a/arch/powerpc/include/asm/signal.h
+++ b/arch/powerpc/include/asm/signal.h
@@ -5,6 +5,4 @@
#include <uapi/asm/signal.h>
#include <uapi/asm/ptrace.h>
-extern unsigned long get_tm_stackpointer(struct pt_regs *regs);
-
#endif /* _ASM_POWERPC_SIGNAL_H */