On Wed, Apr 6, 2016 at 11:04 AM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote: > [cc Dave Hansen for MPX] > > - For MPX, could we track which syscall called mpx_enable_management? > I.e. can we stash in_compat_syscall's return from > mpx_enable_management and use that instead of trying to determine the > MPX data structure format by the mm's initial type? > Even this may be more complicated than necessary. Could the MPX helpers just use user_64bit_mode? After all, if your bounds structures don't match your bitness and you take an MPX fault, you are screwed no matter what the kernel does, so why not just have the kernel helpers look at the user state? Hmm. There's mpx_unmap_tables, too, which complicates things. FWIW, caching the bounds directory address may not be so important. On my Skylake laptop, reading BNDCSR using XSAVE (RFBM set to just BNDCSR) takes about 100 cycles and reading it using XSAVEC takes about 75 cycles. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html