On 09/07/2015 10:17, Richard Henderson wrote: > + /* Disallow enabling only half of MPX. */ > + if ((mask ^ (mask * (XSTATE_BNDCSR / XSTATE_BNDREGS))) & XSTATE_BNDCSR) {
I'm refreshing patches 1-4 to add PKE support, and this caught my eye... What about just if (!!(mask & XSTATE_BNDCSR) != !!(mask & XSTATE_BNDREGS)) ? Paolo