All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	Horms <horms@debian.org>, Nikos Ntarmos <ntarmos@ceid.upatras.gr>,
	329354@bugs.debian.org, Frederik Schueler <fs@lowpingbastards.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	akpm@osdl.org, ak@suse.de
Subject: Re: [patch] x86_64: fix tss limit (was Re: CAN-2005-0204 and 2.4)
Date: Fri, 23 Sep 2005 16:22:45 -0700	[thread overview]
Message-ID: <20050923162245.C12631@unix-os.sc.intel.com> (raw)
In-Reply-To: <9a87484905092315556e9fc0bd@mail.gmail.com>; from jesper.juhl@gmail.com on Sat, Sep 24, 2005 at 12:55:41AM +0200

On Sat, Sep 24, 2005 at 12:55:41AM +0200, Jesper Juhl wrote:
> On 9/24/05, Siddha, Suresh B <suresh.b.siddha@intel.com> wrote:
> >         set_tssldt_descriptor(&cpu_gdt_table[cpu][GDT_ENTRY_TSS], (unsigned long)addr,
> >                               DESC_TSS,
> > -                             sizeof(struct tss_struct) - 1);
> > +                             IO_BITMAP_OFFSET + IO_BITMAP_BYTES + 7);
> >  }
> >
> [snip]
> 
> Is it just me, or would it be nice with a symbolic name for this "7" ?
> For someone reading the code for the first time it seems to me that
> it's non-obvious why the 7 is there, and why it's 7 exactely - a
> define would make it clearer as I see it.

Andrew please apply this updated patch. Thanks.

--
Fix the x86_64 TSS limit in TSS descriptor.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>

--- linux-2.6.14-rc1/include/asm-x86_64/desc.h.orig	2005-09-12 20:12:09.000000000 -0700
+++ linux-2.6.14-rc1/include/asm-x86_64/desc.h	2005-09-23 15:41:28.103954880 -0700
@@ -127,9 +127,16 @@ static inline void set_tssldt_descriptor
 
 static inline void set_tss_desc(unsigned cpu, void *addr)
 { 
+	/*
+	 * sizeof(unsigned long) coming from an extra "long" at the end
+	 * of the iobitmap. See tss_struct definition in processor.h
+	 * 
+	 * -1? seg base+limit should be pointing to the address of the
+	 * last valid byte
+	 */
 	set_tssldt_descriptor(&cpu_gdt_table[cpu][GDT_ENTRY_TSS], (unsigned long)addr, 
 			      DESC_TSS,
-			      sizeof(struct tss_struct) - 1);
+			      IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1);
 } 
 
 static inline void set_ldt_desc(unsigned cpu, void *addr, int size)

  reply	other threads:[~2005-09-23 23:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1EI1tH-0006Yy-00@master.debian.org>
2005-09-22  2:30 ` CAN-2005-0204 and 2.4 Horms
2005-09-22 13:56   ` Nikos Ntarmos
2005-09-26  2:04     ` Horms
2005-09-22 20:04   ` Marcelo Tosatti
2005-09-23 22:17     ` [patch] x86_64: fix tss limit (was Re: CAN-2005-0204 and 2.4) Siddha, Suresh B
2005-09-23 22:55       ` Jesper Juhl
2005-09-23 23:22         ` Siddha, Suresh B [this message]
2005-09-23 23:25           ` Jesper Juhl

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=20050923162245.C12631@unix-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=329354@bugs.debian.org \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=fs@lowpingbastards.de \
    --cc=horms@debian.org \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=ntarmos@ceid.upatras.gr \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.