Re: [tip:x86/urgent] x86/fpu: Set the xcomp_bv when we fake up a XSAVES area
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip:x86/urgent] x86/fpu: Set the xcomp_bv when we fake up a XSAVES area
- From: Yu-cheng Yu <yu-cheng.yu@xxxxxxxxx>
- Date: Mon, 23 Jan 2017 12:57:25 -0800
- Cc: fenghua.yu@xxxxxxxxx, dvlasenk@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, oleg@xxxxxxxxxx, mingo@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, brgerst@xxxxxxxxx, luto@xxxxxxxxxx, bp@xxxxxxxxx, jpoimboe@xxxxxxxxxx, haokexin@xxxxxxxxx, hpa@xxxxxxxxx, quentin.casasnovas@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, riel@xxxxxxxxxx, linux-tip-commits@xxxxxxxxxxxxxxx
- In-reply-to: <2be814b7-9fd6-7955-b4e3-6ecb4ef76052@linux.intel.com>
- References: <1485075023-30161-1-git-send-email-haokexin@gmail.com> <tip-5fa356458b5c918bdf8307b070a3d74bc015d910@git.kernel.org> <f2fb890d-f8ff-69e2-acc7-b3c810d6cf02@linux.intel.com> <20170123165529.GA4996@test-lenovo> <2be814b7-9fd6-7955-b4e3-6ecb4ef76052@linux.intel.com>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jan 23, 2017 at 09:23:06AM -0800, Dave Hansen wrote:
> On 01/23/2017 08:55 AM, Yu-cheng Yu wrote:
> >> The best fix here would be not to paper over the issue in the copy
> >> function but find where it got clobbered, or where some initialization
> >> code failed to set it.
> >
> > Someone else reported different issues from the same bug and a different
> > patch was just tested OK this morning. I think that adding xfeatures bits
> > to xcomp_bv should have been done in fpstate_init().
>
> Right. So where did it get cleared out?
It is not set until a task triggers XSAVES. We did not set it in fpstate_init()
because there is no valid data at the time. The problem happens when Linux
copies data to the XSAVES area, like we see here; the kernel is not expected
to change XSAVES format (xcomp_bv) but xcomp_bv is still blank (except bit 63).
Because XSAVES format is not changed after boot time and xcomp_bv does not affect
INIT optimization, why don't we fix the problem in fpstate_init()?
Yu-cheng
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]