Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-13 Thread Thomas Garnier
On Mon, Mar 13, 2017 at 11:32 AM, Boris Ostrovsky wrote: > There are a couple of problems for Xen PV guests that need to be addressed: > 1. Xen's set_fixmap op needs non-default handling for > FIX_GDT_REMAP_BEGIN range > 2. GDT remapping for PV guests needs to be RO for both 64 and 32-bit guests.

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-13 Thread Boris Ostrovsky
On 03/09/2017 06:17 PM, Boris Ostrovsky wrote: > On 03/09/2017 05:31 PM, Thomas Garnier wrote: >> On Thu, Mar 9, 2017 at 2:13 PM, Boris Ostrovsky >> wrote: > I don't have any experience with Xen so it would be great if virtme can > test it. I am pretty sure I tested this series at so

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Boris Ostrovsky
On 03/09/2017 05:31 PM, Thomas Garnier wrote: > On Thu, Mar 9, 2017 at 2:13 PM, Boris Ostrovsky > wrote: I don't have any experience with Xen so it would be great if virtme can test it. >>> I am pretty sure I tested this series at some point but I'll test it again. >>> >> >> Fails 32-bi

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Thomas Garnier
On Thu, Mar 9, 2017 at 2:13 PM, Boris Ostrovsky wrote: > >>> I don't have any experience with Xen so it would be great if virtme can >>> test it. >> >> I am pretty sure I tested this series at some point but I'll test it again. >> > > > Fails 32-bit build: > > > /home/build/linux-boris/arch/x86/k

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Boris Ostrovsky
>> I don't have any experience with Xen so it would be great if virtme can test >> it. > > I am pretty sure I tested this series at some point but I'll test it again. > Fails 32-bit build: /home/build/linux-boris/arch/x86/kvm/vmx.c: In function ‘segment_base’: /home/build/linux-boris/arch/x86

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Boris Ostrovsky
On 03/09/2017 04:54 PM, Thomas Garnier wrote: > On Thu, Mar 9, 2017 at 1:46 PM, Andy Lutomirski wrote: >> On Thu, Mar 9, 2017 at 1:43 PM, Andrew Cooper >> wrote: >>> On 09/03/2017 21:32, Andy Lutomirski wrote: On Mon, Mar 6, 2017 at 2:03 PM, Thomas Garnier wrote: > --- a/arch/x86/

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Thomas Garnier
On Thu, Mar 9, 2017 at 1:46 PM, Andy Lutomirski wrote: > On Thu, Mar 9, 2017 at 1:43 PM, Andrew Cooper > wrote: >> On 09/03/2017 21:32, Andy Lutomirski wrote: >>> On Mon, Mar 6, 2017 at 2:03 PM, Thomas Garnier wrote: >>> --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c >>

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Andy Lutomirski
On Thu, Mar 9, 2017 at 1:43 PM, Andrew Cooper wrote: > On 09/03/2017 21:32, Andy Lutomirski wrote: >> On Mon, Mar 6, 2017 at 2:03 PM, Thomas Garnier wrote: >> >>> --- a/arch/x86/xen/enlighten.c >>> +++ b/arch/x86/xen/enlighten.c >>> @@ -710,7 +710,7 @@ static void load_TLS_descriptor(struct threa

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Andrew Cooper
On 09/03/2017 21:32, Andy Lutomirski wrote: > On Mon, Mar 6, 2017 at 2:03 PM, Thomas Garnier wrote: > >> --- a/arch/x86/xen/enlighten.c >> +++ b/arch/x86/xen/enlighten.c >> @@ -710,7 +710,7 @@ static void load_TLS_descriptor(struct thread_struct *t, >> >> *shadow = t->tls_array[i]; >> >> -

Re: [Xen-devel] [PATCH v5 2/3] x86: Remap GDT tables in the Fixmap section

2017-03-09 Thread Andy Lutomirski
On Mon, Mar 6, 2017 at 2:03 PM, Thomas Garnier wrote: > Each processor holds a GDT in its per-cpu structure. The sgdt > instruction gives the base address of the current GDT. This address can > be used to bypass KASLR memory randomization. With another bug, an > attacker could target other per-cpu