Searched hist:"44922150 d87cef616fd183220d43d8fde4d41390" (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/arch/sparc/lib/ |
H A D | VISsave.S | diff 73958c651fbf70d8d8bf2a60b871af5f7a2e3199 Fri Aug 07 13:34:12 CDT 2015 Sam Ravnborg <sam@ravnborg.org> sparc64: use ENTRY/ENDPROC in VISsave
From 7d8a508d74e6cacf0f2438286a959c3195a35a37 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Fri, 7 Aug 2015 20:26:12 +0200 Subject: [PATCH] sparc64: use ENTRY/ENDPROC in VISsave
Commit 44922150d87cef616fd183220d43d8fde4d41390 ("sparc64: Fix userspace FPU register corruptions") left a stale globl symbol which was not used.
Fix this and introduce use of ENTRY/ENDPROC
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net> diff 44922150d87cef616fd183220d43d8fde4d41390 Thu Aug 06 21:13:25 CDT 2015 David S. Miller <davem@davemloft.net> sparc64: Fix userspace FPU register corruptions.
If we have a series of events from userpsace, with %fprs=FPRS_FEF, like follows:
ETRAP ETRAP VIS_ENTRY(fprs=0x4) VIS_EXIT RTRAP (kernel FPU restore with fpu_saved=0x4) RTRAP
We will not restore the user registers that were clobbered by the FPU using kernel code in the inner-most trap.
Traps allocate FPU save slots in the thread struct, and FPU using sequences save the "dirty" FPU registers only.
This works at the initial trap level because all of the registers get recorded into the top-level FPU save area, and we'll return to userspace with the FPU disabled so that any FPU use by the user will take an FPU disabled trap wherein we'll load the registers back up properly.
But this is not how trap returns from kernel to kernel operate.
The simplest fix for this bug is to always save all FPU register state for anything other than the top-most FPU save area.
Getting rid of the optimized inner-slot FPU saving code ends up making VISEntryHalf degenerate into plain VISEntry.
Longer term we need to do something smarter to reinstate the partial save optimizations. Perhaps the fundament error is having trap entry and exit allocate FPU save slots and restore register state. Instead, the VISEntry et al. calls should be doing that work.
This bug is about two decades old.
Reported-by: James Y Knight <jyknight@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | NG4memcpy.S | diff 44922150d87cef616fd183220d43d8fde4d41390 Thu Aug 06 21:13:25 CDT 2015 David S. Miller <davem@davemloft.net> sparc64: Fix userspace FPU register corruptions.
If we have a series of events from userpsace, with %fprs=FPRS_FEF, like follows:
ETRAP ETRAP VIS_ENTRY(fprs=0x4) VIS_EXIT RTRAP (kernel FPU restore with fpu_saved=0x4) RTRAP
We will not restore the user registers that were clobbered by the FPU using kernel code in the inner-most trap.
Traps allocate FPU save slots in the thread struct, and FPU using sequences save the "dirty" FPU registers only.
This works at the initial trap level because all of the registers get recorded into the top-level FPU save area, and we'll return to userspace with the FPU disabled so that any FPU use by the user will take an FPU disabled trap wherein we'll load the registers back up properly.
But this is not how trap returns from kernel to kernel operate.
The simplest fix for this bug is to always save all FPU register state for anything other than the top-most FPU save area.
Getting rid of the optimized inner-slot FPU saving code ends up making VISEntryHalf degenerate into plain VISEntry.
Longer term we need to do something smarter to reinstate the partial save optimizations. Perhaps the fundament error is having trap entry and exit allocate FPU save slots and restore register state. Instead, the VISEntry et al. calls should be doing that work.
This bug is about two decades old.
Reported-by: James Y Knight <jyknight@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
/openbmc/linux/arch/sparc/include/asm/ |
H A D | visasm.h | diff 44922150d87cef616fd183220d43d8fde4d41390 Thu Aug 06 21:13:25 CDT 2015 David S. Miller <davem@davemloft.net> sparc64: Fix userspace FPU register corruptions.
If we have a series of events from userpsace, with %fprs=FPRS_FEF, like follows:
ETRAP ETRAP VIS_ENTRY(fprs=0x4) VIS_EXIT RTRAP (kernel FPU restore with fpu_saved=0x4) RTRAP
We will not restore the user registers that were clobbered by the FPU using kernel code in the inner-most trap.
Traps allocate FPU save slots in the thread struct, and FPU using sequences save the "dirty" FPU registers only.
This works at the initial trap level because all of the registers get recorded into the top-level FPU save area, and we'll return to userspace with the FPU disabled so that any FPU use by the user will take an FPU disabled trap wherein we'll load the registers back up properly.
But this is not how trap returns from kernel to kernel operate.
The simplest fix for this bug is to always save all FPU register state for anything other than the top-most FPU save area.
Getting rid of the optimized inner-slot FPU saving code ends up making VISEntryHalf degenerate into plain VISEntry.
Longer term we need to do something smarter to reinstate the partial save optimizations. Perhaps the fundament error is having trap entry and exit allocate FPU save slots and restore register state. Instead, the VISEntry et al. calls should be doing that work.
This bug is about two decades old.
Reported-by: James Y Knight <jyknight@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|