Commit 6143c173 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[PATCH] sanitize TLS API

This removes the TLS clear operation.  I've left the flags mask and the
writable flag just so that we have the option to introduce extensions
without breaking the ABI.
parent d383ba51
......@@ -851,17 +851,6 @@ asmlinkage int sys_set_thread_area(unsigned long base, unsigned long flags)
if (flags & ~TLS_FLAGS_MASK)
return -EINVAL;
/*
* Clear the TLS?
*/
if (flags & TLS_FLAG_CLEAR) {
cpu = get_cpu();
t->tls_desc.a = t->tls_desc.b = 0;
load_TLS_desc(t, cpu);
put_cpu();
return 0;
}
if (flags & TLS_FLAG_WRITABLE)
writable = 1;
......
......@@ -86,10 +86,9 @@ static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size)
_set_tssldt_desc(&cpu_gdt_table[cpu][LDT_ENTRY], (int)addr, ((size << 3)-1), 0x82);
}
#define TLS_FLAGS_MASK 0x00000003
#define TLS_FLAGS_MASK 0x00000001
#define TLS_FLAG_WRITABLE 0x00000001
#define TLS_FLAG_CLEAR 0x00000002
static inline void load_TLS_desc(struct thread_struct *t, unsigned int cpu)
{
......
......@@ -247,6 +247,7 @@
#define __NR_futex 240
#define __NR_sched_setaffinity 241
#define __NR_sched_getaffinity 242
#define __NR_set_thread_area 243
/* user-visible error numbers are in the range -1 - -124: see <asm-i386/errno.h> */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment