Re: [PATCH v4 01/17] x86/mpx: Do not use SIB index if index points to R/ESP

2017-02-24 Thread Adan Hawthorn
On Thu, Feb 23, 2017 at 9:33 PM, Joe Perches wrote: > On Thu, 2017-02-23 at 14:17 -0800, Ricardo Neri wrote: >> On Thu, 2017-02-23 at 08:24 +0100, Peter Zijlstra wrote: >> > On Wed, Feb 22, 2017 at 10:36:50PM -0800, Ricardo Neri wrote: >> > > + /* >> > > + * A nega

Re: [PATCH v4 01/17] x86/mpx: Do not use SIB index if index points to R/ESP

2017-02-24 Thread Ricardo Neri
On Fri, 2017-02-24 at 09:47 -0500, Nathan Howard wrote: > Also, this code would read better with the inner test > reversed or done first > > if (indx_offset < 0) { > if (indx_offset != -EDOM) >

Re: [PATCH v4 15/17] x86/traps: Fixup general protection faults caused by UMIP

2017-02-24 Thread Andy Lutomirski
On Thu, Feb 23, 2017 at 2:15 PM, Ricardo Neri wrote: > On Thu, 2017-02-23 at 10:27 +0100, Peter Zijlstra wrote: >> On Wed, Feb 22, 2017 at 10:37:04PM -0800, Ricardo Neri wrote: >> > @@ -492,6 +493,9 @@ do_general_protection(struct pt_regs *regs, long >> > error_code) >> > RCU_LOCKDEP_WARN(!rc

Re: [PATCH v4 15/17] x86/traps: Fixup general protection faults caused by UMIP

2017-02-24 Thread Ricardo Neri
On Fri, 2017-02-24 at 11:11 -0800, Andy Lutomirski wrote: > > In a previous version Andy Lutomirsky suggested that > > if (user_mode(regs) && (fixup_umip_exception(regs) == 0)) > > > > was easier to read :). Although at the time fixup_umip_exception > > returned a numeric value. Now it only

Re: [PATCH v4 15/17] x86/traps: Fixup general protection faults caused by UMIP

2017-02-24 Thread H. Peter Anvin
Luck From: h...@zytor.com Message-ID: On February 24, 2017 11:36:19 AM PST, Ricardo Neri wrote: >On Fri, 2017-02-24 at 11:11 -0800, Andy Lutomirski wrote: >> > In a previous version Andy Lutomirsky suggested that >> > if (user_mode(regs) && (fixup_umip_exception(regs) == 0)) >> > >> >