Re: FreeBSD-SA-06:14.fpu

From: Rostislav Krasny <rosti.bsd_at_gmail.com>
Date: Sun, 30 Apr 2006 14:24:08 +0300
David Xu wrote:

> Igor Sysoev wrote:
> > 
> > The last security advisory FreeBSD-SA-06:14.fpu
> > ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-06:14.fpu.asc
> > that fixes very doubtful security bug in AMD CPUs, also
> > adds unnecessary penalty in FPU context switch for all other
> > SSE-enabled CPUs.
> 
> Probably it should only be applied to AMD CPU but not Intel and others,
> it is easy to check cpu vendor and put a
> if (bug_fxsave)
> 	fpu_clean_state();
> 
> in file npx.c.

Other possible solution is making the fpu_clean_state() optional by
something like following:

#ifdef BUG_FXSAVE
#define fpu_clean_state() __fpu_clean_state()
#else
#define fpu_clean_state() ;
#endif

... and including "options BUG_FXSAVE" to GENERIC.
Received on Sun Apr 30 2006 - 09:24:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:55 UTC