Messages in this thread Patch in this message | | | Date | Sun, 27 Jul 2008 08:42:32 -0700 | From | Jeremy Fitzhardinge <> | Subject | [PATCH] 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> --- include/asm-x86/desc.h | 5 +++++ 1 file changed, 5 insertions(+)
diff -r c79984cfb996 include/asm-x86/desc.h --- a/include/asm-x86/desc.h Fri Jul 25 16:09:12 2008 -0700 +++ b/include/asm-x86/desc.h Sun Jul 27 08:31:08 2008 -0700 @@ -24,6 +24,9 @@ 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 anyways + because 64bit system calls require __USER_CS. */ + desc->l = 0; } extern struct desc_ptr idt_descr;
| |