Re: [PATCH 01/19] x86, mpx, xsave: fix up bad get_xsave_addr() assumptions

Thomas Gleixner
2015-05-18T19:34:26Z

On Fri, 8 May 2015, Dave Hansen wrote:
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> get_xsave_addr() assumes that if an xsave bit is present in the
> hardware (pcntxt_mask) that it is present in a given xsave
> buffer. Due to an bug in the xsave code on all of the systems
> that have MPX (and thus all the users of this code), that has
> been a true assumption.
>
> But, the bug is getting fixed, so our assumption is not going
> to hold any more.
>
> It's quite possible (and normal) for an enabled state to be
> present on 'pcntxt_mask', but *not* in 'xstate_bv'. We need
> to consult 'xstate_bv'.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>