summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-10-15 23:01:42 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-19 15:09:04 +1100
commit22a3d03d69dfd3bfc606d1996969820d619b7c27 (patch)
treec57c3d407649feb97509d4e8c87aefd1157e9e65 /arch/powerpc
parenta0e102914aa3f619a5bc68a0d33e17d1788cdf4c (diff)
downloadlinux-stable-22a3d03d69dfd3bfc606d1996969820d619b7c27.tar.gz
linux-stable-22a3d03d69dfd3bfc606d1996969820d619b7c27.tar.bz2
linux-stable-22a3d03d69dfd3bfc606d1996969820d619b7c27.zip
powerpc/uapi: Fix sigcontext definition to use user_pt_regs
My recent patch to split pt_regs between user and kernel missed the usage in struct sigcontext. Because this is a user visible struct it should be using the user visible definition, which when we're building for the kernel is called struct user_pt_regs. As far as I can see this hasn't actually caused a bug (yet), because we don't use the sizeof() the sigcontext->regs anywhere. But we should still fix it to avoid confusion and future bugs. Fixes: 002af9391bfb ("powerpc: Split user/kernel definitions of struct pt_regs") Reported-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/uapi/asm/sigcontext.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/include/uapi/asm/sigcontext.h b/arch/powerpc/include/uapi/asm/sigcontext.h
index 2fbe485acdb4..630aeda56d59 100644
--- a/arch/powerpc/include/uapi/asm/sigcontext.h
+++ b/arch/powerpc/include/uapi/asm/sigcontext.h
@@ -22,7 +22,11 @@ struct sigcontext {
#endif
unsigned long handler;
unsigned long oldmask;
- struct pt_regs __user *regs;
+#ifdef __KERNEL__
+ struct user_pt_regs __user *regs;
+#else
+ struct pt_regs *regs;
+#endif
#ifdef __powerpc64__
elf_gregset_t gp_regs;
elf_fpregset_t fp_regs;