search for: gdt_entri

Displaying 20 results from an estimated 113 matches for "gdt_entri".

Did you mean: gdt_entry
2007 Apr 18
2
[PATCH 3/3] Gdt page isolation
...=========================================== --- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 20:19:57.000000000 -0700 +++ linux-2.6.14-rc1/include/asm-i386/desc.h 2005-09-20 20:20:50.000000000 -0700 @@ -15,9 +15,6 @@ #include <asm/mmu.h> extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); - -#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); @@ -29,6 +26,8 @@ struct Xgt_desc_struct { extern struct Xgt_desc_struct idt_descr, c...
2007 Apr 18
2
[PATCH 3/3] Gdt page isolation
...=========================================== --- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 20:19:57.000000000 -0700 +++ linux-2.6.14-rc1/include/asm-i386/desc.h 2005-09-20 20:20:50.000000000 -0700 @@ -15,9 +15,6 @@ #include <asm/mmu.h> extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); - -#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); @@ -29,6 +26,8 @@ struct Xgt_desc_struct { extern struct Xgt_desc_struct idt_descr, c...
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
...=============================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 17:45:31.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:06.000000000 -0800 @@ -15,9 +15,6 @@ #include <asm/mmu.h> extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); - -#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); @@ -29,6 +26,11 @@ struct Xgt_desc_struct { extern struct Xgt_desc_struct idt_descr,...
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
...=============================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 17:45:31.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:06.000000000 -0800 @@ -15,9 +15,6 @@ #include <asm/mmu.h> extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); - -#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); @@ -29,6 +26,11 @@ struct Xgt_desc_struct { extern struct Xgt_desc_struct idt_descr,...
2007 Apr 18
1
[PATCH 0/7] Using %gs for per-cpu areas on x86
OK, here it is. Benchmarks still coming. This is against Andi's 2.6.18-rc7-git3 tree, and replaces the patches between (and not including) i386-pda-asm-offsets and i386-early-fault. One patch is identical, one is mildly modified, the rest are re-implemented but inspired by Jeremy's PDA work. Thanks, Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law
2007 Apr 18
1
[PATCH 0/7] Using %gs for per-cpu areas on x86
OK, here it is. Benchmarks still coming. This is against Andi's 2.6.18-rc7-git3 tree, and replaces the patches between (and not including) i386-pda-asm-offsets and i386-early-fault. One patch is identical, one is mildly modified, the rest are re-implemented but inspired by Jeremy's PDA work. Thanks, Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...ment.h @@ -37,8 +37,14 @@ #define GS_TLS_SEL ((GDT_ENTRY_TLS_MIN+GS_TLS)*8 + 3) #define FS_TLS_SEL ((GDT_ENTRY_TLS_MIN+FS_TLS)*8 + 3) +#define __HV_CS 0x80 /* 16*8 */ +#define __HV_DS 0x88 /* 17*8 */ + +#define GDT_ENTRY_HV_CS 16 +#define GDT_ENTRY_HV_DS 17 + #define IDT_ENTRIES 256 -#define GDT_ENTRIES 16 +#define GDT_ENTRIES 18 #define GDT_SIZE (GDT_ENTRIES * 8) #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) --
2007 Apr 18
0
[PATCH 8/21] i386 Segment protect properly
It is impossible to have a zero length segment in descriptor tables using "normal" segments. One of many ways to properly protect segments to zero length is to map the base to an umapped page. Create a nicer way to do this, and stop subtracting 1 from the length passed to set_limit (note calling set limit with a zero limit does something very bad! - not anymore). Signed-off-by:
2007 Apr 18
0
[PATCH 8/21] i386 Segment protect properly
It is impossible to have a zero length segment in descriptor tables using "normal" segments. One of many ways to properly protect segments to zero length is to map the base to an umapped page. Create a nicer way to do this, and stop subtracting 1 from the length passed to set_limit (note calling set limit with a zero limit does something very bad! - not anymore). Signed-off-by:
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...ment.h @@ -37,8 +37,14 @@ #define GS_TLS_SEL ((GDT_ENTRY_TLS_MIN+GS_TLS)*8 + 3) #define FS_TLS_SEL ((GDT_ENTRY_TLS_MIN+FS_TLS)*8 + 3) +#define __HV_CS 0x80 /* 16*8 */ +#define __HV_DS 0x88 /* 17*8 */ + +#define GDT_ENTRY_HV_CS 16 +#define GDT_ENTRY_HV_DS 17 + #define IDT_ENTRIES 256 -#define GDT_ENTRIES 16 +#define GDT_ENTRIES 18 #define GDT_SIZE (GDT_ENTRIES * 8) #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) --
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
Ancient inline assembler that manipulates descriptor tables is unreadable and has no type checking. Doing this in C actually generates better code, saves code space, and improves readability. The fact that you must cast descriptors to (char *) for the inline assembler to work properly caused me no end of grief working on these patches. Note that GCC does not generate rotations to utilize
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
Ancient inline assembler that manipulates descriptor tables is unreadable and has no type checking. Doing this in C actually generates better code, saves code space, and improves readability. The fact that you must cast descriptors to (char *) for the inline assembler to work properly caused me no end of grief working on these patches. Note that GCC does not generate rotations to utilize
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...m-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-09 20:17:21.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-10 20:41:03.000000000 -0700 @@ -39,6 +39,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...m-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-09 20:17:21.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-10 20:41:03.000000000 -0700 @@ -39,6 +39,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...+14,10 @@ #include <asm/mmu.h> +#define desc_number(_selector) ((_selector) >> 3) +#define segment_is_ldt(_selector) ((_selector) & 4) +#define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[desc_number(s)]) + extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); @@ -96,6 +100,12 @@ (info)->seg_not_present == 1 && \ (info)->useable == 0 ) +static inline void write_ldt_entry(struct desc_struct *ldt, int entry, __u32 entry_a, __u32 entry_b) +{ + ldt[entry].a = entry_a...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...+14,10 @@ #include <asm/mmu.h> +#define desc_number(_selector) ((_selector) >> 3) +#define segment_is_ldt(_selector) ((_selector) & 4) +#define LDT_DESCRIPTOR(s) (((struct desc_struct *)current->mm->context.ldt)[desc_number(s)]) + extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); @@ -96,6 +100,12 @@ (info)->seg_not_present == 1 && \ (info)->useable == 0 ) +static inline void write_ldt_entry(struct desc_struct *ldt, int entry, __u32 entry_a, __u32 entry_b) +{ + ldt[entry].a = entry_a...
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...esc); + info->contents = get_desc_contents(desc); + info->read_exec_only = !get_desc_writable(desc); + info->limit_in_pages = get_desc_gran(desc); + info->seg_not_present = !get_desc_present(desc); + info->useable = get_desc_usable(desc); +} + extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]);
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...esc); + info->contents = get_desc_contents(desc); + info->read_exec_only = !get_desc_writable(desc); + info->limit_in_pages = get_desc_gran(desc); + info->seg_not_present = !get_desc_present(desc); + info->useable = get_desc_usable(desc); +} + extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]);
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...m-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:15:56.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:16:07.000000000 -0700 @@ -21,6 +21,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -68,7 +70,7 @@ static inline void __set_tss_desc(unsi...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...m-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:15:56.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:16:07.000000000 -0700 @@ -21,6 +21,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -68,7 +70,7 @@ static inline void __set_tss_desc(unsi...