Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580935

Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header
Date 2017-02-15 00:00 +0100
Message-ID <taUeK-7RX-5@gated-at.bofh.it> (permalink)
References <t2VUm-4rY-11@gated-at.bofh.it> <t34XE-21g-15@gated-at.bofh.it> <taSZl-75C-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Feb 14, 2017 at 01:26:41PM -0800, Yu-cheng Yu wrote:
> On Tue, Jan 24, 2017 at 12:46:17AM -0800, tip-bot for Yu-cheng Yu wrote:
> > Commit-ID:  dffba9a31c7769be3231c420d4b364c92ba3f1ac
> > Gitweb:     http://git.kernel.org/tip/dffba9a31c7769be3231c420d4b364c92ba3f1ac
> > Author:     Yu-cheng Yu <yu-cheng.yu@intel.com>
> > AuthorDate: Mon, 23 Jan 2017 14:54:44 -0800
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > CommitDate: Tue, 24 Jan 2017 09:04:48 +0100
> > 
> > x86/fpu/xstate: Fix xcomp_bv in XSAVES header
> > 
> > The compacted-format XSAVES area is determined at boot time and
> > never changed after.  The field xsave.header.xcomp_bv indicates
> > which components are in the fixed XSAVES format.
> > 
> > In fpstate_init() we did not set xcomp_bv to reflect the XSAVES
> > format since at the time there is no valid data.
> > 
> > However, after we do copy_init_fpstate_to_fpregs() in fpu__clear(),
> > as in commit:
> > 
> >   b22cbe404a9c x86/fpu: Fix invalid FPU ptrace state after execve()
> > 
> > and when __fpu_restore_sig() does fpu__restore() for a COMPAT-mode
> > app, a #GP occurs.  This can be easily triggered by doing valgrind on
> > a COMPAT-mode "Hello World," as reported by Joakim Tjernlund and
> > others:
> > 
> > 	https://bugzilla.kernel.org/show_bug.cgi?id=190061
> > 
> > Fix it by setting xcomp_bv correctly.
> > 
> 
> Please consider pulling this into the stable tree because my previous
> patch in commit: 
> 
>   b22cbe404a9c x86/fpu: Fix invalid FPU ptrace state after execve()
> 
> exposes the same issue in the stable tree.

Ah, thanks, I'll do that for the next round of stable releases after the
ones that happen tomorrow.

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header Yu-cheng Yu <yu-cheng.yu@intel.com> - 2017-02-14 22:40 +0100
  Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-02-15 00:00 +0100
  Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header Yu-cheng Yu <yu-cheng.yu@intel.com> - 2017-02-16 19:00 +0100
  Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-02-16 19:00 +0100

csiph-web