Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755666Ab3JCWnN (ORCPT ); Thu, 3 Oct 2013 18:43:13 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:35574 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755593Ab3JCWnM (ORCPT ); Thu, 3 Oct 2013 18:43:12 -0400 MIME-Version: 1.0 In-Reply-To: <524DEE6B.2060105@zytor.com> References: <1380833605-26313-1-git-send-email-keescook@chromium.org> <1380833605-26313-4-git-send-email-keescook@chromium.org> <524DEE6B.2060105@zytor.com> Date: Thu, 3 Oct 2013 15:43:11 -0700 X-Google-Sender-Auth: gYYM4G_Qpn4wXRvPtMHMgXFetMI Message-ID: Subject: Re: [PATCH 3/7] x86, kaslr: find minimum safe relocation position From: Kees Cook To: "H. Peter Anvin" Cc: LKML , "x86@kernel.org" , "kernel-hardening@lists.openwall.com" , Aaron Durbin , Eric Northup , Julien Tinnes , Will Drewry , Mathias Krause , Zhang Yanfei 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: 1139 Lines: 31 On Thu, Oct 3, 2013 at 3:23 PM, H. Peter Anvin wrote: > On 10/03/2013 01:53 PM, Kees Cook wrote: >> Examine all the known unsafe areas and avoid them by just raising the >> minimum relocation position to be past them. >> >> Signed-off-by: Kees Cook > >> + /* Minimum location must be above all these regions: */ > > This is highly problematic. The standard protocol is to hoist the > initramfs as high as possible in memory, so this may really unacceptably > restrict the available range. Doesn't this depend on the boot loader's behavior? > It would be better to treat these the same as reserved regions in the > e820 map as far as the address space picking algorithm is concerned. Could this be considered a future optimization, or do you feel this is required even for this first patch series landing? -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/