On Mon, Feb 22, 2016 at 2:53 PM, Dave Hansen
wrote:
> On 02/22/2016 02:45 PM, Andy Lutomirski wrote:
>>> +/*
>>> > + * Convert from kernel XSAVES compacted format to standard format and
>>> > copy
>>> > + * to a ptrace buffer. It supports partial copy but pos always starts
>>> > from
>>> > + * z
On 02/22/2016 02:45 PM, Andy Lutomirski wrote:
>> +/*
>> > + * Convert from kernel XSAVES compacted format to standard format and copy
>> > + * to a ptrace buffer. It supports partial copy but pos always starts from
>> > + * zero. This is called from xstateregs_get() and there we check the cpu
>> >
On Mon, Feb 22, 2016 at 02:45:54PM -0800, Andy Lutomirski wrote:
> > +/*
> > + * Convert from kernel XSAVES compacted format to standard format and copy
> > + * to a ptrace buffer. It supports partial copy but pos always starts from
> > + * zero. This is called from xstateregs_get() and there we ch
On Mon, Feb 22, 2016 at 11:00 AM, Yu-cheng Yu wrote:
> XSAVES uses compacted format and is a kernel instruction. The kernel
> should use standard-format, non-supervisor state data for PTRACE.
>
> +/*
> + * Convert from kernel XSAVES compacted format to standard format and copy
> + * to a ptrace b
On Mon, Feb 22, 2016 at 02:19:05PM -0800, Dave Hansen wrote:
> On 02/22/2016 12:48 PM, Yu-cheng Yu wrote:
> > It should have been:
> >
> > xsave->header.xfeatures = xfeatures |
> > (xsave->header.xfeatures & XFEATURE_MASK_SUPERVISOR);
> >
> > I'll fix it.
>
> Can we break it out
On 02/22/2016 12:48 PM, Yu-cheng Yu wrote:
> It should have been:
>
> xsave->header.xfeatures = xfeatures |
> (xsave->header.xfeatures & XFEATURE_MASK_SUPERVISOR);
>
> I'll fix it.
Can we break it out to make it more clear?
/*
* The state that came in from userspace was use
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.xfeatu
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 supervis
XSAVES uses compacted format and is a kernel instruction. The kernel
should use standard-format, non-supervisor state data for PTRACE.
Signed-off-by: Yu-cheng Yu
---
arch/x86/include/asm/fpu/xstate.h | 4 +
arch/x86/kernel/fpu/regset.c | 56 +
arch/x86/kernel/fpu/xstate.c
9 matches
Mail list logo