summaryrefslogtreecommitdiff
path: root/arch/csky
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2021-01-20 21:09:49 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-27 11:47:49 +0100
commitc5885886c72c4fcb283bd8f5066ddf2e44afc094 (patch)
treed34583d65ec41725b116f7518cc6122ef34c278c /arch/csky
parentd1a9cd1dc53c6ff3126e627b80ebf324ef4b8ee9 (diff)
x86/mmx: Use KFPU_387 for MMX string operations
commit 67de8dca50c027ca0fa3b62a488ee5035036a0da upstream. The default kernel_fpu_begin() doesn't work on systems that support XMM but haven't yet enabled CR4.OSFXSR. This causes crashes when _mmx_memcpy() is called too early because LDMXCSR generates #UD when the aforementioned bit is clear. Fix it by using kernel_fpu_begin_mask(KFPU_387) explicitly. Fixes: 7ad816762f9b ("x86/fpu: Reset MXCSR to default in kernel_fpu_begin()") Reported-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Tested-by: Krzysztof Piotr Olędzki <ole@ans.pl> Tested-by: Krzysztof Mazur <krzysiek@podlesie.net> Cc: <stable@vger.kernel.org> Link: https://lkml.kernel.org/r/e7bf21855fe99e5f3baa27446e32623358f69e8d.1611205691.git.luto@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/csky')
0 files changed, 0 insertions, 0 deletions