Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread H. Peter Anvin
On 09/12/2014 10:52 AM, Thomas Gleixner wrote: > > Well, I did not see the trainwreck which tried to use the generic > decoder, but as I explained in the other mail, there is no reason not > to use it and I can't see any complexity in retrieving the data beyond > calling insn_get_length(insn); >

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread Thomas Gleixner
On Thu, 11 Sep 2014, H. Peter Anvin wrote: > On 09/11/2014 03:32 PM, Dave Hansen wrote: > > On 09/11/2014 03:18 PM, Thomas Gleixner wrote: > >> On Thu, 11 Sep 2014, Qiaowei Ren wrote: > >>> This patch sets bound violation fields of siginfo struct in #BR > >>> exception handler by decoding the

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread Thomas Gleixner
On Fri, 12 Sep 2014, H. Peter Anvin wrote: > The correct limit is 15 bytes, not anything else, so this is a bug in > the existing decoder. A sequence of bytes longer than 15 bytes will Fine. Lets fix it there. > #UD, regardless of being "otherwise valid". > Keep in mind the instruction may not

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread H. Peter Anvin
On 09/12/2014 06:10 AM, Thomas Gleixner wrote: >> >> I'm not wedded to that concept, by the way, but using the generic parser had >> a >> whole bunch of its own problems, including the fact that you're getting bytes >> from user space. > > Errm. The instruction decoder does not even know about

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread Thomas Gleixner
On Thu, 11 Sep 2014, H. Peter Anvin wrote: > On 09/11/2014 04:37 PM, Thomas Gleixner wrote: > > > > > > Specifically because marshaling the data in and out of the generic > > > decoder was more complex than a special-purpose decoder. > > > > I did not look at that detail and I trust your

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread Thomas Gleixner
On Thu, 11 Sep 2014, H. Peter Anvin wrote: On 09/11/2014 04:37 PM, Thomas Gleixner wrote: Specifically because marshaling the data in and out of the generic decoder was more complex than a special-purpose decoder. I did not look at that detail and I trust your judgement here, but

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread H. Peter Anvin
On 09/12/2014 06:10 AM, Thomas Gleixner wrote: I'm not wedded to that concept, by the way, but using the generic parser had a whole bunch of its own problems, including the fact that you're getting bytes from user space. Errm. The instruction decoder does not even know about user space.

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread Thomas Gleixner
On Fri, 12 Sep 2014, H. Peter Anvin wrote: The correct limit is 15 bytes, not anything else, so this is a bug in the existing decoder. A sequence of bytes longer than 15 bytes will Fine. Lets fix it there. #UD, regardless of being otherwise valid. Keep in mind the instruction may not be

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread Thomas Gleixner
On Thu, 11 Sep 2014, H. Peter Anvin wrote: On 09/11/2014 03:32 PM, Dave Hansen wrote: On 09/11/2014 03:18 PM, Thomas Gleixner wrote: On Thu, 11 Sep 2014, Qiaowei Ren wrote: This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-12 Thread H. Peter Anvin
On 09/12/2014 10:52 AM, Thomas Gleixner wrote: Well, I did not see the trainwreck which tried to use the generic decoder, but as I explained in the other mail, there is no reason not to use it and I can't see any complexity in retrieving the data beyond calling insn_get_length(insn);

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread H. Peter Anvin
On 09/11/2014 04:37 PM, Thomas Gleixner wrote: Specifically because marshaling the data in and out of the generic decoder was more complex than a special-purpose decoder. I did not look at that detail and I trust your judgement here, but that is in no way explained in the changelog. This

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Thomas Gleixner
On Thu, 11 Sep 2014, H. Peter Anvin wrote: > On 09/11/2014 03:32 PM, Dave Hansen wrote: > > On 09/11/2014 03:18 PM, Thomas Gleixner wrote: > >> On Thu, 11 Sep 2014, Qiaowei Ren wrote: > >>> This patch sets bound violation fields of siginfo struct in #BR > >>> exception handler by decoding the

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread H. Peter Anvin
On 09/11/2014 03:32 PM, Dave Hansen wrote: > On 09/11/2014 03:18 PM, Thomas Gleixner wrote: >> On Thu, 11 Sep 2014, Qiaowei Ren wrote: >>> This patch sets bound violation fields of siginfo struct in #BR >>> exception handler by decoding the user instruction and constructing >>> the faulting

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Dave Hansen
On 09/11/2014 03:18 PM, Thomas Gleixner wrote: > On Thu, 11 Sep 2014, Qiaowei Ren wrote: >> This patch sets bound violation fields of siginfo struct in #BR >> exception handler by decoding the user instruction and constructing >> the faulting pointer. >> >> This patch does't use the generic

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Thomas Gleixner
On Thu, 11 Sep 2014, Qiaowei Ren wrote: > This patch sets bound violation fields of siginfo struct in #BR > exception handler by decoding the user instruction and constructing > the faulting pointer. > > This patch does't use the generic decoder, and implements a limited > special-purpose

[PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Qiaowei Ren
This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and constructing the faulting pointer. This patch does't use the generic decoder, and implements a limited special-purpose decoder to decode MPX instructions, simply because the

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Thomas Gleixner
On Thu, 11 Sep 2014, Qiaowei Ren wrote: This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and constructing the faulting pointer. This patch does't use the generic decoder, and implements a limited special-purpose decoder to

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Dave Hansen
On 09/11/2014 03:18 PM, Thomas Gleixner wrote: On Thu, 11 Sep 2014, Qiaowei Ren wrote: This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and constructing the faulting pointer. This patch does't use the generic decoder, and

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread H. Peter Anvin
On 09/11/2014 03:32 PM, Dave Hansen wrote: On 09/11/2014 03:18 PM, Thomas Gleixner wrote: On Thu, 11 Sep 2014, Qiaowei Ren wrote: This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and constructing the faulting pointer. This

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Thomas Gleixner
On Thu, 11 Sep 2014, H. Peter Anvin wrote: On 09/11/2014 03:32 PM, Dave Hansen wrote: On 09/11/2014 03:18 PM, Thomas Gleixner wrote: On Thu, 11 Sep 2014, Qiaowei Ren wrote: This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction

Re: [PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread H. Peter Anvin
On 09/11/2014 04:37 PM, Thomas Gleixner wrote: Specifically because marshaling the data in and out of the generic decoder was more complex than a special-purpose decoder. I did not look at that detail and I trust your judgement here, but that is in no way explained in the changelog. This

[PATCH v8 07/10] x86, mpx: decode MPX instruction to get bound violation information

2014-09-11 Thread Qiaowei Ren
This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and constructing the faulting pointer. This patch does't use the generic decoder, and implements a limited special-purpose decoder to decode MPX instructions, simply because the