search for: tls_array

Displaying 20 results from an estimated 109 matches for "tls_array".

2007 Apr 18
1
[PATCH 4/12] tls-unnecessary-init
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com Index: linux-2.6.13/include/asm-i386/processor.h ===...
2007 Apr 18
1
[PATCH 4/12] tls-unnecessary-init
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com Index: linux-2.6.13/include/asm-i386/processor.h ===...
2007 Apr 18
1
[PATCH 1/3] Bogus tls from gdt
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-rc1/arch/i386/kernel/cpu/co...
2007 Apr 18
0
[PATCH 3/14] i386 / Remove unnecessary tls init
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Patch-base: 2.6.13-rc5-mm1 Patch-keys: i386 cleanup Signed-off-by: Zachary Amsden <zach@vmware.com...
2007 Apr 18
0
[PATCH 3/14] i386 / Remove unnecessary tls init
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Patch-base: 2.6.13-rc5-mm1 Patch-keys: i386 cleanup Signed-off-by: Zachary Amsden <zach@vmware.com...
2007 Apr 18
1
[PATCH 1/3] Bogus tls from gdt
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-rc1/arch/i386/kernel/cpu/co...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...ry_b) -{ - __u32 *lp = (__u32 *)((char *)ldt + entry*8); - *lp = entry_a; - *(lp+1) = entry_b; -} - -#if TLS_SIZE != 24 -# error update this code. -#endif - -static inline void load_TLS(struct thread_struct *t, unsigned int cpu) -{ -#define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C -} - static inline void clear_LDT(void) { int cpu = get_cpu(); Index: linux-2.6.16-rc5/include/asm-i386/mach-vmi/mach_desc.h =================================================================== --- linux-2.6.16-rc5.orig/include/asm-i386/mach-vmi/mach_desc.h 2006-...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...ry_b) -{ - __u32 *lp = (__u32 *)((char *)ldt + entry*8); - *lp = entry_a; - *(lp+1) = entry_b; -} - -#if TLS_SIZE != 24 -# error update this code. -#endif - -static inline void load_TLS(struct thread_struct *t, unsigned int cpu) -{ -#define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C -} - static inline void clear_LDT(void) { int cpu = get_cpu(); Index: linux-2.6.16-rc5/include/asm-i386/mach-vmi/mach_desc.h =================================================================== --- linux-2.6.16-rc5.orig/include/asm-i386/mach-vmi/mach_desc.h 2006-...
2007 Apr 18
0
[PATCH 3/12] tls-is-ugly
...desc.h 2005-08-08 14:53:11.000000000 -0700 @@ -106,15 +106,9 @@ ldt[entry].b = entry_b; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } static inline void clear_LDT(void)
2007 Apr 18
0
[PATCH 2/14] i386 / Remove ugly tls code
...ch-default/mach_desc.h 2005-08-10 20:44:46.000000000 -0700 @@ -70,15 +70,9 @@ return 0; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } - + #endif
2007 Apr 18
0
[PATCH 3/12] tls-is-ugly
...desc.h 2005-08-08 14:53:11.000000000 -0700 @@ -106,15 +106,9 @@ ldt[entry].b = entry_b; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } static inline void clear_LDT(void)
2007 Apr 18
0
[PATCH 2/14] i386 / Remove ugly tls code
...ch-default/mach_desc.h 2005-08-10 20:44:46.000000000 -0700 @@ -70,15 +70,9 @@ return 0; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } - + #endif
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 this patch ready for inclusion.
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 this patch ready for inclusion.
2007 Apr 18
0
[PATCH 10/12] yet-another-redundant-accessor
...;b >> 23) & 1) -#define GET_PRESENT(desc) (((desc)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -934,7 +914,7 @@ desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; info.entry_number = idx; - info.base_addr = GET_BASE(desc); + info.base_addr = get_desc_base(desc); info.limit = GET_LIMIT(desc); info.seg_32bit = GET_32BIT(desc); info.contents = GET_CONTENTS(desc); Index: linux-2.6.13/arch/i386/kernel/ptrace.c ================...
2007 Apr 18
0
[PATCH 10/12] yet-another-redundant-accessor
...;b >> 23) & 1) -#define GET_PRESENT(desc) (((desc)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -934,7 +914,7 @@ desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; info.entry_number = idx; - info.base_addr = GET_BASE(desc); + info.base_addr = get_desc_base(desc); info.limit = GET_LIMIT(desc); info.seg_32bit = GET_32BIT(desc); info.contents = GET_CONTENTS(desc); Index: linux-2.6.13/arch/i386/kernel/ptrace.c ================...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...c inline void set_seg_base(unsigned # error update this code. #endif -static inline void load_TLS(struct thread_struct *t, unsigned int cpu) +static inline void native_load_TLS(struct thread_struct *t, unsigned int cpu) { u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN); gdt[0] = t->tls_array[0]; @@ -157,27 +182,33 @@ static inline void load_TLS(struct threa gdt[2] = t->tls_array[2]; } +static inline void native_set_ldt(const void *addr, + unsigned int entries) +{ + if (likely(entries == 0)) + __asm__ __volatile__ ("lldt %w0" :: "r" (0)); + else { + un...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...c inline void set_seg_base(unsigned # error update this code. #endif -static inline void load_TLS(struct thread_struct *t, unsigned int cpu) +static inline void native_load_TLS(struct thread_struct *t, unsigned int cpu) { u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN); gdt[0] = t->tls_array[0]; @@ -157,27 +182,33 @@ static inline void load_TLS(struct threa gdt[2] = t->tls_array[2]; } +static inline void native_set_ldt(const void *addr, + unsigned int entries) +{ + if (likely(entries == 0)) + __asm__ __volatile__ ("lldt %w0" :: "r" (0)); + else { + un...
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...SENT(desc) (((desc)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -932,16 +912,7 @@ memset(&info, 0, sizeof(info)); desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; - - info.entry_number = idx; - info.base_addr = GET_BASE(desc); - info.limit = GET_LIMIT(desc); - info.seg_32bit = GET_32BIT(desc); - info.contents = GET_CONTENTS(desc); - info.read_exec_only = !GET_WRITABLE(desc); - info.limit_in_pages = GET_LIMIT_PAGES(desc); - info.seg...
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...SENT(desc) (((desc)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -932,16 +912,7 @@ memset(&info, 0, sizeof(info)); desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; - - info.entry_number = idx; - info.base_addr = GET_BASE(desc); - info.limit = GET_LIMIT(desc); - info.seg_32bit = GET_32BIT(desc); - info.contents = GET_CONTENTS(desc); - info.read_exec_only = !GET_WRITABLE(desc); - info.limit_in_pages = GET_LIMIT_PAGES(desc); - info.seg...