search for: convert_eip_to_linear

Displaying 6 results from an estimated 6 matches for "convert_eip_to_linear".

2007 Apr 18
2
[PATCH 19/21] i386 Kprobes semaphore fix
...context.ldt); - addr = (kprobe_opcode_t *) (get_desc_base(lp) + regs->eip - - sizeof(kprobe_opcode_t)); - } else { - addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); - } - /* Check we're not actually recursing */ - if (kprobe_running()) { + addr = (kprobe_opcode_t *)convert_eip_to_linear(regs, + regs->eip - sizeof(kprobe_opcode_t), + &current->mm->context, &limit); + + /* Don't let userspace races re-address into kernel space */ + if ((unsigned long)addr > limit) + return 0; + + /* We're in an interrupt, but this is clear and BUG()-safe. */ +...
2007 Apr 18
2
[PATCH 19/21] i386 Kprobes semaphore fix
...context.ldt); - addr = (kprobe_opcode_t *) (get_desc_base(lp) + regs->eip - - sizeof(kprobe_opcode_t)); - } else { - addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); - } - /* Check we're not actually recursing */ - if (kprobe_running()) { + addr = (kprobe_opcode_t *)convert_eip_to_linear(regs, + regs->eip - sizeof(kprobe_opcode_t), + &current->mm->context, &limit); + + /* Don't let userspace races re-address into kernel space */ + if ((unsigned long)addr > limit) + return 0; + + /* We're in an interrupt, but this is clear and BUG()-safe. */ +...
2007 Apr 18
0
[PATCH 17/21] i386 Ldt cleanups 1
....14-zach-work.orig/arch/i386/kernel/ptrace.c 2005-11-04 18:30:27.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/ptrace.c 2005-11-05 00:28:04.000000000 -0800 @@ -146,8 +146,6 @@ static unsigned long getreg(struct task_ return retval; } -#define LDT_SEGMENT 4 - static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_regs *regs) { unsigned long addr, seg; Index: linux-2.6.14-zach-work/include/asm-i386/segment.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/segment.h 2005-11-04 15:46:51.000000000 -0800...
2007 Apr 18
0
[PATCH 17/21] i386 Ldt cleanups 1
....14-zach-work.orig/arch/i386/kernel/ptrace.c 2005-11-04 18:30:27.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/ptrace.c 2005-11-05 00:28:04.000000000 -0800 @@ -146,8 +146,6 @@ static unsigned long getreg(struct task_ return retval; } -#define LDT_SEGMENT 4 - static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_regs *regs) { unsigned long addr, seg; Index: linux-2.6.14-zach-work/include/asm-i386/segment.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/segment.h 2005-11-04 15:46:51.000000000 -0800...
2007 Apr 18
1
[PATCH 6/14] i386 / Add some segment convenience functions
...=============================================== --- linux-2.6.13.orig/arch/i386/kernel/ptrace.c 2005-08-09 19:36:36.000000000 -0700 +++ linux-2.6.13/arch/i386/kernel/ptrace.c 2005-08-10 20:40:51.000000000 -0700 @@ -146,8 +146,6 @@ return retval; } -#define LDT_SEGMENT 4 - static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_regs *regs) { unsigned long addr, seg; @@ -165,7 +163,7 @@ * TLS segments are used for data, and the PNPBIOS * and APM bios ones we just ignore here. */ - if (seg & LDT_SEGMENT) { + if (segment_from_ldt(seg)) { u32 *desc; unsigned long base...
2007 Apr 18
1
[PATCH 6/14] i386 / Add some segment convenience functions
...=============================================== --- linux-2.6.13.orig/arch/i386/kernel/ptrace.c 2005-08-09 19:36:36.000000000 -0700 +++ linux-2.6.13/arch/i386/kernel/ptrace.c 2005-08-10 20:40:51.000000000 -0700 @@ -146,8 +146,6 @@ return retval; } -#define LDT_SEGMENT 4 - static unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_regs *regs) { unsigned long addr, seg; @@ -165,7 +163,7 @@ * TLS segments are used for data, and the PNPBIOS * and APM bios ones we just ignore here. */ - if (seg & LDT_SEGMENT) { + if (segment_from_ldt(seg)) { u32 *desc; unsigned long base...