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

2014-07-21 Thread Ren, Qiaowei
On 2014-07-21, Andi Kleen wrote: > Qiaowei Ren writes: >> + */ >> +#ifdef CONFIG_X86_64 >> +insn->x86_64 = 1; >> +insn->addr_bytes = 8; >> +#else >> +insn->x86_64 = 0; >> +insn->addr_bytes = 4; >> +#endif > > How would that handle compat mode on a 64bit kernel? > Should

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

2014-07-21 Thread Andi Kleen
Qiaowei Ren writes: > + */ > +#ifdef CONFIG_X86_64 > + insn->x86_64 = 1; > + insn->addr_bytes = 8; > +#else > + insn->x86_64 = 0; > + insn->addr_bytes = 4; > +#endif How would that handle compat mode on a 64bit kernel? Should likely look at the code segment instead of ifdef.

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

2014-07-21 Thread Andi Kleen
Qiaowei Ren qiaowei@intel.com writes: + */ +#ifdef CONFIG_X86_64 + insn-x86_64 = 1; + insn-addr_bytes = 8; +#else + insn-x86_64 = 0; + insn-addr_bytes = 4; +#endif How would that handle compat mode on a 64bit kernel? Should likely look at the code segment instead

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

2014-07-21 Thread Ren, Qiaowei
On 2014-07-21, Andi Kleen wrote: Qiaowei Ren qiaowei@intel.com writes: + */ +#ifdef CONFIG_X86_64 +insn-x86_64 = 1; +insn-addr_bytes = 8; +#else +insn-x86_64 = 0; +insn-addr_bytes = 4; +#endif How would that handle compat mode on a 64bit kernel? Should likely