mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
ed596cde94
This reverts commits9a036b93a3
("x86/signal/64: Remove 'fs' and 'gs' from sigcontext") andc6f2062935
("x86/signal/64: Fix SS handling for signals delivered to 64-bit programs"). They were cleanups, but they break dosemu by changing the signal return behavior (and removing 'fs' and 'gs' from the sigcontext struct - while not actually changing any behavior - causes build problems). Reported-and-tested-by: Stas Sergeev <stsp@list.ru> Acked-by: Andy Lutomirski <luto@amacapital.net> Cc: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
80 lines
1.9 KiB
C
80 lines
1.9 KiB
C
#ifndef _ASM_X86_SIGCONTEXT_H
|
|
#define _ASM_X86_SIGCONTEXT_H
|
|
|
|
#include <uapi/asm/sigcontext.h>
|
|
|
|
#ifdef __i386__
|
|
struct sigcontext {
|
|
unsigned short gs, __gsh;
|
|
unsigned short fs, __fsh;
|
|
unsigned short es, __esh;
|
|
unsigned short ds, __dsh;
|
|
unsigned long di;
|
|
unsigned long si;
|
|
unsigned long bp;
|
|
unsigned long sp;
|
|
unsigned long bx;
|
|
unsigned long dx;
|
|
unsigned long cx;
|
|
unsigned long ax;
|
|
unsigned long trapno;
|
|
unsigned long err;
|
|
unsigned long ip;
|
|
unsigned short cs, __csh;
|
|
unsigned long flags;
|
|
unsigned long sp_at_signal;
|
|
unsigned short ss, __ssh;
|
|
|
|
/*
|
|
* fpstate is really (struct _fpstate *) or (struct _xstate *)
|
|
* depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
|
|
* bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
|
|
* of extended memory layout. See comments at the definition of
|
|
* (struct _fpx_sw_bytes)
|
|
*/
|
|
void __user *fpstate; /* zero when no FPU/extended context */
|
|
unsigned long oldmask;
|
|
unsigned long cr2;
|
|
};
|
|
#else /* __i386__ */
|
|
struct sigcontext {
|
|
unsigned long r8;
|
|
unsigned long r9;
|
|
unsigned long r10;
|
|
unsigned long r11;
|
|
unsigned long r12;
|
|
unsigned long r13;
|
|
unsigned long r14;
|
|
unsigned long r15;
|
|
unsigned long di;
|
|
unsigned long si;
|
|
unsigned long bp;
|
|
unsigned long bx;
|
|
unsigned long dx;
|
|
unsigned long ax;
|
|
unsigned long cx;
|
|
unsigned long sp;
|
|
unsigned long ip;
|
|
unsigned long flags;
|
|
unsigned short cs;
|
|
unsigned short gs;
|
|
unsigned short fs;
|
|
unsigned short __pad0;
|
|
unsigned long err;
|
|
unsigned long trapno;
|
|
unsigned long oldmask;
|
|
unsigned long cr2;
|
|
|
|
/*
|
|
* fpstate is really (struct _fpstate *) or (struct _xstate *)
|
|
* depending on the FP_XSTATE_MAGIC1 encoded in the SW reserved
|
|
* bytes of (struct _fpstate) and FP_XSTATE_MAGIC2 present at the end
|
|
* of extended memory layout. See comments at the definition of
|
|
* (struct _fpx_sw_bytes)
|
|
*/
|
|
void __user *fpstate; /* zero when no FPU/extended context */
|
|
unsigned long reserved1[8];
|
|
};
|
|
#endif /* !__i386__ */
|
|
#endif /* _ASM_X86_SIGCONTEXT_H */
|