signals, ia64, mips: Update arch-specific siginfos with pkeys field
authorDave Hansen <[email protected]>
Wed, 17 Feb 2016 18:17:03 +0000 (10:17 -0800)
committerIngo Molnar <[email protected]>
Thu, 18 Feb 2016 08:32:42 +0000 (09:32 +0100)
ia64 and mips have separate definitions for siginfo from the
generic one.  Patch them to have the pkey fields.

Note that this is exactly what we did for MPX as well.

[ This fixes a compile error that Ingo was hitting with MIPS when the
  x86 pkeys patch set is applied. ]

Signed-off-by: Dave Hansen <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Petr Malat <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/ia64/include/uapi/asm/siginfo.h
arch/mips/include/uapi/asm/siginfo.h

index bce9bc1a66c4c398e2a32babfbe9ba114aad592a..0151cfab929d98e0f26717995158b94e54a4304e 100644 (file)
@@ -63,10 +63,15 @@ typedef struct siginfo {
                        unsigned int _flags;    /* see below */
                        unsigned long _isr;     /* isr */
                        short _addr_lsb;        /* lsb of faulting address */
-                       struct {
-                               void __user *_lower;
-                               void __user *_upper;
-                       } _addr_bnd;
+                       union {
+                               /* used when si_code=SEGV_BNDERR */
+                               struct {
+                                       void __user *_lower;
+                                       void __user *_upper;
+                               } _addr_bnd;
+                               /* used when si_code=SEGV_PKUERR */
+                               u64 _pkey;
+                       };
                } _sigfault;
 
                /* SIGPOLL */
index 2cb7fdead5702a5c8b5f0522e0c9f3e8e4ee96ba..6f4edf0d794ce9c5d4f1a28fb34129b30986b5c5 100644 (file)
@@ -86,10 +86,15 @@ typedef struct siginfo {
                        int _trapno;    /* TRAP # which caused the signal */
 #endif
                        short _addr_lsb;
-                       struct {
-                               void __user *_lower;
-                               void __user *_upper;
-                       } _addr_bnd;
+                       union {
+                               /* used when si_code=SEGV_BNDERR */
+                               struct {
+                                       void __user *_lower;
+                                       void __user *_upper;
+                               } _addr_bnd;
+                               /* used when si_code=SEGV_PKUERR */
+                               u64 _pkey;
+                       };
                } _sigfault;
 
                /* SIGPOLL, SIGXFSZ (To do ...)  */