On 29 November 2017 at 09:30, Richard Henderson <[email protected]> wrote: > On 11/28/2017 05:34 PM, Peter Maydell wrote: >> Our copy of the nwfpe code for emulating of the old FPA11 floating >> point unit doesn't check the coprocessor number in the instruction >> when it emulates it. This means that we might treat some >> instructions which should really UNDEF as being FPA11 instructions by >> accident. >> >> The kernel's copy of the nwfpe code doesn't make this error; I suspect >> the bug was noticed and fixed as part of the process of mainlining >> the nwfpe code more than a decade ago. >> >> Add a check that the coprocessor number (which is always in bits >> [11:8] of the instruction) is either 1 or 2, which is where the >> FPA11 lives. >> >> Reported-by: Richard Henderson <[email protected]> >> Signed-off-by: Peter Maydell <[email protected]> >> --- >> Tested with a chroot of arm debian lenny, which is the last one that >> still used the calling convention that mandated use of the old FPA11 FPU >> and thus needs nwfpe emulation. >> --- >> linux-user/arm/nwfpe/fpa11.c | 9 +++++++++ >> 1 file changed, 9 insertions(+) > > Reviewed-by: Richard Henderson <[email protected]>
Thanks; applied to target-arm.next (since it's as much an arm patch as a linux-user one). -- PMM
