x86/xen: init %gs very early to avoid page faults with stack protector
authorJuergen Gross <jgross@suse.com>
Thu, 1 Feb 2018 12:40:19 +0000 (13:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Feb 2018 14:42:18 +0000 (15:42 +0100)
commit41fd295d90a7d8518f3d3d705884fb05df9596f0
tree02bd2c7b39fd487d98a11c98599fbc7c0654365b
parent04f048fad32e191d48c1a260d6aa74e27cfe846e
x86/xen: init %gs very early to avoid page faults with stack protector

commit 4f277295e54c5b7340e48efea3fc5cc21a2872b7 upstream.

When running as Xen pv guest %gs is initialized some time after
C code is started. Depending on stack protector usage this might be
too late, resulting in page faults.

So setup %gs and MSR_GS_BASE in assembly code already.

Cc: stable@vger.kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Tested-by: Chris Patterson <cjp256@gmail.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/xen/xen-head.S