Commit 2d057c69 authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarMikko 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.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 86e9fc3a
...@@ -5,25 +5,25 @@ ...@@ -5,25 +5,25 @@
#ifdef __i386__ #ifdef __i386__
struct sigcontext { struct sigcontext {
unsigned short gs, __gsh; __u16 gs, __gsh;
unsigned short fs, __fsh; __u16 fs, __fsh;
unsigned short es, __esh; __u16 es, __esh;
unsigned short ds, __dsh; __u16 ds, __dsh;
unsigned long di; __u32 di;
unsigned long si; __u32 si;
unsigned long bp; __u32 bp;
unsigned long sp; __u32 sp;
unsigned long bx; __u32 bx;
unsigned long dx; __u32 dx;
unsigned long cx; __u32 cx;
unsigned long ax; __u32 ax;
unsigned long trapno; __u32 trapno;
unsigned long err; __u32 err;
unsigned long ip; __u32 ip;
unsigned short cs, __csh; __u16 cs, __csh;
unsigned long flags; __u32 flags;
unsigned long sp_at_signal; __u32 sp_at_signal;
unsigned short ss, __ssh; __u16 ss, __ssh;
/* /*
* fpstate is really (struct _fpstate *) or (struct _xstate *) * fpstate is really (struct _fpstate *) or (struct _xstate *)
...@@ -32,38 +32,38 @@ struct sigcontext { ...@@ -32,38 +32,38 @@ struct sigcontext {
* of extended memory layout. See comments at the definition of * of extended memory layout. See comments at the definition of
* (struct _fpx_sw_bytes) * (struct _fpx_sw_bytes)
*/ */
void __user *fpstate; /* zero when no FPU/extended context */ void __user *fpstate; /* Zero when no FPU/extended context */
unsigned long oldmask; __u32 oldmask;
unsigned long cr2; __u32 cr2;
}; };
#else /* __i386__ */ #else /* __x86_64__: */
struct sigcontext { struct sigcontext {
unsigned long r8; __u64 r8;
unsigned long r9; __u64 r9;
unsigned long r10; __u64 r10;
unsigned long r11; __u64 r11;
unsigned long r12; __u64 r12;
unsigned long r13; __u64 r13;
unsigned long r14; __u64 r14;
unsigned long r15; __u64 r15;
unsigned long di; __u64 di;
unsigned long si; __u64 si;
unsigned long bp; __u64 bp;
unsigned long bx; __u64 bx;
unsigned long dx; __u64 dx;
unsigned long ax; __u64 ax;
unsigned long cx; __u64 cx;
unsigned long sp; __u64 sp;
unsigned long ip; __u64 ip;
unsigned long flags; __u64 flags;
unsigned short cs; __u16 cs;
unsigned short gs; __u16 gs;
unsigned short fs; __u16 fs;
unsigned short __pad0; __u16 __pad0;
unsigned long err; __u64 err;
unsigned long trapno; __u64 trapno;
unsigned long oldmask; __u64 oldmask;
unsigned long cr2; __u64 cr2;
/* /*
* fpstate is really (struct _fpstate *) or (struct _xstate *) * fpstate is really (struct _fpstate *) or (struct _xstate *)
...@@ -72,8 +72,8 @@ struct sigcontext { ...@@ -72,8 +72,8 @@ struct sigcontext {
* of extended memory layout. See comments at the definition of * of extended memory layout. See comments at the definition of
* (struct _fpx_sw_bytes) * (struct _fpx_sw_bytes)
*/ */
void __user *fpstate; /* zero when no FPU/extended context */ void __user *fpstate; /* Zero when no FPU/extended context */
unsigned long reserved1[8]; __u64 reserved1[8];
}; };
#endif /* !__i386__ */ #endif /* !__x86_64__ */
#endif /* _ASM_X86_SIGCONTEXT_H */ #endif /* _ASM_X86_SIGCONTEXT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment