search for: eip_limit

Displaying 15 results from an estimated 15 matches for "eip_limit".

2007 Apr 18
2
[PATCH 19/21] i386 Kprobes semaphore fix
...* disable pre-emption to reading the GDT, and must take the LDT semaphore + * for LDT segments. The fast path handles standard kernel and user CS + * as well as V8086 mode. + */ +unsigned long convert_eip_to_linear_slow(unsigned long eip, unsigned long seg, + mm_context_t *context, unsigned long *eip_limit) { - unsigned long addr, seg; + unsigned long base, seg_limit; + u32 seg_ar; + struct desc_struct *desc; + unsigned long flags; - addr = regs->eip; - seg = regs->xcs & 0xffff; - if (regs->eflags & VM_MASK) { - addr = (addr & 0xffff) + (seg << 4); - return addr; + if...
2007 Apr 18
2
[PATCH 19/21] i386 Kprobes semaphore fix
...* disable pre-emption to reading the GDT, and must take the LDT semaphore + * for LDT segments. The fast path handles standard kernel and user CS + * as well as V8086 mode. + */ +unsigned long convert_eip_to_linear_slow(unsigned long eip, unsigned long seg, + mm_context_t *context, unsigned long *eip_limit) { - unsigned long addr, seg; + unsigned long base, seg_limit; + u32 seg_ar; + struct desc_struct *desc; + unsigned long flags; - addr = regs->eip; - seg = regs->xcs & 0xffff; - if (regs->eflags & VM_MASK) { - addr = (addr & 0xffff) + (seg << 4); - return addr; + if...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...e <asm/uaccess.h> #include <asm/desc.h> #include <asm/kdebug.h> +#include <asm/segment.h> extern void die(const char *,struct pt_regs *,long); @@ -119,10 +120,10 @@ static inline unsigned long get_segment_ } /* The standard kernel/user address space limit. */ - *eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg; + *eip_limit = user_mode(regs) ? USER_DS.seg : KERNEL_DS.seg; /* By far the most common cases. */ - if (likely(seg == __USER_CS || seg == __KERNEL_CS)) + if (likely(SEGMENT_IS_FLAT_CODE(seg))) return eip; /* Check the segment exists, is wit...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...e <asm/uaccess.h> #include <asm/desc.h> #include <asm/kdebug.h> +#include <asm/segment.h> extern void die(const char *,struct pt_regs *,long); @@ -119,10 +120,10 @@ static inline unsigned long get_segment_ } /* The standard kernel/user address space limit. */ - *eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg; + *eip_limit = user_mode(regs) ? USER_DS.seg : KERNEL_DS.seg; /* By far the most common cases. */ - if (likely(seg == __USER_CS || seg == __KERNEL_CS)) + if (likely(SEGMENT_IS_FLAT_CODE(seg))) return eip; /* Check the segment exists, is wit...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...ault.c 2005-08-08 13:59:07.000000000 -0700 @@ -75,7 +75,8 @@ { unsigned long eip = regs->eip; unsigned seg = regs->xcs & 0xffff; - u32 seg_ar, seg_limit, base, *desc; + u32 seg_ar, seg_limit, base; + struct desc_struct *desc; /* The standard kernel/user address space limit. */ *eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg; @@ -101,19 +102,17 @@ /* Get the GDT/LDT descriptor base. When you look for races in this code remember that LDT and other horrors are only used in user space. */ - if (seg & (1<<2)) { + if (segment_is_ldt(seg)) { /* Must lock...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...ault.c 2005-08-08 13:59:07.000000000 -0700 @@ -75,7 +75,8 @@ { unsigned long eip = regs->eip; unsigned seg = regs->xcs & 0xffff; - u32 seg_ar, seg_limit, base, *desc; + u32 seg_ar, seg_limit, base; + struct desc_struct *desc; /* The standard kernel/user address space limit. */ *eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg; @@ -101,19 +102,17 @@ /* Get the GDT/LDT descriptor base. When you look for races in this code remember that LDT and other horrors are only used in user space. */ - if (seg & (1<<2)) { + if (segment_is_ldt(seg)) { /* Must lock...
2007 Apr 18
1
[PATCH 7/14] i386 / Add some descriptor convenience functions
...ault.c 2005-08-10 20:42:04.000000000 -0700 @@ -75,7 +75,8 @@ { unsigned long eip = regs->eip; unsigned seg = regs->xcs & 0xffff; - u32 seg_ar, seg_limit, base, *desc; + u32 seg_ar, seg_limit, base; + struct desc_struct *desc; /* The standard kernel/user address space limit. */ *eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg; @@ -108,12 +109,12 @@ desc = (void *)desc + (seg & ~7); } else { /* Must disable preemption while reading the GDT. */ - desc = (u32 *)&per_cpu(cpu_gdt_table, get_cpu()); + desc = per_cpu(cpu_gdt_table, get_cpu()); desc = (void *)de...
2007 Apr 18
1
[PATCH 7/14] i386 / Add some descriptor convenience functions
...ault.c 2005-08-10 20:42:04.000000000 -0700 @@ -75,7 +75,8 @@ { unsigned long eip = regs->eip; unsigned seg = regs->xcs & 0xffff; - u32 seg_ar, seg_limit, base, *desc; + u32 seg_ar, seg_limit, base; + struct desc_struct *desc; /* The standard kernel/user address space limit. */ *eip_limit = (seg & 3) ? USER_DS.seg : KERNEL_DS.seg; @@ -108,12 +109,12 @@ desc = (void *)desc + (seg & ~7); } else { /* Must disable preemption while reading the GDT. */ - desc = (u32 *)&per_cpu(cpu_gdt_table, get_cpu()); + desc = per_cpu(cpu_gdt_table, get_cpu()); desc = (void *)de...
2007 Apr 18
8
[patch 0/8] Basic infrastructure patches for a paravirtualized kernel
Hi Andrew, This series of patches lays the basic ground work for the paravirtualized kernel patches coming later on. I think this lot is ready for the rough-and-tumble world of the -mm tree. The main change from the last posting is that all the page-table related patches have been moved out, and will be posted separately. Also, the off-by-one in reserving the top of address space has been
2007 Apr 18
8
[patch 0/8] Basic infrastructure patches for a paravirtualized kernel
Hi Andrew, This series of patches lays the basic ground work for the paravirtualized kernel patches coming later on. I think this lot is ready for the rough-and-tumble world of the -mm tree. The main change from the last posting is that all the page-table related patches have been moved out, and will be posted separately. Also, the off-by-one in reserving the top of address space has been
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It didn't make it onto any of the lists it should have. -J ] Hi Andrew, This series of patches lays the basic ground work for the paravirtualized kernel patches coming later on. I think this lot is ready for the rough-and-tumble world of the -mm tree. For the most part, these patches do nothing or very little. The patches should
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It didn't make it onto any of the lists it should have. -J ] Hi Andrew, This series of patches lays the basic ground work for the paravirtualized kernel patches coming later on. I think this lot is ready for the rough-and-tumble world of the -mm tree. For the most part, these patches do nothing or very little. The patches should
2007 Apr 18
43
[RFC PATCH 00/35] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor. Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths
2007 Apr 18
43
[RFC PATCH 00/35] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor. Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths
2007 Apr 18
33
[RFC PATCH 00/33] Xen i386 paravirtualization support
Unlike full virtualization in which the virtual machine provides the same platform interface as running natively on the hardware, paravirtualization requires modification to the guest operating system to work with the platform interface provided by the hypervisor. Xen was designed with performance in mind. Calls to the hypervisor are minimized, batched if necessary, and non-critical codepaths