Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600908

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

From Pavel Machek <pavel@ucw.cz>
Newsgroups linux.kernel
Subject Re: [PATCH v7 3/3] x86: Make the GDT remapping read-only on 64-bit
Date 2017-03-14 22:10 +0100
Message-ID <tl1RE-5YL-11@gated-at.bofh.it> (permalink)
References <tkY7o-3hF-15@gated-at.bofh.it> <tkY7o-3hF-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue 2017-03-14 10:05:08, 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 GDT TSS entry.
> This generates a page fault if the GDT is read-only. This change checks
> if the current GDT is a remap and swap GDTs as needed. This function was
> tested by booting multiple machines and checking hibernation works
> properly.
> 
> KVM SVM and VMX were adapted to use the writeable GDT. On VMX, the
> per-cpu variable was removed for functions to fetch the original GDT.
> Instead of reloading the previous GDT, VMX will reload the fixmap GDT as
> expected. For testing, VMs were started and restored on multiple
> configurations.
> 
> Signed-off-by: Thomas Garnier <thgarnie@google.com>

Can we get the same change for 32-bit, too? Growing differences
between 32 and 64 bit are a bit of a problem...
								Pavel
								
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 3/3] x86: Make the GDT remapping read-only on 64-bit Thomas Garnier <thgarnie@google.com> - 2017-03-14 18:10 +0100
  Re: [PATCH v7 3/3] x86: Make the GDT remapping read-only on 64-bit Pavel Machek <pavel@ucw.cz> - 2017-03-14 22:10 +0100
    Re: [PATCH v7 3/3] x86: Make the GDT remapping read-only on 64-bit "H. Peter Anvin" <hpa@zytor.com> - 2017-03-14 23:50 +0100
  [tip:x86/mm] x86: Make the GDT remapping read-only on 64-bit tip-bot for Thomas Garnier <tipbot@zytor.com> - 2017-03-16 12:20 +0100

csiph-web