search for: prepare_protected_seg

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

2007 Apr 18
0
[PATCH 8/21] i386 Segment protect properly
...================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 17:45:02.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:08.000000000 -0800 @@ -158,6 +158,15 @@ static inline unsigned long get_desc_bas return base; } +static inline void prepare_protected_segment(int cpu, int gdt_entry, void *base, u32 size) +{ + struct desc_struct *gdt = get_cpu_gdt_table(cpu); + + /* Forced zero-length segments to 1-byte access at unmapped page zero */ + set_base(gdt[gdt_entry], size > 0 ? (u32)base : 0); + set_limit(gdt[gdt_entry], size > 0 ? size - 1 : 0); +}...
2007 Apr 18
0
[PATCH 8/21] i386 Segment protect properly
...================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 17:45:02.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:08.000000000 -0800 @@ -158,6 +158,15 @@ static inline unsigned long get_desc_bas return base; } +static inline void prepare_protected_segment(int cpu, int gdt_entry, void *base, u32 size) +{ + struct desc_struct *gdt = get_cpu_gdt_table(cpu); + + /* Forced zero-length segments to 1-byte access at unmapped page zero */ + set_base(gdt[gdt_entry], size > 0 ? (u32)base : 0); + set_limit(gdt[gdt_entry], size > 0 ? size - 1 : 0); +}...
2007 Apr 18
0
[PATCH 10/21] i386 Use protected segment for 16bit stack
Use prepare_protected_segment macro to set up the 16-bit stack. Whee!! This code is almost readable now. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c =================================================================== --- linux-2.6.14-zach-work.orig/arch...
2007 Apr 18
0
[PATCH 10/21] i386 Use protected segment for 16bit stack
Use prepare_protected_segment macro to set up the 16-bit stack. Whee!! This code is almost readable now. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c =================================================================== --- linux-2.6.14-zach-work.orig/arch...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...load_LDT(mm_context_t put_cpu(); } -static inline unsigned long get_desc_base(unsigned long *desc) -{ - unsigned long base; - base = ((desc[0] >> 16) & 0x0000ffff) | - ((desc[1] << 16) & 0x00ff0000) | - (desc[1] & 0xff000000); - return base; -} - static inline void prepare_protected_segment(int cpu, int gdt_entry, void *base, u32 size) { struct desc_struct *gdt = get_cpu_gdt_table(cpu); /* Forced zero-length segments to 1-byte access at unmapped page zero */ - set_base(gdt[gdt_entry], size > 0 ? (u32)base : 0); - set_limit(gdt[gdt_entry], size > 0 ? size - 1 : 0); + s...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...load_LDT(mm_context_t put_cpu(); } -static inline unsigned long get_desc_base(unsigned long *desc) -{ - unsigned long base; - base = ((desc[0] >> 16) & 0x0000ffff) | - ((desc[1] << 16) & 0x00ff0000) | - (desc[1] & 0xff000000); - return base; -} - static inline void prepare_protected_segment(int cpu, int gdt_entry, void *base, u32 size) { struct desc_struct *gdt = get_cpu_gdt_table(cpu); /* Forced zero-length segments to 1-byte access at unmapped page zero */ - set_base(gdt[gdt_entry], size > 0 ? (u32)base : 0); - set_limit(gdt[gdt_entry], size > 0 ? size - 1 : 0); + s...