[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210602095543.149814064@linutronix.de>
Date: Wed, 02 Jun 2021 11:55:43 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org, Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Tony Luck <tony.luck@...el.com>,
Yu-cheng Yu <yu-cheng.yu@...el.com>
Subject: [patch 0/8] x86/fpu: Mop up XSAVES and related damage
syszbot reported a warnon for XRSTOR raising #GP:
https://lore.kernel.org/r/0000000000004c453905c30f8334@google.com
with a syzcaller reproducer and a conclusive bisect result.
It took a while to destill a simple C reproducer out of it which allowed to
pin point the root cause: The recent addition of supervisor XSTATEs broke
the signal restore path for the case where the signal handler wreckaged the
XSTATE on stack because it does not sanitize the XSTATE header which causes
a subsequent XRSTOR to fail and #GP.
The following series addresses the problem and fixes related issues which
were found while inspecting the related changes.
Thanks to Andy and Dave for working on this with me!
Thanks,
tglx
---
arch/x86/include/asm/fpu/xstate.h | 4
arch/x86/kernel/fpu/core.c | 62 ++++++---
arch/x86/kernel/fpu/regset.c | 43 ++----
arch/x86/kernel/fpu/signal.c | 30 +++-
arch/x86/kernel/fpu/xstate.c | 95 +++++----------
b/tools/testing/selftests/x86/corrupt_xstate_header.c | 114 ++++++++++++++++++
tools/testing/selftests/x86/Makefile | 3
7 files changed, 234 insertions(+), 117 deletions(-)
Powered by blists - more mailing lists