From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Glauber de Oliveira Costa <gcosta@redhat.com>
Subject: [PATCH] x86: fix initialization of 'l' bit in ldt descriptors
Date: Sun, 27 Jul 2008 08:42:32 -0700 [thread overview]
Message-ID: <488C9768.8090000@goop.org> (raw)
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;
next reply other threads:[~2008-07-27 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-27 15:42 Jeremy Fitzhardinge [this message]
2008-07-28 12:28 ` [PATCH] x86: fix initialization of 'l' bit in ldt descriptors Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488C9768.8090000@goop.org \
--to=jeremy@goop.org \
--cc=gcosta@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox