Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-31 Thread Thomas Gleixner
On Fri, 31 Oct 2014, Dave Hansen wrote: > On 10/27/2014 01:36 PM, Thomas Gleixner wrote: > > You're repeating yourself. Care to read the discussion about this from > > the last round of review again? > > OK, so here's a rewritten decoder. I think it's a lot more robust and > probably fixes a

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-31 Thread Dave Hansen
On 10/27/2014 01:36 PM, Thomas Gleixner wrote: > You're repeating yourself. Care to read the discussion about this from > the last round of review again? OK, so here's a rewritten decoder. I think it's a lot more robust and probably fixes a bug or two. This ends up saving ~70 lines of code out

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-31 Thread Thomas Gleixner
On Fri, 31 Oct 2014, Ren Qiaowei wrote: > On 10/31/2014 06:38 AM, Dave Hansen wrote: > > > @@ -316,6 +317,11 @@ dotraplinkage void do_bounds(struct pt_regs *regs, > > > long error_code) > > > break; > > > > > > case 1: /* Bound violation. */ > > > +

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-31 Thread Thomas Gleixner
On Fri, 31 Oct 2014, Ren Qiaowei wrote: On 10/31/2014 06:38 AM, Dave Hansen wrote: @@ -316,6 +317,11 @@ dotraplinkage void do_bounds(struct pt_regs *regs, long error_code) break; case 1: /* Bound violation. */ + do_mpx_bounds(regs, info,

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-31 Thread Dave Hansen
On 10/27/2014 01:36 PM, Thomas Gleixner wrote: You're repeating yourself. Care to read the discussion about this from the last round of review again? OK, so here's a rewritten decoder. I think it's a lot more robust and probably fixes a bug or two. This ends up saving ~70 lines of code out of

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-31 Thread Thomas Gleixner
On Fri, 31 Oct 2014, Dave Hansen wrote: On 10/27/2014 01:36 PM, Thomas Gleixner wrote: You're repeating yourself. Care to read the discussion about this from the last round of review again? OK, so here's a rewritten decoder. I think it's a lot more robust and probably fixes a bug or

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-30 Thread Ren Qiaowei
On 10/31/2014 06:38 AM, Dave Hansen wrote: +void do_mpx_bounds(struct pt_regs *regs, siginfo_t *info, + struct xsave_struct *xsave_buf) +{ + struct mpx_insn insn; + uint8_t bndregno; + unsigned long addr_vio; + + addr_vio = mpx_insn_decode(, regs); + +

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-30 Thread Dave Hansen
> +void do_mpx_bounds(struct pt_regs *regs, siginfo_t *info, > + struct xsave_struct *xsave_buf) > +{ > + struct mpx_insn insn; > + uint8_t bndregno; > + unsigned long addr_vio; > + > + addr_vio = mpx_insn_decode(, regs); > + > + bndregno =

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-30 Thread Dave Hansen
+void do_mpx_bounds(struct pt_regs *regs, siginfo_t *info, + struct xsave_struct *xsave_buf) +{ + struct mpx_insn insn; + uint8_t bndregno; + unsigned long addr_vio; + + addr_vio = mpx_insn_decode(insn, regs); + + bndregno =

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-30 Thread Ren Qiaowei
On 10/31/2014 06:38 AM, Dave Hansen wrote: +void do_mpx_bounds(struct pt_regs *regs, siginfo_t *info, + struct xsave_struct *xsave_buf) +{ + struct mpx_insn insn; + uint8_t bndregno; + unsigned long addr_vio; + + addr_vio = mpx_insn_decode(insn, regs); + +

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-28 Thread Ren Qiaowei
On 10/28/2014 04:36 AM, Thomas Gleixner wrote: On Mon, 27 Oct 2014, Ren, Qiaowei wrote: On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-28 Thread Ren Qiaowei
On 10/28/2014 04:36 AM, Thomas Gleixner wrote: On Mon, 27 Oct 2014, Ren, Qiaowei wrote: On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 2014, Qiaowei Ren wrote: This patch sets bound violation fields of siginfo struct in #BR exception handler by decoding the user instruction and

RE: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-27 Thread Thomas Gleixner
On Mon, 27 Oct 2014, Ren, Qiaowei wrote: > On 2014-10-24, Thomas Gleixner wrote: > > On Sun, 12 Oct 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.

RE: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-27 Thread Thomas Gleixner
On Mon, 27 Oct 2014, Ren, Qiaowei wrote: On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 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 v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-26 Thread Ren, Qiaowei
On 2014-10-24, Thomas Gleixner wrote: > On Sun, 12 Oct 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,

RE: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-26 Thread Ren, Qiaowei
On 2014-10-24, Thomas Gleixner wrote: On Sun, 12 Oct 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 v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-24 Thread Thomas Gleixner
On Sun, 12 Oct 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

Re: [PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-24 Thread Thomas Gleixner
On Sun, 12 Oct 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

[PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-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

[PATCH v9 09/12] x86, mpx: decode MPX instruction to get bound violation information

2014-10-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