[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fd2c48b4-431b-9ae5-90e2-459cd0f7c2a4@linux.intel.com>
Date: Tue, 14 Feb 2017 08:47:42 -0800
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: brgerst@...il.com, bp@...en8.de, tglx@...utronix.de,
quentin.casasnovas@...cle.com, oleg@...hat.com,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
dvlasenk@...hat.com, mingo@...nel.org, haokexin@...il.com,
hpa@...or.com, fenghua.yu@...el.com, jpoimboe@...hat.com,
peterz@...radead.org, riel@...hat.com, yu-cheng.yu@...el.com,
luto@...nel.org
Subject: Re: [tip:x86/urgent] x86/fpu: Set the xcomp_bv when we fake up a
XSAVES area
On 01/23/2017 01:43 AM, tip-bot for Kevin Hao wrote:
> diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
> index 1d77704..e287b90 100644
> --- a/arch/x86/kernel/fpu/xstate.c
> +++ b/arch/x86/kernel/fpu/xstate.c
> @@ -1070,6 +1070,7 @@ int copyin_to_xsaves(const void *kbuf, const void __user *ubuf,
> * Add back in the features that came in from userspace:
> */
> xsave->header.xfeatures |= xfeatures;
> + xsave->header.xcomp_bv = XCOMP_BV_COMPACTED_FORMAT | xsave->header.xfeatures;
FYI, this commit bit me today. If userspace happens to have bits clear
in the 'xfeatures' field, this will *CLEAR* bits in xcomp_bv, changing
the format of the XSAVE buffer, and breaking anything that looks at the
buffer that doesn't use the instructions.
Yu-cheng's dffba9a31c commit removed this line and fixed it up, but this
might bite someone who is bisecting.
Powered by blists - more mailing lists