Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937141Ab3DJJ5V (ORCPT ); Wed, 10 Apr 2013 05:57:21 -0400 Received: from mail-ea0-f180.google.com ([209.85.215.180]:34914 "EHLO mail-ea0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119Ab3DJJ5U (ORCPT ); Wed, 10 Apr 2013 05:57:20 -0400 Date: Wed, 10 Apr 2013 11:57:16 +0200 From: Ingo Molnar To: "Eric W. Biederman" Cc: "H. Peter Anvin" , Kees Cook , Ingo Molnar , linux-kernel@vger.kernel.org, Thomas Gleixner , x86@kernel.org, Konrad Rzeszutek Wilk , Jeremy Fitzhardinge , Marcelo Tosatti , Alex Shi , Borislav Petkov , Alexander Duyck , Frederic Weisbecker , Steven Rostedt , "Paul E. McKenney" , xen-devel@lists.xensource.com, virtualization@lists.linux-foundation.org, kernel-hardening@lists.openwall.com, Dan Rosenberg , Julien Tinnes , Will Drewry , Eric Northup Subject: Re: [PATCH] x86: make IDT read-only Message-ID: <20130410095716.GF24443@gmail.com> References: <20130408224328.GA17641@www.outflux.net> <51634935.9010905@zytor.com> <877gkc596d.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877gkc596d.fsf@xmission.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1694 Lines: 44 * Eric W. Biederman wrote: > "H. Peter Anvin" writes: > > > On 04/08/2013 03:43 PM, Kees Cook wrote: > >> This makes the IDT unconditionally read-only. This primarily removes > >> the IDT from being a target for arbitrary memory write attacks. It has > >> an added benefit of also not leaking (via the "sidt" instruction) the > >> kernel base offset, if it has been relocated. > >> > >> Signed-off-by: Kees Cook > >> Cc: Eric Northup > > > > Also, tglx: does this interfere with your per-cpu IDT efforts? > > Given that we don't change any IDT entries why would anyone want a > per-cpu IDT? The cache lines should easily be shared accross all > processors. That's true iif they are cached. If not then it's a remote DRAM access cache miss for all CPUs except the node that holds that memory. > Or are there some giant NUMA machines that trigger cache misses when accessing > the IDT and the penalty for pulling the cache line across the NUMA fabric is > prohibitive? IDT accesses for pure userspace execution are pretty rare. So we are not just talking about huge NUMA machines here but about ordinary NUMA machines taking a remote cache miss hit for the first IRQ or other IDT-accessing operation they do after some cache-intense user-space processing. It's a small effect, but it exists and improving it would be legitimate. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/