Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbdGUKdx (ORCPT ); Fri, 21 Jul 2017 06:33:53 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36317 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849AbdGUKdv (ORCPT ); Fri, 21 Jul 2017 06:33:51 -0400 Date: Fri, 21 Jul 2017 12:33:47 +0200 From: Ingo Molnar To: Baoquan He Cc: linux-kernel@vger.kernel.org, x86@kernel.org, keescook@chromium.org, matt@codeblueprint.co.uk, tglx@linutronix.de, hpa@zytor.com, izumi.taku@jp.fujitsu.com, fanc.fnst@cn.fujitsu.com, thgarnie@google.com, n-horiguchi@ah.jp.nec.com Subject: Re: [PATCH v6 RESEND] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions Message-ID: <20170721103347.ticzuwed3ljys6kf@gmail.com> References: <1500542189-15779-1-git-send-email-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500542189-15779-1-git-send-email-bhe@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1084 Lines: 30 * Baoquan He wrote: > Kernel text may be located in non-mirror regions (movable zone) when both > address range mirroring feature and KASLR are enabled. > > The address range mirroring feature arranges such mirror region into > normal zone and other region into movable zone in order to locate > kernel code and data in mirror region. The physical memory region > whose descriptors in EFI memory map has EFI_MEMORY_MORE_RELIABLE > attribute (bit: 16) are mirrored. > > If efi is detected, iterate efi memory map and pick the mirror region to > process for adding candidate of randomization slot. If efi is disabled > or no mirror region found, still process e820 memory map. Please read your own changelogs and capitalize 'EFI' consistently! Also, what is unclear to me after reading this changelog, what does this patch actually achieve, relative to existing behavior? It would be helpful if it was structured like this: Previous behavior was that the kernel would ... This patch changes the old behavior so that the kernel now ... Thanks, Ingo