Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751844AbbBRLaH (ORCPT ); Wed, 18 Feb 2015 06:30:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38685 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751702AbbBRLaF (ORCPT ); Wed, 18 Feb 2015 06:30:05 -0500 Date: Wed, 18 Feb 2015 19:29:56 +0800 From: Baoquan He To: Yinghai Lu Cc: Linux Kernel Mailing List Subject: Re: [PATCH] x86, boot: Allow 64bit EFI kernel to be loaded above 4G Message-ID: <20150218112956.GA1965@dhcp-17-102.nay.redhat.com> References: <1423015400-12629-1-git-send-email-yinghai@kernel.org> <20150211061148.GA4448@dhcp-17-102.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1822 Lines: 47 On 02/17/15 at 11:22pm, Yinghai Lu wrote: > On Tue, Feb 10, 2015 at 10:11 PM, Baoquan He wrote: > > Hi Yinghai, > > > > Could you please help to have a look at a problem which I encountered? > > > > I am trying to make kaslr randomize on both kernel physical and virtual > > address separately. Now the separate randomization has been done, > > kernel physical address can be randomized to [16M, 4G], and virtual > > address can be randomzed to [16M, 1G]. Below is the post. > > http://thread.gmane.org/gmane.linux.kernel/1870532 > > > > Now I am trying to make kernel physical address randomize anywhere, not > > limited to below 4G. As you know in arch/x86/boot/compressed/head_64.S a > > identity mapping of 0~4G has been built, for address above 4G I added an > > IDT and #PF handler. Then I hardcoded the output address of > > choose_kernel_location as 5G, the #PF handler worked, however it will > > reboot in arch/x86/kernel/head_64.S. > > For 64bit, I'd like to see bootloader could load kernel to random hw address. > > otherwise you will need to set another ident mapping for new range. Hi Yinghai, I am sorry I didn't get what you mean. I have tried to set another ident mapping for new range and it is successful seeing from debug message printing. However it always reboot because of GPF. That's why I made that small debug patch which add another 4G ident mapping and hardcoded to put kernel between 4G and 8G. Could you say more of it? Or which direction should I go? Thanks a lot for your help! Thanks Baoquan > > Thanks > > Yinghai -- 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/