Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339907
| From | Yu-cheng Yu <yu-cheng.yu@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES |
| Date | 2016-02-22 22:00 +0100 |
| Message-ID | <r55Kj-2Wr-23@gated-at.bofh.it> (permalink) |
| References | <r541P-1YW-7@gated-at.bofh.it> <r54XU-2FL-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Feb 22, 2016 at 12:00:02PM -0800, Dave Hansen wrote: > On 02/22/2016 11:00 AM, Yu-cheng Yu wrote: > > + if (xsave->header.xfeatures & XFEATURE_MASK_SUPERVISOR) > > + xsave->header.xfeatures = xfeatures | XFEATURE_MASK_SUPERVISOR; > > + else > > + xsave->header.xfeatures = xfeatures; > > This is dangerous. It says, "if any supervisor feature bit is set, then > set *ALL* of the known bits". There's no way that can work. > > Don't you just want to or in the new bits that were in the passed-in > 'xfeatures': > > xsave->header.xfeatures |= xfeatures; > > 'xfeatures' is known not to contain any supervisor bits. > It should have been: xsave->header.xfeatures = xfeatures | (xsave->header.xfeatures & XFEATURE_MASK_SUPERVISOR); I'll fix it. --Yu-cheng
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Yu-cheng Yu <yu-cheng.yu@intel.com> - 2016-02-22 20:10 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Dave Hansen <dave.hansen@linux.intel.com> - 2016-02-22 21:10 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Yu-cheng Yu <yu-cheng.yu@intel.com> - 2016-02-22 22:00 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Dave Hansen <dave.hansen@linux.intel.com> - 2016-02-22 23:20 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Yu-cheng Yu <yu-cheng.yu@intel.com> - 2016-02-22 23:40 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Andy Lutomirski <luto@amacapital.net> - 2016-02-22 23:50 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Andy Lutomirski <luto@amacapital.net> - 2016-02-23 00:00 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Yu-cheng Yu <yu-cheng.yu@intel.com> - 2016-02-23 00:00 +0100
Re: [PATCH 08/10] x86/xsaves: Fix PTRACE frames for XSAVES Dave Hansen <dave.hansen@linux.intel.com> - 2016-02-23 00:00 +0100
csiph-web