Messages in this thread | | | Date | Tue, 19 May 2015 10:16:12 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [PATCH 03/19] x86, mpx: Use new get_xsave_field_ptr() |
| |
On Mon, 18 May 2015, Dave Hansen wrote: > From: Dave Hansen <dave.hansen@linux.intel.com> > > The MPX registers (bndcsr/bndcfgu/bndstatus) are not directly > accessible via normal instructions. They essentially act as > if they were floating point registers and are saved/restored > along with those registers. > > There are two main paths in the MPX code where we care about > the contents of these registers: > 1. #BR (bounds) faults > 2. the prctl() code where we are setting MPX up > > Both of those paths _might_ be called without the FPU having > been used. That means that 'tsk->thread.fpu.state' might > never be allocated. > > Also, fpu_save_init() is not preempt-safe. It was a bug to > call it without disabling preemption. The new > get_xsave_addr() calls unlazy_fpu() instead and properly > disables preemption. > > Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
| |