[PATCH 0/2 v2] ARM VFP exception handling and state corruption fixes

Brad Figg brad.figg at canonical.com
Wed Mar 11 18:42:23 UTC 2009


Please pull from zinc.canonical.com:~bradf/ubuntu-jaunty. This resend
is due to a #include issue which I missed that prevented building.

As requested by Loic Minier:

This CPU generates synchronous VFP exceptions in a non-standard way -the
FPEXC.EX bit set but without the FPSCR.IXE bit being set like in the VFP
subarchitecture 1 or just the FPEXC.DEX bit like in VFP subarchitecture
2. The main problem is that the faulty instruction will be re-executed
indefinitely without being emulated. This patch ensures that the
VFP exception is treated as synchronous.

Signed-off-by: Catalin Marinas <catalin.marinas at arm.com>

On Wed, Jan 28, 2009 at 01:09:37PM +0000, Catalin Marinas wrote:
> > BTW, the VFP_bounce() function isn't preemption safe (problems and
> > suggested fix reported by Lineo in private e-mails but I didn't have
> > time to post them to the list yet).

We've also observed that ARM VFP state can be corrupted during VFP exception
handling when PREEMPT is enabled.  The exact conditions are difficult
to reproduce but appear to occur during VFP exception handling when a
task causes a VFP exception which is handled via VFP_bounce and is then
preempted by yet another task which in turn causes yet another VFP
exception.  Since the VFP_bounce code is not preempt safe, VFP state then
becomes corrupt.  In order to prevent preemption from occuring while
handling a VFP exception, this patch disables preemption while handling
VFP exceptions.

Signed-off-by: George G. Davis <gdavis at mvista.com>





More information about the kernel-team mailing list