From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964815AbbBBQms (ORCPT ); Mon, 2 Feb 2015 11:42:48 -0500 Received: from terminus.zytor.com ([198.137.202.10]:42822 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932510AbbBBQmr (ORCPT ); Mon, 2 Feb 2015 11:42:47 -0500 Message-ID: <54CFA8EB.8050905@zytor.com> Date: Mon, 02 Feb 2015 08:42:19 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Baoquan He , linux-kernel@vger.kernel.org CC: tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, keescook@chromium.org, vgoyal@redhat.com, whissi@whissi.de Subject: Re: [PATCH 0/6] randomize kernel physical address and virtual address separately References: <1421811437-2787-1-git-send-email-bhe@redhat.com> In-Reply-To: <1421811437-2787-1-git-send-email-bhe@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/20/2015 07:37 PM, Baoquan He wrote: > > Leftover problem: > hpa want to see the physical randomization can cover the whole physical memory. I > checked code and found it's hard to do. Because in arch/x86/boot/compressed/head_64.S > an identity mapping of 4G is built and then kaslr and decompressing are done. The #PF > handler solution which he suggested is only available after jump into decompressed > kernel, namely in arch/x86/kernel/head_64.S. I didn't think of a way to do the whole > memory covering for physical address randomization, any suggestion or idea? > Basically, it means adding an IDT and #PF handler to the decompression code. Not really all that complex. -hpa