lkml.org 
[lkml]   [2008]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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;



\
 
 \ /
  Last update: 2008-07-27 17:45    [W:0.032 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site