public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: fix initialization of 'l' bit in ldt descriptors
@ 2008-07-27 15:42 Jeremy Fitzhardinge
  2008-07-28 12:28 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Fitzhardinge @ 2008-07-27 15:42 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: the arch/x86 maintainers, Linux Kernel Mailing List,
	Glauber de Oliveira Costa

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;



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-28 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-27 15:42 [PATCH] x86: fix initialization of 'l' bit in ldt descriptors Jeremy Fitzhardinge
2008-07-28 12:28 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox