All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Chuck Ebbert <76306.1226@compuserve.com>, Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] i386: remove IOPL check on task switch
Date: Sat, 04 Nov 2006 12:09:44 -0800	[thread overview]
Message-ID: <454CF388.509@vmware.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0611041152060.25218@g5.osdl.org>

Linus Torvalds wrote:
> On Sat, 4 Nov 2006, Zachary Amsden wrote:
>   
>> Ok, checking shows Linus put it back to stop NT leakage.  This is correct, but
>> unlikely.  Would be nice to avoid it unless absolutely necessary.  Perhaps xor
>> eflags old and new and only set_system_eflags() if non-ALU bits have changed.
>>     
>
> Not just NT. AC also leaked, and caused crashes in other programs (Wine) 
> that didn't expect AC to be set and did unaligned accesses.

Yes, AC, NT, IOPL, ID are bad to leak.  DF / TF / RF are impossible to 
leak by privilege contract.  SF, ZF, PF, OF, CF can be clobbered.

VM / VIF / VIP are dealt with in separate switch paths (although I have 
witnessed a VIF leak once from a userspace process that managed to get 
VIF set).  These can't even be set with popf, and require iret to fix.

But 99% of the time, only SF / ZF / PF / OF / CF will be different, so 
you can avoid the popf.

Zach

  reply	other threads:[~2006-11-04 20:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-03 23:57 [patch] i386: remove IOPL check on task switch Chuck Ebbert
2006-11-04 19:19 ` Zachary Amsden
2006-11-04 19:39   ` Zachary Amsden
2006-11-04 19:52     ` Linus Torvalds
2006-11-04 20:09       ` Zachary Amsden [this message]
2006-11-04 20:02     ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2006-11-04  0:00 Chuck Ebbert
2006-11-03  6:27 Chuck Ebbert
2006-11-03 18:06 ` Zachary Amsden
2006-11-03 18:41   ` Andi Kleen

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=454CF388.509@vmware.com \
    --to=zach@vmware.com \
    --cc=76306.1226@compuserve.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --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 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.