search for: desc_struct

Displaying 20 results from an estimated 251 matches for "desc_struct".

2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi, this is a series of patches that unify the struct desc_struct and friends across x86_64 and i386. As usual, it provides paravirt capabilities as a side-effect for x86_64. I consider the main goal, namely, of unifying the desc_struct, an ongoing effort, being this the beginning. A lot of old code has to be touched to accomplish that. I don't consider th...
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi, this is a series of patches that unify the struct desc_struct and friends across x86_64 and i386. As usual, it provides paravirt capabilities as a side-effect for x86_64. I consider the main goal, namely, of unifying the desc_struct, an ongoing effort, being this the beginning. A lot of old code has to be touched to accomplish that. I don't consider th...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...4) && (current->mm)) { - lp = (unsigned long *) ((unsigned long)((regs->xcs >> 3) * 8) - + (char *) current->mm->context.ldt); - addr = (kprobe_opcode_t *) (get_desc_base(lp) + regs->eip - + if (segment_is_ldt(regs->xcs) && (current->mm)) { + struct desc_struct *desc = &LDT_DESCRIPTOR(regs->xcs); + addr = (kprobe_opcode_t *) (get_desc_base(desc) + regs->eip - sizeof(kprobe_opcode_t)); } else { addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); Index: linux-2.6.13/arch/i386/math-emu/fpu_system.h =====================...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...4) && (current->mm)) { - lp = (unsigned long *) ((unsigned long)((regs->xcs >> 3) * 8) - + (char *) current->mm->context.ldt); - addr = (kprobe_opcode_t *) (get_desc_base(lp) + regs->eip - + if (segment_is_ldt(regs->xcs) && (current->mm)) { + struct desc_struct *desc = &LDT_DESCRIPTOR(regs->xcs); + addr = (kprobe_opcode_t *) (get_desc_base(desc) + regs->eip - sizeof(kprobe_opcode_t)); } else { addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t)); Index: linux-2.6.13/arch/i386/math-emu/fpu_system.h =====================...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...sm-i386/desc.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 17:45:04.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:07.000000000 -0800 @@ -49,20 +49,68 @@ extern struct Xgt_desc_struct idt_descr, extern struct desc_struct default_ldt[]; extern void set_intr_gate(unsigned int irq, void * addr); -#define _set_tssldt_desc(n,addr,limit,type) \ -__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ - "movw %w1,2(%2)\n\t" \ - "rorl $16,%1\n\t" \ - "movb %b...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...sm-i386/desc.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 17:45:04.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:07.000000000 -0800 @@ -49,20 +49,68 @@ extern struct Xgt_desc_struct idt_descr, extern struct desc_struct default_ldt[]; extern void set_intr_gate(unsigned int irq, void * addr); -#define _set_tssldt_desc(n,addr,limit,type) \ -__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ - "movw %w1,2(%2)\n\t" \ - "rorl $16,%1\n\t" \ - "movb %b...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...x: linux-2.6.13/include/asm-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/...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...x: linux-2.6.13/include/asm-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/...
2007 Apr 18
0
[PATCH 18/21] i386 Ldt cleanups 2
...-i386/desc.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 18:10:53.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:03.000000000 -0800 @@ -30,7 +30,24 @@ static inline struct desc_struct *get_cp { return ((struct desc_struct *)cpu_gdt_descr[cpu].address); } - + +static inline int segment_from_ldt(unsigned int segment) +{ + return segment & LDT_SEGMENT; +} + +static inline struct desc_struct *get_gdt_desc(int cpu, unsigned int segment) +{ + char *gdt = (char *)get_cpu_gdt_...
2007 Apr 18
0
[PATCH 18/21] i386 Ldt cleanups 2
...-i386/desc.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/desc.h 2005-11-04 18:10:53.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:03.000000000 -0800 @@ -30,7 +30,24 @@ static inline struct desc_struct *get_cp { return ((struct desc_struct *)cpu_gdt_descr[cpu].address); } - + +static inline int segment_from_ldt(unsigned int segment) +{ + return segment & LDT_SEGMENT; +} + +static inline struct desc_struct *get_gdt_desc(int cpu, unsigned int segment) +{ + char *gdt = (char *)get_cpu_gdt_...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...x: linux-2.6.13/include/asm-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...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...x: linux-2.6.13/include/asm-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...
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...
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...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
....14-rc1/include/asm-i386/desc.h =================================================================== --- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700 +++ linux-2.6.14-rc1/include/asm-i386/desc.h 2005-09-20 18:49:07.000000000 -0700 @@ -17,6 +17,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 { @@ -60,7 +62,7 @@ __asm__ __volatile__...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
....14-rc1/include/asm-i386/desc.h =================================================================== --- linux-2.6.14-rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700 +++ linux-2.6.14-rc1/include/asm-i386/desc.h 2005-09-20 18:49:07.000000000 -0700 @@ -17,6 +17,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 { @@ -60,7 +62,7 @@ __asm__ __volatile__...
2007 Dec 13
2
[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss
...--------------------------- 1 files changed, 17 insertions(+), 38 deletions(-) diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h index 8849666..e302a02 100644 --- a/include/asm-x86/desc.h +++ b/include/asm-x86/desc.h @@ -125,21 +125,6 @@ static inline void native_write_gdt_entry(struct desc_struct *gdt, int entry, memcpy(&gdt[entry], desc, size); } -static inline void set_tssldt_descriptor(struct ldttss_desc64 *d, - unsigned long tss, unsigned type, - unsigned size) -{ - memset(d, 0, sizeof(*d)); - d->limit0 = size & 0xFFFF; - d->base0 = PTR_LOW(tss); - d->bas...
2007 Dec 13
2
[PATCH] avoid ifdefs in desc.h, getting rid of pack_ldt and pack_tss
...--------------------------- 1 files changed, 17 insertions(+), 38 deletions(-) diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h index 8849666..e302a02 100644 --- a/include/asm-x86/desc.h +++ b/include/asm-x86/desc.h @@ -125,21 +125,6 @@ static inline void native_write_gdt_entry(struct desc_struct *gdt, int entry, memcpy(&gdt[entry], desc, size); } -static inline void set_tssldt_descriptor(struct ldttss_desc64 *d, - unsigned long tss, unsigned type, - unsigned size) -{ - memset(d, 0, sizeof(*d)); - d->limit0 = size & 0xFFFF; - d->base0 = PTR_LOW(tss); - d->bas...
2007 Apr 18
1
[PATCH 7/14] i386 / Add some descriptor convenience functions
...000000 -0700 @@ -14,6 +14,28 @@ #include <asm/mmu.h> +#define desc_empty(desc) \ + (!((desc)->a + (desc)->b)) + +#define desc_equal(desc1, desc2) \ + (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) + +static inline unsigned long get_desc_base(struct desc_struct *desc) +{ + unsigned long base; + base = ((desc->a >> 16) & 0x0000ffff) | + ((desc->b << 16) & 0x00ff0000) | + (desc->b & 0xff000000); + return base; +} + +static inline unsigned long get_desc_limit(struct desc_struct *desc) +{ + unsigned long limit; + limit = (d...
2007 Apr 18
1
[PATCH 7/14] i386 / Add some descriptor convenience functions
...000000 -0700 @@ -14,6 +14,28 @@ #include <asm/mmu.h> +#define desc_empty(desc) \ + (!((desc)->a + (desc)->b)) + +#define desc_equal(desc1, desc2) \ + (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) + +static inline unsigned long get_desc_base(struct desc_struct *desc) +{ + unsigned long base; + base = ((desc->a >> 16) & 0x0000ffff) | + ((desc->b << 16) & 0x00ff0000) | + (desc->b & 0xff000000); + return base; +} + +static inline unsigned long get_desc_limit(struct desc_struct *desc) +{ + unsigned long limit; + limit = (d...