Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936647Ab3DHWzN (ORCPT ); Mon, 8 Apr 2013 18:55:13 -0400 Received: from mail-oa0-f47.google.com ([209.85.219.47]:47219 "EHLO mail-oa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936220Ab3DHWzL (ORCPT ); Mon, 8 Apr 2013 18:55:11 -0400 MIME-Version: 1.0 In-Reply-To: <516348F6.1080902@zytor.com> References: <20130408224328.GA17641@www.outflux.net> <516348F6.1080902@zytor.com> Date: Mon, 8 Apr 2013 15:55:10 -0700 X-Google-Sender-Auth: B0nf3CzEuK7eSZps68H_hzmqQic Message-ID: Subject: Re: [PATCH] x86: make IDT read-only From: Kees Cook To: "H. Peter Anvin" Cc: Ingo Molnar , LKML , 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 Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 28 On Mon, Apr 8, 2013 at 3:47 PM, H. Peter Anvin wrote: > 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 > > This isn't quite what this patch does, though, right? There is still a > writable IDT mapping at all times, which is different from a true > readonly IDT, no? Ah, I guess that's true. I suppose I should say it makes the memory seen at the "sidt" location read-only. Can we make them both read-only? -Kees -- Kees Cook Chrome OS Security -- 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/