Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2002-07-31 22:50:00 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-07-31 22:50:00 -0700
commit6143c1732c7eb08cc5983a252272b8a5234932c9 (patch)
tree5a3d85b4901716c4a9a46ae6fbe19f0896d4cb1b
parentd383ba51a478fbcaa37ab09af9bd8b1433028801 (diff)
[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.
-rw-r--r--arch/i386/kernel/process.c11
-rw-r--r--include/asm-i386/desc.h3
-rw-r--r--include/asm-i386/unistd.h1
3 files changed, 2 insertions, 13 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index a464e44f2a96..daae105bc4ef 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -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;
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 30524cbe1719..182b104dad2d 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -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)
{
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index df4f1cc4f1ac..7f4fe87d047b 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -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> */