mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Chuck Ebbert <76306.1226@compuserve.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, eliad lubovsky <eliadl@013.net>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [patch 2.6.13-rc1] i386: fix incorrect TSS entry for LDT
Date: Fri, 1 Jul 2005 09:14:36 +0200	[thread overview]
Message-ID: <20050701071436.GA18008@elte.hu> (raw)
In-Reply-To: <200507010043_MC3-1-A32F-B78B@compuserve.com>


* Chuck Ebbert <76306.1226@compuserve.com> wrote:

> The LDT entry in the i386 TSS needs to be a selector, not an entry 
> number.

you are right - but this shouldnt really matter, because this TSS field 
is only loaded by a CPU upon a real TSS switch, which we never do. We 
load the LDT selector manually, via the lldt instruction (load_LDT*()).  
(It could at most matter when we do a double-fault, but the TSS of the 
doublefault handler is set up separately, which has the .ldt field 
cleared.)

so i'd rather suggest to remove the initialization altogether, as per 
the (tested) patch below.

	Ingo

---

noticed by Chuck Ebbert: the .ldt entry of the TSS was set up
incorrectly. It never mattered since this was a leftover from
old times, so remove it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

 include/asm-i386/processor.h |    1 -
 1 files changed, 1 deletion(-)

Index: linux/include/asm-i386/processor.h
===================================================================
--- linux.orig/include/asm-i386/processor.h
+++ linux/include/asm-i386/processor.h
@@ -474,7 +474,6 @@ struct thread_struct {
 	.esp0		= sizeof(init_stack) + (long)&init_stack,	\
 	.ss0		= __KERNEL_DS,					\
 	.ss1		= __KERNEL_CS,					\
-	.ldt		= GDT_ENTRY_LDT,				\
 	.io_bitmap_base	= INVALID_IO_BITMAP_OFFSET,			\
 	.io_bitmap	= { [ 0 ... IO_BITMAP_LONGS] = ~0 },		\
 }

      reply	other threads:[~2005-07-01  7:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01  4:40 Chuck Ebbert
2005-07-01  7:14 ` Ingo Molnar [this message]

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=20050701071436.GA18008@elte.hu \
    --to=mingo@elte.hu \
    --cc=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=eliadl@013.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®