summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-27 08:42:32 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-28 14:26:26 +0200
commit64f53a0492b4bc11868307990bb8f7c1e0764f89 (patch)
tree60348b0c26e945e2b91da2521af5b300979cdc04 /include
parentb56afe1d41653fb07ab1b5af5ccc12001c4dd5a0 (diff)
x86: fix initialization of 'l' bit in ldt descriptors
Make sure that fill_ldt() initializes the 'l' bit in the descriptor. It always sets it to 0, ignoring 'lm' in user_desc, preserving original x86_64 behaviour. Previously it was leaving 'l' uninitialized. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Glauber de Oliveira Costa <gcosta@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/desc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h
index 24a524f5e1a2..06f786f4b4fb 100644
--- a/include/asm-x86/desc.h
+++ b/include/asm-x86/desc.h
@@ -24,6 +24,11 @@ static inline void fill_ldt(struct desc_struct *desc,
desc->d = info->seg_32bit;
desc->g = info->limit_in_pages;
desc->base2 = (info->base_addr & 0xff000000) >> 24;
+ /*
+ * Don't allow setting of the lm bit. It is useless anyway
+ * because 64bit system calls require __USER_CS:
+ */
+ desc->l = 0;
}
extern struct desc_ptr idt_descr;