[Pkg-oss4-maintainers] Bug#694631: oss4: Review of vmix FPU usage

Ben Hutchings ben at decadent.org.uk
Sun Dec 2 14:16:40 UTC 2012


I asked H. Peter Anvin (one of the Linux x86 maintainers) to review the
FPU code.  This was done on IRC so I'll summarise:

1. oss_fp_check() has no need to use kernel_fpu_begin() and
kernel_fpu_end().  But it should use the CPU features API (see
arch/x86/include/asm/cpufeature.h).

2. oss_fp_save() and oss_fp_restore() *must not* modify cr0 or cr4
directly.  kernel_fpu_begin() and kernel_fpu_end() take care of the
necessary CR changes.

However the WARNING in this bug shows that vmix FPU usage is
fundamentally unsafe - it calls these functions from an IRQ handler, and
it is not always possible to use the FPU then without corrupting the
state of the current task.

Please disable CONFIG_OSS_VMIX_FLOAT.

Ben.

-- 
Ben Hutchings
Never attribute to conspiracy what can adequately be explained by stupidity.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-oss4-maintainers/attachments/20121202/ace3fcf5/attachment.pgp>


More information about the Pkg-oss4-maintainers mailing list