mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Stas Sergeev <stsp@aknet.ru>, Alan Cox <alan@redhat.com>,
	Linux kernel <linux-kernel@vger.kernel.org>,
	Petr Vandrovec <vandrove@vc.cvut.cz>,
	Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Subject: Re: [patch] x86: fix ESP corruption CPU bug
Date: Mon, 14 Mar 2005 00:17:34 +0100	[thread overview]
Message-ID: <20050313231734.GA22635@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0503131306450.2822@ppc970.osdl.org>

On Ne 13-03-05 13:13:16, Linus Torvalds wrote:
> 
> 
> On Sun, 13 Mar 2005, Stas Sergeev wrote:
> >
> > Such an optimization will cost three more
> > instructions, one of which is a "taken"
> > jump.
> 
> I think Pavel missed the fact that you have to check the VM86 bit in
> eflags before you check SS, since otherwise SS doesn't mean anything
> special at all (ie checking for just the normal SS isn't correct: you
> could have a 16-bit SS that looks normal, but is actually a vm86 segment).
> 
> Pavel: for the same reason you have to check the low two bits of CS too, 
> since if they are zero, then SS hasn't been saved on the stack at all, so 
> comparing it against some normal value is meaningless.

Yes, I missed that one, thanks.

What about flag similar to _TIF_SYSCALL_TRACE (call it
_TIF_THIS_BEAST_USES_V86 or something), and only do the tests in the
slowpath if it is set? As normal applications do not use v86, we could
make this 0 instructions in syscall fast path...
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

  parent reply	other threads:[~2005-03-13 23:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-13 18:20 Stas Sergeev
2005-03-13 18:52 ` Grzegorz Kulewski
2005-03-13 19:11   ` Stas Sergeev
2005-03-13 19:37     ` Ondrej Zary
2005-03-13 19:46       ` Stas Sergeev
2005-03-13 20:02   ` Pavel Machek
2005-03-13 20:10 ` Pavel Machek
2005-03-13 20:55   ` Stas Sergeev
2005-03-13 21:13     ` Linus Torvalds
2005-03-13 22:06       ` [patch] x86: fix ESP corruption CPU bug (take 2) Stas Sergeev
2005-03-14 19:29         ` Alan Cox
2005-03-14 19:59           ` Stas Sergeev
2005-03-15  3:34             ` Andrew Morton
2005-03-15 10:48               ` x86: spin_unlock(), spin_unlock_irq() & others are out of line ? Eric Dumazet
2005-03-15 19:44                 ` Lee Revell
2005-03-15 19:48               ` [patch] x86: fix ESP corruption CPU bug (take 2) Stas Sergeev
2005-03-13 23:17       ` Pavel Machek [this message]
2005-03-13 23:54         ` [patch] x86: fix ESP corruption CPU bug Linus Torvalds
2005-03-14  0:16       ` Linus Torvalds
2005-03-14  4:52         ` Stas Sergeev
2005-03-14  9:34           ` Andi Kleen
2005-03-14 10:37             ` [BUG?] x86_64 : Can not read /dev/kmem ? Eric Dumazet
2005-03-21 19:37               ` Andi Kleen
2005-03-22 15:24               ` Andi Kleen
2005-03-14 15:21             ` [patch] x86: fix ESP corruption CPU bug Jakob Eriksson
2005-03-14 17:03               ` linux-os
2005-03-14 17:10                 ` Pavel Machek
2005-03-14 19:24                 ` Brian Gerst
2005-03-14 20:21                   ` Stas Sergeev
2005-03-14 18:02               ` Stas Sergeev
2005-03-14 17:29             ` Stas Sergeev
  -- strict thread matches above, loose matches on Subject: below --
2005-03-14 11:10 Zoltan Boszormenyi
2005-01-03 23:39 Stas Sergeev
2005-01-04  0:01 ` Linus Torvalds
2005-01-04  1:58   ` Stas Sergeev

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=20050313231734.GA22635@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stsp@aknet.ru \
    --cc=torvalds@osdl.org \
    --cc=vandrove@vc.cvut.cz \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /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®