public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>, Andrea Arcangeli <andrea@suse.de>,
	Doug Ledford <dledford@redhat.com>,
	jh@suse.cz, linux-kernel@vger.kernel.org, jakub@redhat.com,
	aj@suse.de, pavel@atrey.karlin.mff.cuni.cz
Subject: Re: SSE related security hole
Date: Thu, 18 Apr 2002 13:55:05 +0200	[thread overview]
Message-ID: <20020418135505.A31355@wotan.suse.de> (raw)
In-Reply-To: <20020418131431.B22558@wotan.suse.de> <E16yATQ-0004V1-00@the-village.bc.nu>

On Thu, Apr 18, 2002 at 12:53:12PM +0100, Alan Cox wrote:
> > > Intel folks are actually saying even back in Pentium MMX days that it isnt
> > > guaranteed that the FP/MMX state are not seperate registers
> > 
> > In this case it would be possible to only do the explicit clear
> > when the CPU does support sse1. For mmx only it shouldn't be needed.
> > For sse2 also not.
> 
> Do you have a documentation cite for that claim ?

Actually I did some more tests: 

test program

main()
{
	unsigned int i[4], o[4]; 

	i[0] = 1; i[1] = 2; i[2] = 3; i[3] = 4;
	asm("movups %1,%%xmm1 ; fninit ; movups %%xmm1,%0" : "=m" (o) : "m" (i)); 
	printf("%x %x %x %x\n",o[0],o[1],o[2],o[3]);

	asm("movups %1,%%xmm1 ; movups %%xmm1,%0" : "=m" (o) : "m" (i)); 
	printf("%x %x %x %x\n",o[0],o[1],o[2],o[3]);
}

Result on a pentium4: 

./xmm
bffff68c 8048431 8049640 8049660
bffff68c bffff68c bffff68c 8048431

So fninit seems to change something in XMM1. 

and pentium 3: 

bffff81c 8048431 8049640 8049660
bffff81c bffff81c bffff81c 8048431

changes something different ? 

If even Intel cannot agree on this it is probably safest to do an explicit
zeroing like Andrea's patch does. I retract the origina suggestion.

-Andi

  parent reply	other threads:[~2002-04-18 11:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-17 23:42 SSE related security hole Doug Ledford
2002-04-18  5:26 ` Andrea Arcangeli
2002-04-18  9:10   ` Arjan van de Ven
2002-04-18 11:18   ` Alan Cox
2002-04-18 11:14     ` Andi Kleen
2002-04-18 11:53       ` Alan Cox
2002-04-18 11:46         ` Andi Kleen
2002-04-18 11:55         ` Andi Kleen [this message]
2002-04-18 13:44   ` Doug Ledford
2002-04-18 19:20     ` Pavel Machek
2002-04-18 19:32       ` Doug Ledford
2002-04-21 19:54         ` Pavel Machek
2002-04-18  8:22 ` Andi Kleen
2002-04-18 14:02 ` [OT: nostalgia] " Matthias Andree
  -- strict thread matches above, loose matches on Subject: below --
2002-04-22 22:24 Saxena, Sunil
     [not found] <20020418183639.20946.qmail@science.horizon.com.suse.lists.linux.kernel>
     [not found] ` <a9ncgs$2s2$1@cesium.transmeta.com.suse.lists.linux.kernel>
2002-04-19 14:06   ` Andi Kleen
2002-04-19 18:00     ` Doug Ledford
2002-04-19 21:04       ` Andrea Arcangeli
2002-04-19 21:35         ` H. Peter Anvin
2002-04-19 21:42           ` Andi Kleen
2002-04-20  3:23             ` Andrea Arcangeli
2002-04-19 22:18         ` Jan Hubicka
     [not found] <200204182320.53095.nahshon@actcom.co.il>
2002-04-19 11:22 ` Alan Cox
2002-04-18 18:36 linux
2002-04-18 18:53 ` Richard B. Johnson
2002-04-21 19:52   ` Pavel Machek
2002-04-21 22:11   ` David Wagner
2002-04-18 21:06 ` H. Peter Anvin
2002-04-17 14:51 Jan Hubicka
2002-04-17 15:23 ` Jan Hubicka
2002-04-18 14:57   ` Denis Vlasenko

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=20020418135505.A31355@wotan.suse.de \
    --to=ak@suse.de \
    --cc=aj@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrea@suse.de \
    --cc=dledford@redhat.com \
    --cc=jakub@redhat.com \
    --cc=jh@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@atrey.karlin.mff.cuni.cz \
    /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