Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935162AbdCXJYp (ORCPT ); Fri, 24 Mar 2017 05:24:45 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34410 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934157AbdCXJYj (ORCPT ); Fri, 24 Mar 2017 05:24:39 -0400 Date: Fri, 24 Mar 2017 10:24:34 +0100 From: Ingo Molnar To: Dave Young Cc: Baoquan He , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-efi@vger.kernel.org, Thomas Garnier , Kees Cook , Borislav Petkov , Andrew Morton , Masahiro Yamada , Bhupesh Sharma Subject: Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into KASLR VA space for randomization Message-ID: <20170324092433.GA3237@gmail.com> References: <1490331592-31860-1-git-send-email-bhe@redhat.com> <20170324080833.GA15200@gmail.com> <20170324083451.GC30442@x1> <20170324084609.GA6807@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170324084609.GA6807@dhcp-128-65.nay.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 920 Lines: 27 * Dave Young wrote: > > > So I applied this kexec fix and extended the changelog to clearly show why > > > this fix matters in practice. > > > > I thought it only impacts kexec, but Dave thought it will impact 1st kenrel > > either. > > Yes, I think no need to mention kexec, it is a general issue. > > First, the space is reserved for EFI, so kernel should not use it for kaslr. It's the kernel's EFI code, and we map whatever address we want (and then pass that to the EFI runtime), so wether it's randomized or not is the Linux kernel's policy decision... So that's my question: can these memory regions include security sensitive data, and if yes, how can we best randomize it while kexec and other kernel and EFI features still work? Preserving virtual addresses for kexec is a red herring: the randomized offset could be passed to the kexec-ed kernel just fine. Thanks, Ingo