X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-um%2Fptrace-i386.h;h=6e2528bb0083ee4039cc30a5f3ee5aae3bb67e79;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=9e47590ec293b7c9e444f8fd02e0ffd9f3f3b942;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h index 9e47590ec..6e2528bb0 100644 --- a/include/asm-um/ptrace-i386.h +++ b/include/asm-um/ptrace-i386.h @@ -6,8 +6,13 @@ #ifndef __UM_PTRACE_I386_H #define __UM_PTRACE_I386_H +#define HOST_AUDIT_ARCH AUDIT_ARCH_I386 + +#include "linux/compiler.h" #include "sysdep/ptrace.h" #include "asm/ptrace-generic.h" +#include "asm/host_ldt.h" +#include "choose-mode.h" #define PT_REGS_EAX(r) UPT_EAX(&(r)->regs) #define PT_REGS_EBX(r) UPT_EBX(&(r)->regs) @@ -30,17 +35,40 @@ #define PT_REGS_SYSCALL_RET(r) PT_REGS_EAX(r) #define PT_FIX_EXEC_STACK(sp) do ; while(0) +/* Cope with a conditional i386 definition. */ +#undef profile_pc +#define profile_pc(regs) PT_REGS_IP(regs) + #define user_mode(r) UPT_IS_USER(&(r)->regs) -#endif +extern int ptrace_get_thread_area(struct task_struct *child, int idx, + struct user_desc __user *user_desc); -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ +extern int ptrace_set_thread_area(struct task_struct *child, int idx, + struct user_desc __user *user_desc); + +extern int do_set_thread_area_skas(struct user_desc *info); +extern int do_get_thread_area_skas(struct user_desc *info); + +extern int do_set_thread_area_tt(struct user_desc *info); +extern int do_get_thread_area_tt(struct user_desc *info); + +extern int arch_switch_tls_skas(struct task_struct *from, struct task_struct *to); +extern int arch_switch_tls_tt(struct task_struct *from, struct task_struct *to); + +extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); +extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); + +static inline int do_get_thread_area(struct user_desc *info) +{ + return CHOOSE_MODE_PROC(do_get_thread_area_tt, do_get_thread_area_skas, info); +} + +static inline int do_set_thread_area(struct user_desc *info) +{ + return CHOOSE_MODE_PROC(do_set_thread_area_tt, do_set_thread_area_skas, info); +} + +struct task_struct; + +#endif