From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763633AbdAETLn (ORCPT ); Thu, 5 Jan 2017 14:11:43 -0500 Received: from mail-io0-f174.google.com ([209.85.223.174]:34897 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965324AbdAETEk (ORCPT ); Thu, 5 Jan 2017 14:04:40 -0500 MIME-Version: 1.0 In-Reply-To: References: <20170104221630.831-1-thgarnie@google.com> From: Thomas Garnier Date: Thu, 5 Jan 2017 11:03:14 -0800 Message-ID: Subject: Re: [RFC] x86/mm/KASLR: Remap GDTs at fixed location To: Arjan van de Ven Cc: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Kees Cook , Borislav Petkov , Andy Lutomirski , Dave Hansen , Chen Yucong , Paul Gortmaker , Andrew Morton , Masahiro Yamada , Sebastian Andrzej Siewior , Anna-Maria Gleixner , Boris Ostrovsky , Rasmus Villemoes , Michael Ellerman , Juergen Gross , Richard Weinberger , X86 ML , "linux-kernel@vger.kernel.org" , "kernel-hardening@lists.openwall.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 5, 2017 at 10:58 AM, Arjan van de Ven wrote: > On 1/5/2017 9:54 AM, Thomas Garnier wrote: > >> >> That's my goal too. I started by doing a RO remap and got couple >> problems with hibernation. I can try again for the next iteration or >> delay it for another patch. I also need to look at KVM GDT usage, I am >> not familiar with it yet. > > > don't we write to the GDT as part of the TLS segment stuff for glibc ? > Not sure which glibc feature it is. In this design, you can write to the GDT per-cpu variable that will remain read-write. You just need to make the remapping writeable when we load task registers (ltr) then the processor use the current GDT address. At least that the case I know, I might find more through testing. -- Thomas