~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/um/shared/sysdep/ptrace.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __SYSDEP_X86_PTRACE_H
  3 #define __SYSDEP_X86_PTRACE_H
  4 
  5 #include <generated/user_constants.h>
  6 #include <sysdep/faultinfo.h>
  7 
  8 #define MAX_REG_OFFSET (UM_FRAME_SIZE)
  9 #define MAX_REG_NR ((MAX_REG_OFFSET) / sizeof(unsigned long))
 10 
 11 #define REGS_IP(r) ((r)[HOST_IP])
 12 #define REGS_SP(r) ((r)[HOST_SP])
 13 #define REGS_EFLAGS(r) ((r)[HOST_EFLAGS])
 14 #define REGS_AX(r) ((r)[HOST_AX])
 15 #define REGS_BX(r) ((r)[HOST_BX])
 16 #define REGS_CX(r) ((r)[HOST_CX])
 17 #define REGS_DX(r) ((r)[HOST_DX])
 18 #define REGS_SI(r) ((r)[HOST_SI])
 19 #define REGS_DI(r) ((r)[HOST_DI])
 20 #define REGS_BP(r) ((r)[HOST_BP])
 21 #define REGS_CS(r) ((r)[HOST_CS])
 22 #define REGS_SS(r) ((r)[HOST_SS])
 23 #define REGS_DS(r) ((r)[HOST_DS])
 24 #define REGS_ES(r) ((r)[HOST_ES])
 25 
 26 #define UPT_IP(r) REGS_IP((r)->gp)
 27 #define UPT_SP(r) REGS_SP((r)->gp)
 28 #define UPT_EFLAGS(r) REGS_EFLAGS((r)->gp)
 29 #define UPT_AX(r) REGS_AX((r)->gp)
 30 #define UPT_BX(r) REGS_BX((r)->gp)
 31 #define UPT_CX(r) REGS_CX((r)->gp)
 32 #define UPT_DX(r) REGS_DX((r)->gp)
 33 #define UPT_SI(r) REGS_SI((r)->gp)
 34 #define UPT_DI(r) REGS_DI((r)->gp)
 35 #define UPT_BP(r) REGS_BP((r)->gp)
 36 #define UPT_CS(r) REGS_CS((r)->gp)
 37 #define UPT_SS(r) REGS_SS((r)->gp)
 38 #define UPT_DS(r) REGS_DS((r)->gp)
 39 #define UPT_ES(r) REGS_ES((r)->gp)
 40 
 41 #ifdef __i386__
 42 #include "ptrace_32.h"
 43 #else
 44 #include "ptrace_64.h"
 45 #endif
 46 
 47 struct syscall_args {
 48         unsigned long args[6];
 49 };
 50 
 51 #define SYSCALL_ARGS(r) ((struct syscall_args) \
 52                          { .args = { UPT_SYSCALL_ARG1(r),        \
 53                                      UPT_SYSCALL_ARG2(r),        \
 54                                      UPT_SYSCALL_ARG3(r),        \
 55                                      UPT_SYSCALL_ARG4(r),        \
 56                                      UPT_SYSCALL_ARG5(r),        \
 57                                      UPT_SYSCALL_ARG6(r) } } )
 58 
 59 struct uml_pt_regs {
 60         unsigned long gp[MAX_REG_NR];
 61         unsigned long fp[MAX_FP_NR];
 62         struct faultinfo faultinfo;
 63         long syscall;
 64         int is_user;
 65 };
 66 
 67 #define EMPTY_UML_PT_REGS { }
 68 
 69 #define UPT_SYSCALL_NR(r) ((r)->syscall)
 70 #define UPT_FAULTINFO(r) (&(r)->faultinfo)
 71 #define UPT_IS_USER(r) ((r)->is_user)
 72 
 73 extern int user_context(unsigned long sp);
 74 
 75 #endif /* __SYSDEP_X86_PTRACE_H */
 76 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php