lkml.org 
[lkml]   [2015]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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>


\
 
 \ /
  Last update: 2015-05-19 10:41    [W:0.148 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site