amd64/135014: [padlock] Using padlock(4) in 8-current triggers "fpudna in kernel mode!" warnings

Patrick Lamaiziere patfbsd at davenulle.org
Tue Dec 15 11:20:27 PST 2009


Le Wed, 16 Dec 2009 01:35:07 +1100 (EST),
Bruce Evans <brde at optusnet.com.au> a écrit :

> [This probably won't make it into the followup, since gnats still
> doesn't generate useful followup addresses and I didn't tyy to edit
> the headers.]
> 
> > Synopsis: [padlock] Using padlock(4) in 8-current triggers "fpudna
> > in kernel mode!" warnings
> 
> > By request of Michael Moll in followup, reclassify this as an amd64
> > bug.  His theory is that the floating-point registers may not be
> > being handled correctly in the kernel.
> 
> This seems to be a bug in padlock(4).  Apparently the inline asm that
> it uses requires the FPU.  But use of the FPU in the kernel is not
> supported. (except the obsolete i586 copy optimizations).

According to the Linux code, padlock does not use the FPU but can
generate a DNA fault:
http://fxr.watson.org/fxr/source/drivers/crypto/padlock-aes.c?v=linux-2.6#L182
 
They use a irq_ts_save() / restore operation between padlock
intruction. I don't know if there are similar things into the FreeBSD
kernel:
http://fxr.watson.org/fxr/source/drivers/crypto/padlock-aes.c?v=linux-2.6#L296

See also this thread:
http://lkml.indiana.edu/hypermail/linux/kernel/0808.1/0306.html

HTH, regards.


More information about the freebsd-amd64 mailing list