From: Marc Zyngier <maz@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
suzuki.poulose@arm.com, Catalin Marinas <catalin.marinas@arm.com>,
James Morse <james.morse@arm.com>, Will Deacon <will@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely
Date: Thu, 04 Jun 2020 17:07:58 +0100 [thread overview]
Message-ID: <cf7ac1b246b1a21f3a9e67d0fc991188@kernel.org> (raw)
In-Reply-To: <CAMj1kXEnJOUSWZTMGCn6cS3OiM9_DpJUj-MekENySf1x6Y1W5g@mail.gmail.com>
On 2020-06-04 16:48, Ard Biesheuvel wrote:
> On Thu, 4 Jun 2020 at 17:41, Ard Biesheuvel <ardb@kernel.org> wrote:
>>
>> On Thu, 4 Jun 2020 at 17:25, Marc Zyngier <maz@kernel.org> wrote:
>> >
>> > On 2020-06-04 16:01, Will Deacon wrote:
>> > > On Thu, Jun 04, 2020 at 03:41:41PM +0100, Marc Zyngier wrote:
>> > >> Hi all,
>> > >>
>> > >> On Tue, 28 Apr 2020 15:49:35 +0100
>> > >> Will Deacon <will@kernel.org> wrote:
>> > >>
>> > >> > On Wed, 15 Apr 2020 10:29:22 +0200, Ard Biesheuvel wrote:
>> > >> > > TEXT_OFFSET on arm64 is a historical artifact from the early days of
>> > >> > > the arm64 port where the boot protocol was basically 'copy this image
>> > >> > > to the base of memory + 512k', giving us 512 KB of guaranteed BSS space
>> > >> > > to put the swapper page tables. When the arm64 port was merged for
>> > >> > > v3.10, the Image header already carried the actual value of TEXT_OFFSET,
>> > >> > > to allow the bootloader to discover it dynamically rather than hardcode
>> > >> > > it to 512 KB.
>> > >> > >
>> > >> > > [...]
>> > >> >
>> > >> > Applied to arm64 (for-next/misc), thanks!
>> > >> >
>> > >> > [1/1] arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely
>> > >> > https://git.kernel.org/arm64/c/cfa7ede20f13
>> > >>
>> > >> This breaks a guest kernel booted with kvmtool (tested on my d05).
>> > >> Reverting it on top of 6929f71e46bd makes it work again. I haven't yet
>> > >> investigated what is happening here though.
>> > >
>> > > Weird, that's a combination I test, just not on d05. Are you using
>> > > defconfig? Can you share your full kvmtool invication please?
>> >
>> > Ah, good point. Not defconfig, but one that allows me to run the same
>> > kernel on my whole zoo[1]. As for the kvmtool invocation, it is pretty
>> > basic:
>> >
>> > lkvm run -m 512 -c 4 -p earlycon -k arch/arm64/boot/Image
>> >
>>
>> OK, so my suspicions is that your config does not enable
>> CONFIG_RANDOMIZE_BASE, and that kvmtool ignores the text offset value
>> in the header altogether.
>
> arm/aarch64/include/kvm/kvm-arch.h:#define ARM_KERN_OFFSET(kvm)
> ((kvm)->cfg.arch.aarch32_guest ? \
> arm/aarch64/include/kvm/kvm-arch.h- 0x8000
> : \
> arm/aarch64/include/kvm/kvm-arch.h-
> 0x80000)
Yeah, nice catch. I'll try and fix the sucker.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
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:[~2020-06-04 16:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 8:29 [PATCH] arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely Ard Biesheuvel
2020-04-15 8:39 ` Will Deacon
2020-04-15 8:48 ` Ard Biesheuvel
2020-04-15 9:15 ` Will Deacon
2020-04-28 13:41 ` Will Deacon
2020-04-28 14:49 ` Will Deacon
2020-06-04 14:41 ` Marc Zyngier
2020-06-04 15:01 ` Will Deacon
2020-06-04 15:25 ` Marc Zyngier
2020-06-04 15:41 ` Ard Biesheuvel
2020-06-04 15:48 ` Ard Biesheuvel
2020-06-04 16:07 ` Marc Zyngier [this message]
2020-06-09 12:35 ` Jonathan Marek
2020-06-09 12:37 ` Ard Biesheuvel
2020-06-09 12:52 ` Jonathan Marek
2020-06-10 8:57 ` Mark Rutland
2020-06-10 9:25 ` Ard Biesheuvel
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=cf7ac1b246b1a21f3a9e67d0fc991188@kernel.org \
--to=maz@kernel.org \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).