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

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

On Wed, Feb 1, 2017 at 1:15 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> * Thomas Garnier <thgarnie@xxxxxxxxxx> 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_gdt();
> Instead of spreading these type casts far and wide please introduce another
> accessor the returns 'unsigned long':
>         get_cpu_gdt_rw_vaddr()

That whole function is an abomination.  How about replacing 'unsigned
long table_base' with 'struct desc_struct *table'?  If you're feeling
really adventurous, *delete* that function and replace all of its
users with something sane.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.