Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1707244imu; Wed, 12 Dec 2018 02:58:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/UnUfXzIMH/OOxvWpuAVYClxhe+M4FYojLGyYmSHGBs8AHXwYnL6TuAOxdQREwLcoywe8Q8 X-Received: by 2002:a63:a452:: with SMTP id c18mr18182910pgp.204.1544612293205; Wed, 12 Dec 2018 02:58:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544612293; cv=none; d=google.com; s=arc-20160816; b=S8U8ny0Cp5SOYyno20W4m5ajp9jjsq/5zW8m8TOn6/XeWd50raZzx7ARnwY7TXNVbv gnscRLWRn+oEHYTvcGNopdUvKSiDIKGhcUeqXA2US1ec5O17/5z++Qqdpn70pAAHdQrL nqrBpruox0N3e0r2jniq5dZdx8smzKLATy8HqrMF1qjz8JACJ8k00peUmMcPm/Gezcyr gu9oKT9CoBJMEGnlg/dVFsO3fOawH94kUBx+hochphzGFONu2idmKULHXZxWsVx6i0Jw UKTXCejEAtwcgx5qjaCUcVm7rBMzsV7sxXviJCf6R2rp1n6Fu7oUi8lnqjYvHvBrXAv0 mBUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=P3171MFeBAE+tW8eFGFqYGl0wpzuY/yxQQlUziioOXo=; b=TNeV9yia6l0yKS5uXhWm+2YHhH+k/I/iy+fjxhnjDO83vvcKoKOwSete2MZ+ef6v/V GXivqdzqubyQSG83n4DBQf8ftHmswoHx2rR0f2/sDzfvNcA+zU2SGVq9u98Yt31fNH5g v3O+vfkHy+t8ER2kWjXFqoIyynYJC0s3ZBMUAlUMdJitJ4qhP2h4ArQciTgzZZiUj594 Dk5dvCmxopmOLetxO/AG5aWRV0+gM12yzRXdRJpFgYLruR+/XNysHWNDfeGuuzXI/1gI KagG2PcyNLfUPGECZIDdRIxpJfGk1YflZwdyKKHt1qj/QXGsiw2gU6sc6fIL2qjBFEID LMzA== 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 e13si13637545pgh.251.2018.12.12.02.57.56; Wed, 12 Dec 2018 02:58:13 -0800 (PST) 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 S1727157AbeLLK46 (ORCPT + 99 others); Wed, 12 Dec 2018 05:56:58 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:41859 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726791AbeLLK45 (ORCPT ); Wed, 12 Dec 2018 05:56:57 -0500 X-UUID: e75b33134e604f8288fe585d2bd6fb8e-20181212 X-UUID: e75b33134e604f8288fe585d2bd6fb8e-20181212 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 446859826; Wed, 12 Dec 2018 18:56:53 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 12 Dec 2018 18:56:50 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 12 Dec 2018 18:56:51 +0800 From: Miles Chen To: Catalin Marinas , Will Deacon , Matthias Brugger CC: , , , , Miles Chen Subject: [PATCH] arm64: kaslr: print PHYS_OFFSET in dump_kernel_offset() Date: Wed, 12 Dec 2018 18:56:49 +0800 Message-ID: <1544612209-13660-1-git-send-email-miles.chen@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 5C17EFA49BFC5B10294428546CA39A4491BDC7A3175BB255EF1A6BC31283A15A2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When debug with kaslr, it is sometimes necessary to have PHYS_OFFSET to perform linear virtual address to physical address translation. Sometimes we're debugging with only few information such as a kernel log and a symbol file, print PHYS_OFFSET in dump_kernel_offset() for that case. Tested by: echo c > /proc/sysrq-trigger [ 11.996161] SMP: stopping secondary CPUs [ 11.996732] Kernel Offset: 0x2522200000 from 0xffffff8008000000 [ 11.996881] PHYS_OFFSET: 0xffffffeb40000000 Signed-off-by: Miles Chen Tested-by: Miles Chen --- arch/arm64/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index f4fc1e0544b7..4b0e1231625c 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -388,6 +388,7 @@ static int dump_kernel_offset(struct notifier_block *self, unsigned long v, if (IS_ENABLED(CONFIG_RANDOMIZE_BASE) && offset > 0) { pr_emerg("Kernel Offset: 0x%lx from 0x%lx\n", offset, KIMAGE_VADDR); + pr_emerg("PHYS_OFFSET: 0x%llx\n", PHYS_OFFSET); } else { pr_emerg("Kernel Offset: disabled\n"); } -- 2.18.0