1 // SPDX-License-Identifier: GPL-2.0
8 #define __FRAME_OFFSETS
9 #include <linux/ptrace.h>
10 #include <asm/types.h>
11 #include <linux/kbuild.h>
13 #define DEFINE_LONGS(sym, val) \
14 COMMENT(#val " / sizeof(unsigned long)"); \
15 DEFINE(sym, val / sizeof(unsigned long))
20 DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_fpregs_struct));
21 DEFINE_LONGS(HOST_FPX_SIZE, sizeof(struct user_fpxregs_struct));
24 DEFINE(HOST_SP, UESP);
25 DEFINE(HOST_EFLAGS, EFL);
39 DEFINE(HOST_ORIG_AX, ORIG_EAX);
41 #ifdef FP_XSTATE_MAGIC1
42 DEFINE_LONGS(HOST_FP_SIZE, 2696);
44 DEFINE(HOST_FP_SIZE, sizeof(struct _fpstate) / sizeof(unsigned long));
46 DEFINE_LONGS(HOST_BX, RBX);
47 DEFINE_LONGS(HOST_CX, RCX);
48 DEFINE_LONGS(HOST_DI, RDI);
49 DEFINE_LONGS(HOST_SI, RSI);
50 DEFINE_LONGS(HOST_DX, RDX);
51 DEFINE_LONGS(HOST_BP, RBP);
52 DEFINE_LONGS(HOST_AX, RAX);
53 DEFINE_LONGS(HOST_R8, R8);
54 DEFINE_LONGS(HOST_R9, R9);
55 DEFINE_LONGS(HOST_R10, R10);
56 DEFINE_LONGS(HOST_R11, R11);
57 DEFINE_LONGS(HOST_R12, R12);
58 DEFINE_LONGS(HOST_R13, R13);
59 DEFINE_LONGS(HOST_R14, R14);
60 DEFINE_LONGS(HOST_R15, R15);
61 DEFINE_LONGS(HOST_ORIG_AX, ORIG_RAX);
62 DEFINE_LONGS(HOST_CS, CS);
63 DEFINE_LONGS(HOST_SS, SS);
64 DEFINE_LONGS(HOST_EFLAGS, EFLAGS);
66 DEFINE_LONGS(HOST_FS, FS);
67 DEFINE_LONGS(HOST_GS, GS);
68 DEFINE_LONGS(HOST_DS, DS);
69 DEFINE_LONGS(HOST_ES, ES);
72 DEFINE_LONGS(HOST_IP, RIP);
73 DEFINE_LONGS(HOST_SP, RSP);
76 DEFINE(UM_FRAME_SIZE, sizeof(struct user_regs_struct));
77 DEFINE(UM_POLLIN, POLLIN);
78 DEFINE(UM_POLLPRI, POLLPRI);
79 DEFINE(UM_POLLOUT, POLLOUT);
81 DEFINE(UM_PROT_READ, PROT_READ);
82 DEFINE(UM_PROT_WRITE, PROT_WRITE);
83 DEFINE(UM_PROT_EXEC, PROT_EXEC);