From: Thomas Garnier <thgarnie@google.com> To: Andy Lutomirski <luto@amacapital.net> Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Alexander Potapenko <glider@google.com>, Dmitry Vyukov <dvyukov@google.com>, Kees Cook <keescook@chromium.org>, Andy Lutomirski <luto@kernel.org>, Arjan van de Ven <arjan@linux.intel.com>, Paul Gortmaker <paul.gortmaker@windriver.com>, Borislav Petkov <bp@suse.de>, "Rafael J . Wysocki" <rjw@rjwysocki.net>, Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>, Jiri Kosina <jikos@kernel.org>, Matt Fleming <matt@codeblueprint.co.uk>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, Juergen Gross <jgross@suse.com>, Rusty Russell <rusty@rustcorp.com.au>, Christian Borntraeger <borntraeger@de.ibm.com>, Fenghua Yu <fenghua.yu@intel.com>, He Chen <he.chen@linux.intel.com>, Brian Subject: Re: [PATCH v2 2/3] x86: Remap GDT tables in the Fixmap section Date: Thu, 26 Jan 2017 11:10:23 -0800 [thread overview] Message-ID: <CAJcbSZE7jnzdDSjOb7MsZZrO9UYRrhmUxwvNknhBkWiPBnvTDw@mail.gmail.com> (raw) In-Reply-To: <CALCETrVCM5Ex2HWh64Lc8=jEyTCA4h9JiB0pMuZdZBEkjbChUw@mail.gmail.com> On Thu, Jan 26, 2017 at 10:52 AM, Andy Lutomirski <luto@amacapital.net> wrote: > On Thu, Jan 26, 2017 at 8:59 AM, Thomas Garnier <thgarnie@google.com> wrote: >> Each processor holds a GDT in its per-cpu structure. The sgdt >> instruction gives the base address of the current GDT. This address can >> be used to bypass KASLR memory randomization. With another bug, an >> attacker could target other per-cpu structures or deduce the base of >> the main memory section (PAGE_OFFSET). >> >> This patch relocates the GDT table for each processor inside the >> Fixmap section. The space is reserved based on number of supported >> processors. >> >> For consistency, the remapping is done by default on 32 and 64 bit. >> >> Each processor switches to its remapped GDT at the end of >> initialization. For hibernation, the main processor returns with the >> original GDT and switches back to the remapping at completion. >> >> This patch was tested on both architectures. Hibernation and KVM were >> both tested specially for their usage of the GDT. > > I like this version much better. Thanks! Thanks for the feedback! I like this version better too. > > --Andy -- Thomas
WARNING: multiple messages have this Message-ID (diff)
From: Thomas Garnier <thgarnie@google.com> To: Andy Lutomirski <luto@amacapital.net> Cc: "Thomas Gleixner" <tglx@linutronix.de>, "Ingo Molnar" <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>, "Andrey Ryabinin" <aryabinin@virtuozzo.com>, "Alexander Potapenko" <glider@google.com>, "Dmitry Vyukov" <dvyukov@google.com>, "Kees Cook" <keescook@chromium.org>, "Andy Lutomirski" <luto@kernel.org>, "Arjan van de Ven" <arjan@linux.intel.com>, "Paul Gortmaker" <paul.gortmaker@windriver.com>, "Borislav Petkov" <bp@suse.de>, "Rafael J . Wysocki" <rjw@rjwysocki.net>, "Len Brown" <len.brown@intel.com>, "Pavel Machek" <pavel@ucw.cz>, "Jiri Kosina" <jikos@kernel.org>, "Matt Fleming" <matt@codeblueprint.co.uk>, "Ard Biesheuvel" <ard.biesheuvel@linaro.org>, "Boris Ostrovsky" <boris.ostrovsky@oracle.com>, "Juergen Gross" <jgross@suse.com>, "Rusty Russell" <rusty@rustcorp.com.au>, "Christian Borntraeger" <borntraeger@de.ibm.com>, "Fenghua Yu" <fenghua.yu@intel.com>, "He Chen" <he.chen@linux.intel.com>, "Brian Gerst" <brgerst@gmail.com>, "Luis R . Rodriguez" <mcgrof@kernel.org>, "Adam Buchbinder" <adam.buchbinder@gmail.com>, "Stanislaw Gruszka" <sgruszka@redhat.com>, "Arnd Bergmann" <arnd@arndb.de>, "Dave Hansen" <dave.hansen@intel.com>, "Chen Yucong" <slaoub@gmail.com>, "Vitaly Kuznetsov" <vkuznets@redhat.com>, "David Vrabel" <david.vrabel@citrix.com>, "Josh Poimboeuf" <jpoimboe@redhat.com>, "Tim Chen" <tim.c.chen@linux.intel.com>, "Rik van Riel" <riel@redhat.com>, "Andi Kleen" <ak@linux.intel.com>, "Jiri Olsa" <jolsa@redhat.com>, "Prarit Bhargava" <prarit@redhat.com>, "Michael Ellerman" <mpe@ellerman.id.au>, "Joerg Roedel" <joro@8bytes.org>, "Paolo Bonzini" <pbonzini@redhat.com>, "Radim Krčmář" <rkrcmar@redhat.com>, "X86 ML" <x86@kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, kasan-dev <kasan-dev@googlegroups.com>, "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>, "linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>, "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>, lguest@lists.ozlabs.org, "kvm list" <kvm@vger.kernel.org>, "kernel-hardening@lists.openwall.com" <kernel-hardening@lists.openwall.com> Subject: [kernel-hardening] Re: [PATCH v2 2/3] x86: Remap GDT tables in the Fixmap section Date: Thu, 26 Jan 2017 11:10:23 -0800 [thread overview] Message-ID: <CAJcbSZE7jnzdDSjOb7MsZZrO9UYRrhmUxwvNknhBkWiPBnvTDw@mail.gmail.com> (raw) In-Reply-To: <CALCETrVCM5Ex2HWh64Lc8=jEyTCA4h9JiB0pMuZdZBEkjbChUw@mail.gmail.com> On Thu, Jan 26, 2017 at 10:52 AM, Andy Lutomirski <luto@amacapital.net> wrote: > On Thu, Jan 26, 2017 at 8:59 AM, Thomas Garnier <thgarnie@google.com> wrote: >> Each processor holds a GDT in its per-cpu structure. The sgdt >> instruction gives the base address of the current GDT. This address can >> be used to bypass KASLR memory randomization. With another bug, an >> attacker could target other per-cpu structures or deduce the base of >> the main memory section (PAGE_OFFSET). >> >> This patch relocates the GDT table for each processor inside the >> Fixmap section. The space is reserved based on number of supported >> processors. >> >> For consistency, the remapping is done by default on 32 and 64 bit. >> >> Each processor switches to its remapped GDT at the end of >> initialization. For hibernation, the main processor returns with the >> original GDT and switches back to the remapping at completion. >> >> This patch was tested on both architectures. Hibernation and KVM were >> both tested specially for their usage of the GDT. > > I like this version much better. Thanks! Thanks for the feedback! I like this version better too. > > --Andy -- Thomas
next prev parent reply other threads:[~2017-01-26 19:10 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-01-26 16:59 [PATCH v2 1/3] x86/mm: Adapt MODULES_END based on Fixmap section size Thomas Garnier 2017-01-26 16:59 ` [kernel-hardening] " Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-01-26 16:59 ` [PATCH v2 2/3] x86: Remap GDT tables in the Fixmap section Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-01-26 16:59 ` [kernel-hardening] " Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-01-26 18:52 ` Andy Lutomirski 2017-01-26 18:52 ` [kernel-hardening] " Andy Lutomirski 2017-01-26 19:10 ` Thomas Garnier [this message] 2017-01-26 19:10 ` Thomas Garnier 2017-01-26 19:10 ` Thomas Garnier 2017-01-26 18:52 ` Andy Lutomirski 2017-01-26 16:59 ` [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-01-26 16:59 ` [kernel-hardening] " Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-01-26 16:59 ` Thomas Garnier 2017-02-01 9:15 ` Ingo Molnar 2017-02-01 9:15 ` [kernel-hardening] " Ingo Molnar 2017-02-01 9:15 ` Ingo Molnar 2017-02-02 5:13 ` Andy Lutomirski 2017-02-02 5:13 ` Andy Lutomirski 2017-02-02 5:13 ` [kernel-hardening] " Andy Lutomirski 2017-02-02 5:13 ` Andy Lutomirski 2017-02-02 7:12 ` Ingo Molnar 2017-02-02 7:12 ` [kernel-hardening] " Ingo Molnar 2017-02-02 7:12 ` Ingo Molnar 2017-02-02 7:12 ` Ingo Molnar 2017-02-01 9:15 ` Ingo Molnar 2017-02-02 5:14 ` Andy Lutomirski 2017-02-02 5:14 ` Andy Lutomirski 2017-02-02 5:14 ` [kernel-hardening] " Andy Lutomirski 2017-02-06 22:10 ` Thomas Garnier 2017-02-06 22:10 ` Thomas Garnier 2017-02-06 22:10 ` [kernel-hardening] " Thomas Garnier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAJcbSZE7jnzdDSjOb7MsZZrO9UYRrhmUxwvNknhBkWiPBnvTDw@mail.gmail.com \ --to=thgarnie@google.com \ --cc=ard.biesheuvel@linaro.org \ --cc=arjan@linux.intel.com \ --cc=aryabinin@virtuozzo.com \ --cc=boris.ostrovsky@oracle.com \ --cc=borntraeger@de.ibm.com \ --cc=bp@suse.de \ --cc=dvyukov@google.com \ --cc=fenghua.yu@intel.com \ --cc=glider@google.com \ --cc=he.chen@linux.intel.com \ --cc=hpa@zytor.com \ --cc=jgross@suse.com \ --cc=jikos@kernel.org \ --cc=keescook@chromium.org \ --cc=len.brown@intel.com \ --cc=luto@amacapital.net \ --cc=luto@kernel.org \ --cc=matt@codeblueprint.co.uk \ --cc=mingo@redhat.com \ --cc=paul.gortmaker@windriver.com \ --cc=pavel@ucw.cz \ --cc=rjw@rjwysocki.net \ --cc=rusty@rustcorp.com.au \ --cc=tglx@linutronix.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.