aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-09-05 03:32:37 -0400
committerIngo Molnar <mingo@kernel.org>2015-09-08 04:03:57 -0400
commit2d057c69e743bfb88f1259ddbf1b1160bdd850e5 (patch)
treea1bb8896228666ad0c8827f99c36b333f31eb1d0
parent86e9fc3a0ecdd3c21a938e325daf462ca1724f68 (diff)
x86/headers: Clean up the kernel's struct sigcontext types to be ABI-clean
Use the __u16/32/64 types we standardized on in ABI definitions and which other sigcontext related types are already using. This will help unify struct sigcontext types between native 32-bit, compat and 64-bit kernels. Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1441438363-9999-10-git-send-email-mingo@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/include/asm/sigcontext.h104
1 files changed, 52 insertions, 52 deletions
diff --git a/arch/x86/include/asm/sigcontext.h b/arch/x86/include/asm/sigcontext.h
index 9dfce4e0417d..b9c2bd6402df 100644
--- a/arch/x86/include/asm/sigcontext.h
+++ b/arch/x86/include/asm/sigcontext.h
@@ -5,25 +5,25 @@
5 5
6#ifdef __i386__ 6#ifdef __i386__
7struct sigcontext { 7struct sigcontext {
8 unsigned short gs, __gsh; 8 __u16 gs, __gsh;
9 unsigned short fs, __fsh; 9 __u16 fs, __fsh;
10 unsigned short es, __esh; 10 __u16 es, __esh;
11 unsigned short ds, __dsh; 11 __u16 ds, __dsh;
12 unsigned long di; 12 __u32 di;
13 unsigned long si; 13 __u32 si;
14 unsigned long bp; 14 __u32 bp;
15 unsigned long sp; 15 __u32 sp;
16 unsigned long bx; 16 __u32 bx;
17 unsigned long dx; 17 __u32 dx;
18 unsigned long cx; 18 __u32 cx;
19 unsigned long ax; 19 __u32 ax;
20 unsigned long trapno; 20 __u32 trapno;
21 unsigned long err; 21 __u32 err;
22 unsigned long ip; 22 __u32 ip;
23 unsigned short cs, __csh; 23 __u16 cs, __csh;
24 unsigned long flags; 24 __u32 flags;
25 unsigned long sp_at_signal; 25 __u32 sp_at_signal;
26 unsigned short ss, __ssh; 26 __u16 ss, __ssh;
27 27
28 /* 28 /*
29 * fpstate is really (struct _fpstate *) or (struct _xstate *) 29 * fpstate is really (struct _fpstate *) or (struct _xstate *)
@@ -32,38 +32,38 @@ struct sigcontext {
32 * of extended memory layout. See comments at the definition of 32 * of extended memory layout. See comments at the definition of
33 * (struct _fpx_sw_bytes) 33 * (struct _fpx_sw_bytes)
34 */ 34 */
35 void __user *fpstate; /* zero when no FPU/extended context */ 35 void __user *fpstate; /* Zero when no FPU/extended context */
36 unsigned long oldmask; 36 __u32 oldmask;
37 unsigned long cr2; 37 __u32 cr2;
38}; 38};
39#else /* __i386__ */ 39#else /* __x86_64__: */
40struct sigcontext { 40struct sigcontext {
41 unsigned long r8; 41 __u64 r8;
42 unsigned long r9; 42 __u64 r9;
43 unsigned long r10; 43 __u64 r10;
44 unsigned long r11; 44 __u64 r11;
45 unsigned long r12; 45 __u64 r12;
46 unsigned long r13; 46 __u64 r13;
47 unsigned long r14; 47 __u64 r14;
48 unsigned long r15; 48 __u64 r15;
49 unsigned long di; 49 __u64 di;
50 unsigned long si; 50 __u64 si;
51 unsigned long bp; 51 __u64 bp;
52 unsigned long bx; 52 __u64 bx;
53 unsigned long dx; 53 __u64 dx;
54 unsigned long ax; 54 __u64 ax;
55 unsigned long cx; 55 __u64 cx;
56 unsigned long sp; 56 __u64 sp;
57 unsigned long ip; 57 __u64 ip;
58 unsigned long flags; 58 __u64 flags;
59 unsigned short cs; 59 __u16 cs;
60 unsigned short gs; 60 __u16 gs;
61 unsigned short fs; 61 __u16 fs;
62 unsigned short __pad0; 62 __u16 __pad0;
63 unsigned long err; 63 __u64 err;
64 unsigned long trapno; 64 __u64 trapno;
65 unsigned long oldmask; 65 __u64 oldmask;
66 unsigned long cr2; 66 __u64 cr2;
67 67
68 /* 68 /*
69 * fpstate is really (struct _fpstate *) or (struct _xstate *) 69 * fpstate is really (struct _fpstate *) or (struct _xstate *)
@@ -72,8 +72,8 @@ struct sigcontext {
72 * of extended memory layout. See comments at the definition of 72 * of extended memory layout. See comments at the definition of
73 * (struct _fpx_sw_bytes) 73 * (struct _fpx_sw_bytes)
74 */ 74 */
75 void __user *fpstate; /* zero when no FPU/extended context */ 75 void __user *fpstate; /* Zero when no FPU/extended context */
76 unsigned long reserved1[8]; 76 __u64 reserved1[8];
77}; 77};
78#endif /* !__i386__ */ 78#endif /* !__x86_64__ */
79#endif /* _ASM_X86_SIGCONTEXT_H */ 79#endif /* _ASM_X86_SIGCONTEXT_H */