Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1160900imu; Thu, 13 Dec 2018 10:17:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/XX7deKLh9tNkrXb6Wc2aRKiW9tvZeD+y/2BTyk75psMDE6vJijlkJLGJJ1KJLzN2wHvYb5 X-Received: by 2002:a65:62da:: with SMTP id m26mr22883566pgv.278.1544725046940; Thu, 13 Dec 2018 10:17:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544725046; cv=none; d=google.com; s=arc-20160816; b=MPoZrkqf6ziabxlgknCObiKI3tWhegWpfOWj6JWCdQqDOlb+kN/wCouzVS7qmkDkv3 b8x70qGU7Vpl59Yv8mZbcnJmOvRlO1YEbC1IsW+ItbPcD5vSUXxd7AC+wrWUkfavqTj/ tLkYVsd/IUZCKJ5n2x3TrVtjq8RbvyASwvTthIVgxrqccuLTCHRTV3z69+/i8wilZkdc AV2eClpysCeLw6VnqcV5K2dO3g+A4BmeRKuJCA48Q6lOxlYYoztVRYpz+LRLONgkKRVg r82zy/ELBm2lBBtr0lV0w7UKb2NHRb2QT7xcF+A9UgFO19XRYoVRgfUJKJrbU3T4oGHP VWVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Jetzu+LmyuhNP24jLyn9ZDS6DIpioEtZ8VCdsw+GJp0=; b=Rr5pEKJMlLre1KIN+Cu6HtKj0uOYVbytA1mdoF8/hT94ZehJrkO/VsEAGuW4rsHq1o QGndtmOoXbCeyNXJCfU1L8pWBYuV5L1IkrIxiFlEl3qj89jU7AVeqaqxALM0YuOrmnjL APO5dYKoWR78I8Ub0o9J9I6PEVAjumJ6u7YQvsro8z766pgamG9pY/W0u+cRHlJ0ygfy 4h5XnFI3k+u4iEhLhasP4wd1TF0DBZlGdB0rQzl1gXo36o8s4oX5a+Ht2oDWeTe3LizN uppuKg30Uau7h4hZPdiri1qjGaE92Wc5gjOrj4cGhZwHzSznU2tLhcPzhzzU46jw/+du 147w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ct1Q7AGY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cf17si2111859plb.52.2018.12.13.10.17.10; Thu, 13 Dec 2018 10:17:26 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ct1Q7AGY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728152AbeLMSP6 (ORCPT + 99 others); Thu, 13 Dec 2018 13:15:58 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:55962 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727511AbeLMSP6 (ORCPT ); Thu, 13 Dec 2018 13:15:58 -0500 Received: by mail-it1-f195.google.com with SMTP id o19so5049436itg.5 for ; Thu, 13 Dec 2018 10:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Jetzu+LmyuhNP24jLyn9ZDS6DIpioEtZ8VCdsw+GJp0=; b=ct1Q7AGY6IwhPHqOYTKglRnpj651ELLful6lDbHfk+KpW9heTdPSvnmuizaVQmvXac iehMr4FEaxwzdLa6ELHAJC/X2wO/EEBUM/qHDe65ElhwGpsTd772XVwyJ03qG2JldT6S ced1xpxA4sQ7rGJJdNDlTOE25eXcw0kLz9WJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jetzu+LmyuhNP24jLyn9ZDS6DIpioEtZ8VCdsw+GJp0=; b=YSKNmErivc1iFysIN3nMU3Yf1nC4O7Lz4TfYvHO8m+ZKCyIrOfng9px+aptAa4C4gd 6aFcu7BTzSdVwh5gDnXYeoe6Bf5EkGTZ0WBhi4zLj4eGwbNvAbwKgzaE4M3ND4zN41Ip k6pVnVAJUU24Ps1Y8K95RLyQppvyMwqVKv7qoWPrXd5RmPEEa7KSybbX7xngg5+rnEBF GN1C0OaRoMavtZTACSGrK8+q45ziyi6zvuSq4UtAYx6N1bTXo/SRk9hxMjWkA+AvGQi7 fxPyP9eoaGzb9blTtUPpS602LXJwjFTnFTHpEUJj3+ak3q/RQAwZ03J8snRlkgQE/EMy 8ltw== X-Gm-Message-State: AA+aEWZi6vsOL3mSuv1wlBtMxk4XimsXS2bGrz8bt9cQDRsupgY3vSKM ws0dNwr62VlAw1LEo/f/VgGCDJGE9ebXu7+5o2gxQA== X-Received: by 2002:a02:4c9:: with SMTP id 192mr23695567jab.2.1544724957185; Thu, 13 Dec 2018 10:15:57 -0800 (PST) MIME-Version: 1.0 References: <1544612209-13660-1-git-send-email-miles.chen@mediatek.com> <20181213181317.GD18185@edgewater-inn.cambridge.arm.com> In-Reply-To: <20181213181317.GD18185@edgewater-inn.cambridge.arm.com> From: Ard Biesheuvel Date: Thu, 13 Dec 2018 19:15:45 +0100 Message-ID: Subject: Re: [PATCH] arm64: kaslr: print PHYS_OFFSET in dump_kernel_offset() To: Will Deacon Cc: Miles Chen , Catalin Marinas , Matthias Brugger , linux-arm-kernel , Linux Kernel Mailing List , "moderated list:ARM/Mediatek SoC support" , wsd_upstream@mediatek.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 13 Dec 2018 at 19:12, Will Deacon wrote: > > [+Ard because I'll basically go with his preference on this one] > > On Wed, Dec 12, 2018 at 06:56:49PM +0800, Miles Chen wrote: > > 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 Fine with me, but I would like to see an ack from 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 > >