Re: [PATCH 4.4.y 051/101] x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/07/18 11:33, Srivatsa S. Bhat wrote:
> From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> 
> commit def9331a12977770cc6132d79f8e6565871e8e38 upstream
> 
> When running as Xen pv guest X86_BUG_SYSRET_SS_ATTRS must not be set
> on AMD cpus.
> 
> This bug/feature bit is kind of special as it will be used very early
> when switching threads. Setting the bit and clearing it a little bit
> later leaves a critical window where things can go wrong. This time
> window has enlarged a little bit by using setup_clear_cpu_cap() instead
> of the hypervisor's set_cpu_features callback. It seems this larger
> window now makes it rather easy to hit the problem.
> 
> The proper solution is to never set the bit in case of Xen.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Acked-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Srivatsa S. Bhat <srivatsa@xxxxxxxxxxxxx>
> Reviewed-by: Matt Helsley (VMware) <matt.helsley@xxxxxxxxx>
> Reviewed-by: Alexey Makhalov <amakhalov@xxxxxxxxxx>
> Reviewed-by: Bo Gan <ganb@xxxxxxxxxx>

I believe you'll need upstream commit
60d3450167433f2d099ce2869dc52dd9e7dc9b29 ("x86/cpu: Re-apply forced caps
every time CPU caps are re-read") for this patch to work as intended.

It was necessary for 4.9, at least.


Juergen



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux