FreeBSD-SA-06:14.fpu

Rostislav Krasny rosti.bsd at gmail.com
Sun Apr 30 11:24:29 UTC 2006


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.


More information about the freebsd-current mailing list