Re: [Xen-devel] [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit

2017-02-06 Thread Thomas Garnier
On Wed, Feb 1, 2017 at 9:14 PM, Andy Lutomirski wrote: > On Thu, Jan 26, 2017 at 8:59 AM, Thomas Garnier wrote: >> This patch makes the GDT remapped pages read-only to prevent corruption. >> This change is done only on 64 bit. >> >> The native_load_tr_desc function was adapted to correctly handle

Re: [Xen-devel] [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit

2017-02-01 Thread Ingo Molnar
* Andy Lutomirski wrote: > On Wed, Feb 1, 2017 at 1:15 AM, Ingo Molnar wrote: > > > > * Thomas Garnier wrote: > > > >> This patch makes the GDT remapped pages read-only to prevent corruption. > >> This change is done only on 64 bit. > > > > > >> > >> - table_base = gdt->address; > >> +

Re: [Xen-devel] [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit

2017-02-01 Thread Andy Lutomirski
On Thu, Jan 26, 2017 at 8:59 AM, Thomas Garnier wrote: > This patch makes the GDT remapped pages read-only to prevent corruption. > This change is done only on 64 bit. > > The native_load_tr_desc function was adapted to correctly handle a > read-only GDT. The LTR instruction always writes to the G

Re: [Xen-devel] [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit

2017-02-01 Thread Andy Lutomirski
On Wed, Feb 1, 2017 at 1:15 AM, Ingo Molnar wrote: > > * Thomas Garnier wrote: > >> This patch makes the GDT remapped pages read-only to prevent corruption. >> This change is done only on 64 bit. > >> >> - table_base = gdt->address; >> + table_base = (unsigned long)get_current_direct_gd

Re: [Xen-devel] [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit

2017-02-01 Thread Ingo Molnar
* Thomas Garnier wrote: > This patch makes the GDT remapped pages read-only to prevent corruption. > This change is done only on 64 bit. Please spell '64-bit' consistently through the series. I've seen two variants: 64 bit 64bit > +/* > + * The LTR instruction marks the TSS GDT entry as b

[Xen-devel] [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit

2017-01-26 Thread Thomas Garnier
This patch makes the GDT remapped pages read-only to prevent corruption. This change is done only on 64 bit. The native_load_tr_desc function was adapted to correctly handle a read-only GDT. The LTR instruction always writes to the GDT TSS entry. This generates a page fault if the GDT is read-only