From: Will Deacon <will.deacon@arm.com>
To: Miles Chen <miles.chen@mediatek.com>
Cc: wsd_upstream@mediatek.com, ard.biesheuvel@linaro.org,
Catalin Marinas <catalin.marinas@arm.com>,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: kaslr: print PHYS_OFFSET in dump_kernel_offset()
Date: Thu, 13 Dec 2018 18:13:18 +0000 [thread overview]
Message-ID: <20181213181317.GD18185@edgewater-inn.cambridge.arm.com> (raw)
In-Reply-To: <1544612209-13660-1-git-send-email-miles.chen@mediatek.com>
[+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 <miles.chen@mediatek.com>
> Tested-by: Miles Chen <miles.chen@mediatek.com>
> ---
> 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
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-12-13 18:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 10:56 [PATCH] arm64: kaslr: print PHYS_OFFSET in dump_kernel_offset() Miles Chen
2018-12-13 18:13 ` Will Deacon [this message]
2018-12-13 18:15 ` Ard Biesheuvel
2018-12-14 0:52 ` Miles Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181213181317.GD18185@edgewater-inn.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=miles.chen@mediatek.com \
--cc=wsd_upstream@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox