All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86: Fix TSS size check for 16-bit tasks
Date: Tue, 23 Mar 2010 12:21:22 +0100	[thread overview]
Message-ID: <4BA8A432.7070303@web.de> (raw)
In-Reply-To: <4BA89706.5090808@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]

Avi Kivity wrote:
> On 03/22/2010 12:29 PM, Jan Kiszka wrote:
>> A 16-bit TSS is only 44 bytes long. So make sure to test for the correct
>> size on task switch.
>>    
> 
>> This should be stable material as well. I can provide a patch that
>> applies on .32 and .33, or what will be the procedure?
>>    
> 
> I'd like to drop the Cc: stable and maintain stable queues explicitly
> (in kvm-updates/2.6.3[23]).  I'll fast-forward these to current -stable,
> please send patches against them.  These branches will be autotested
> before submission, a step that is missing in the current scheme of things.
> 
>>
>> -    if (!next_tss_desc.p || desc_limit_scaled(&next_tss_desc)<  0x67) {
>> +    desc_limit = desc_limit_scaled(&next_tss_desc);
>> +    if (!next_tss_desc.p ||
>> +        ((desc_limit<  0x67&&  (next_tss_desc.type&  8)) ||
>> +         desc_limit<  0x2c)) {
>>    
> 
> A 44-byte TSS has a limit of 43 (just like a 4GB segment has a limit of
> 0xffffffff), so there is an off-by-one here.
> 

Right - you just found an (harmless) off-by-one in our legacy OS as well
(I blindly copied its limit).

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  parent reply	other threads:[~2010-03-23 11:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22 10:29 [PATCH] KVM: x86: Fix TSS size check for 16-bit tasks Jan Kiszka
2010-03-23 10:25 ` Avi Kivity
2010-03-23 10:42   ` Avi Kivity
2010-03-23 12:14     ` Jan Kiszka
2010-03-23 11:21   ` Jan Kiszka [this message]
2010-03-23 12:25     ` Avi Kivity
2010-03-23 11:25 ` [PATCH v2] " Jan Kiszka
2010-03-23 12:35   ` Avi Kivity

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=4BA8A432.7070303@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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.