stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header
       [not found] ` <tip-dffba9a31c7769be3231c420d4b364c92ba3f1ac@git.kernel.org>
@ 2017-02-14 21:26   ` Yu-cheng Yu
  2017-02-14 22:53     ` Greg Kroah-Hartman
  2017-02-16 17:51     ` Greg Kroah-Hartman
  0 siblings, 2 replies; 4+ messages in thread
From: Yu-cheng Yu @ 2017-02-14 21:26 UTC (permalink / raw)
  To: dave.hansen, linux-kernel, ravi.v.shankar, torvalds, haokexin,
	tglx, Joakim.Tjernlund, mingo, peterz, hpa, fenghua.yu, luto, bp,
	Greg Kroah-Hartman, stable

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.

Thanks,
Yu-cheng

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header
  2017-02-14 21:26   ` [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header Yu-cheng Yu
@ 2017-02-14 22:53     ` Greg Kroah-Hartman
  2017-02-16 17:51     ` Greg Kroah-Hartman
  1 sibling, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-02-14 22:53 UTC (permalink / raw)
  To: Yu-cheng Yu
  Cc: dave.hansen, linux-kernel, ravi.v.shankar, torvalds, haokexin,
	tglx, Joakim.Tjernlund, mingo, peterz, hpa, fenghua.yu, luto, bp,
	stable

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header
  2017-02-14 21:26   ` [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header Yu-cheng Yu
  2017-02-14 22:53     ` Greg Kroah-Hartman
@ 2017-02-16 17:51     ` Greg Kroah-Hartman
  2017-02-16 17:51       ` Yu-cheng Yu
  1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2017-02-16 17:51 UTC (permalink / raw)
  To: Yu-cheng Yu
  Cc: dave.hansen, linux-kernel, ravi.v.shankar, torvalds, haokexin,
	tglx, Joakim.Tjernlund, mingo, peterz, hpa, fenghua.yu, luto, bp,
	stable

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.

I just tried to apply this, and it does not apply at all.  Can you
please provide a backported version that you have verified will work, so
that I can apply it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header
  2017-02-16 17:51     ` Greg Kroah-Hartman
@ 2017-02-16 17:51       ` Yu-cheng Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Yu-cheng Yu @ 2017-02-16 17:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: dave.hansen, linux-kernel, ravi.v.shankar, torvalds, haokexin,
	tglx, Joakim.Tjernlund, mingo, peterz, hpa, fenghua.yu, luto, bp,
	stable

On Thu, Feb 16, 2017 at 09:51:12AM -0800, Greg Kroah-Hartman wrote:
> 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

> I just tried to apply this, and it does not apply at all.  Can you
> please provide a backported version that you have verified will work, so
> that I can apply it?

I will do that.

Thanks,
Yu-cheng

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-16 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1485212084-4418-1-git-send-email-yu-cheng.yu@intel.com>
     [not found] ` <tip-dffba9a31c7769be3231c420d4b364c92ba3f1ac@git.kernel.org>
2017-02-14 21:26   ` [tip:x86/urgent] x86/fpu/xstate: Fix xcomp_bv in XSAVES header Yu-cheng Yu
2017-02-14 22:53     ` Greg Kroah-Hartman
2017-02-16 17:51     ` Greg Kroah-Hartman
2017-02-16 17:51       ` Yu-cheng Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).