direct-io.hg
changeset 372:93721e4cec72
bitkeeper revision 1.174.1.1 (3e9da471qg3yz_feoqPtr18G7aJ8UA)
ptrace.h, traps.c:
Fix ring privilege checking in Xenolinux (OS runs in ring 1, not ring 0).
ptrace.h, traps.c:
Fix ring privilege checking in Xenolinux (OS runs in ring 1, not ring 0).
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Wed Apr 16 18:44:01 2003 +0000 (2003-04-16) |
parents | 95c43a4b6685 |
children | c3eb2a837ee5 |
files | xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/traps.c xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ptrace.h |
line diff
1.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/traps.c Wed Apr 16 17:45:20 2003 +0000 1.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/traps.c Wed Apr 16 18:44:01 2003 +0000 1.3 @@ -364,7 +364,7 @@ asmlinkage void do_debug(struct pt_regs 1.4 /* If this is a kernel mode trap, save the user PC on entry to 1.5 * the kernel, that's what the debugger can make sense of. 1.6 */ 1.7 - info.si_addr = ((regs->xcs & 3) == 0) ? (void *)tsk->thread.eip : 1.8 + info.si_addr = ((regs->xcs & 2) == 0) ? (void *)tsk->thread.eip : 1.9 (void *)regs->eip; 1.10 force_sig_info(SIGTRAP, &info, tsk); 1.11
2.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ptrace.h Wed Apr 16 17:45:20 2003 +0000 2.2 +++ b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ptrace.h Wed Apr 16 18:44:01 2003 +0000 2.3 @@ -55,7 +55,7 @@ struct pt_regs { 2.4 #define PTRACE_O_TRACESYSGOOD 0x00000001 2.5 2.6 #ifdef __KERNEL__ 2.7 -#define user_mode(regs) ((regs) && (3 & (regs)->xcs)) 2.8 +#define user_mode(regs) ((regs) && (2 & (regs)->xcs)) 2.9 #define instruction_pointer(regs) ((regs) ? (regs)->eip : NULL) 2.10 extern void show_regs(struct pt_regs *); 2.11 #endif