Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp640957ybp; Wed, 9 Oct 2019 01:44:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzylFCvan9h+A2hsDGiJhVYf71vmD/v3XG2DEhn3QOkTDQQvZG/ey/4zTu9LtEHVRofDEXC X-Received: by 2002:aa7:d316:: with SMTP id p22mr1864037edq.77.1570610698265; Wed, 09 Oct 2019 01:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570610698; cv=none; d=google.com; s=arc-20160816; b=k58VPIQ3v9gIiBFvIO1kfAs8IrTv+e4ukHwTbGvyQ4tegmtjTuozpzTDE8a1cMqZf6 7O7ujfQf1t9P/LstofdK40hEtRzS7K1/Cqr1+Iz6DHVISVFOcGHuHiX/8Jc4Xr5WlErM XABSXtGmHW02lcz9nPm4GJGKcV03W6vRR/9awRrRghacxRRxLtvMEAKQNdEbdJ1W2Kuy qEtaDCgiWdssTc7dVqhLbkiO0WHMFjb0S9NN2mnlJIjJmz2m1BZzXRG8QGUakhzN7Bpf 9wForJnivNfkrbFUdTpYrpGliyiKu+Ne71UyexTOchnagtwpknoZ1bWczKIdpzCwh5B2 fGrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=8OMhmBrSDl45Yd0CnDMRZhjW9w3CFGDEaB72n51T8r0=; b=mIblIJwqhGGkhMSbktXzZX2VtdCijZbfxO2T7P+EATGiCfYGOKrv7ixo2CuBRF2Z8R 3s7PiXR1/8DUxJL+Ar5mRJRYDRYOLLmJQW3Vucur/N3f27Bsej/V+1YNHgkbkpw2kD0l /LhPApnMKnR6s4dOeDgE8MMjdR/vUD/mYiaDbUct/BGgkkxPobrKLdktEAa5Usk9Cdyu 0U/qhWs5EMC3jss7DABNWUuOMKKyGfwTxYL630xZ6YsrAaypRS3q+OarqoqAcsbqvCzX HcTXYoznkfrln6BHDRstlMGCpmMbyqO4DLxWq7lccAisPOHFAa4SzMK+kMV5pY6Du3Y7 OXsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si728250ejx.315.2019.10.09.01.44.35; Wed, 09 Oct 2019 01:44:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728054AbfJIImJ (ORCPT + 99 others); Wed, 9 Oct 2019 04:42:09 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:58888 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725440AbfJIImI (ORCPT ); Wed, 9 Oct 2019 04:42:08 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2430E4051D3B32D1B745; Wed, 9 Oct 2019 16:42:07 +0800 (CST) Received: from [127.0.0.1] (10.177.96.203) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Wed, 9 Oct 2019 16:42:00 +0800 Subject: Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32 To: Scott Wood , , , , , , , , , CC: , , , , , References: <20190920094546.44948-1-yanaijie@huawei.com> <9c2dd2a8-83f2-983c-383e-956e19a7803a@huawei.com> <38141b946f3376ce471e46eaf065e357ac540354.camel@buserror.net> From: Jason Yan Message-ID: <90bb659a-bde4-3b8e-8f01-bf22d7534f44@huawei.com> Date: Wed, 9 Oct 2019 16:41:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <38141b946f3376ce471e46eaf065e357ac540354.camel@buserror.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.203] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Scott, On 2019/10/9 15:13, Scott Wood wrote: > On Wed, 2019-10-09 at 14:10 +0800, Jason Yan wrote: >> Hi Scott, >> >> Would you please take sometime to test this? >> >> Thank you so much. >> >> On 2019/9/24 13:52, Jason Yan wrote: >>> Hi Scott, >>> >>> Can you test v7 to see if it works to load a kernel at a non-zero address? >>> >>> Thanks, > > Sorry for the delay. Here's the output: > Thanks for the test. > ## Booting kernel from Legacy Image at 10000000 ... > Image Name: Linux-5.4.0-rc2-00050-g8ac2cf5b4 > Image Type: PowerPC Linux Kernel Image (gzip compressed) > Data Size: 7521134 Bytes = 7.2 MiB > Load Address: 04000000 > Entry Point: 04000000 > Verifying Checksum ... OK > ## Flattened Device Tree blob at 1fc00000 > Booting using the fdt blob at 0x1fc00000 > Uncompressing Kernel Image ... OK > Loading Device Tree to 07fe0000, end 07fff65c ... OK > KASLR: No safe seed for randomizing the kernel base. > OF: reserved mem: initialized node qman-fqd, compatible id fsl,qman-fqd > OF: reserved mem: initialized node qman-pfdr, compatible id fsl,qman-pfdr > OF: reserved mem: initialized node bman-fbpr, compatible id fsl,bman-fbpr > Memory CAM mapping: 64/64/64 Mb, residual: 12032Mb When boot from 04000000, the max CAM value is 64M. And you have a board with 12G memory, CONFIG_LOWMEM_CAM_NUM=3 means only 192M memory is mapped and when kernel is randomized at the middle of this 192M memory, we will not have enough continuous memory for node map. Can you set CONFIG_LOWMEM_CAM_NUM=8 and see if it works? Thanks. > Linux version 5.4.0-rc2-00050-g8ac2cf5b4e4a-dirty (scott@snotra) (gcc version 8. > 1.0 (GCC)) #26 SMP Wed Oct 9 01:50:40 CDT 2019 > Using CoreNet Generic machine description > printk: bootconsole [udbg0] enabled > CPU maps initialized for 1 thread per core > ----------------------------------------------------- > phys_mem_size = 0x2fc000000 > dcache_bsize = 0x40 > icache_bsize = 0x40 > cpu_features = 0x00000000000003b4 > possible = 0x00000000010103bc > always = 0x0000000000000020 > cpu_user_features = 0x8c008000 0x08000000 > mmu_features = 0x000a0010 > physical_start = 0xc7c4000 > ----------------------------------------------------- > CoreNet Generic board > mpc85xx_qe_init: Could not find Quicc Engine node > barrier-nospec: using isync; sync as speculation barrier > Zone ranges: > Normal [mem 0x0000000004000000-0x000000000fffffff] > HighMem [mem 0x0000000010000000-0x00000002ffffffff] > Movable zone start for each node > Early memory node ranges > node 0: [mem 0x0000000004000000-0x00000002ffffffff] > Initmem setup node 0 [mem 0x0000000004000000-0x00000002ffffffff] > Kernel panic - not syncing: Failed to allocate 125173760 bytes for node 0 memory > map > CPU: 0 PID: 0 Comm: swapper Not tainted 5.4.0-rc2-00050-g8ac2cf5b4e4a-dirty #26 > Call Trace: > [c989fe10] [c924bfb0] dump_stack+0x84/0xb4 (unreliable) > [c989fe30] [c880badc] panic+0x140/0x334 > [c989fe90] [c89a1144] alloc_node_mem_map.constprop.117+0xa0/0x11c > [c989feb0] [c95481c4] free_area_init_node+0x314/0x5b8 > [c989ff30] [c9548b34] free_area_init_nodes+0x57c/0x5c0 > [c989ff80] [c952cbb4] setup_arch+0x250/0x270 > [c989ffa0] [c95278e0] start_kernel+0x74/0x4e8 > [c989fff0] [c87c4478] set_ivor+0x150/0x18c > Kernel Offset: 0x87c4000 from 0xc0000000 > Rebooting in 180 seconds.. > > -Scott > > > > . >