Thread (10 messages) 10 messages, 4 authors, 2017-02-06

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

From: Ingo Molnar <mingo@kernel.org>
Date: 2017-02-02 07:12:25
Also in: linux-efi, linux-pm

* Andy Lutomirski [off-list ref] wrote:
On Wed, Feb 1, 2017 at 1:15 AM, Ingo Molnar [off-list ref] wrote:
quoted
* Thomas Garnier [off-list ref] wrote:
quoted
This patch makes the GDT remapped pages read-only to prevent corruption.
This change is done only on 64 bit.
quoted
quoted
-     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.
Yeah, even better!

Thanks,

	Ingo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help