RE: [PATCH v7 07/10] x86, mpx: decode MPX instruction to get bound violation information
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 likely look at the code segment instead of ifdef. >> +/* Note: the upper 32 bits are ignored in 32-bit mode. */ > > Again correct for compat mode? I believe the upper bits are undefined. > Compat mode will be supported on next patch in future, as 0/ patch mentioned. ^-^ Thanks, Qiaowei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 07/10] x86, mpx: decode MPX instruction to get bound violation information
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. > + /* Note: the upper 32 bits are ignored in 32-bit mode. */ Again correct for compat mode? I believe the upper bits are undefined. -Andi -- a...@linux.intel.com -- Speaking for myself only -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v7 07/10] x86, mpx: decode MPX instruction to get bound violation information
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 of ifdef. + /* Note: the upper 32 bits are ignored in 32-bit mode. */ Again correct for compat mode? I believe the upper bits are undefined. -Andi -- a...@linux.intel.com -- Speaking for myself only -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v7 07/10] x86, mpx: decode MPX instruction to get bound violation information
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 look at the code segment instead of ifdef. +/* Note: the upper 32 bits are ignored in 32-bit mode. */ Again correct for compat mode? I believe the upper bits are undefined. Compat mode will be supported on next patch in future, as 0/ patch mentioned. ^-^ Thanks, Qiaowei -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/