All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Marc Zyngier <maz@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, 4 Jun 2020 17:41:45 +0200	[thread overview]
Message-ID: <CAMj1kXFS8Vvjfpb8HYzRvsaB0j7bs+2V4rXE8DzfNMJxsV3r0g@mail.gmail.com> (raw)
In-Reply-To: <fab4fb9e66fe48d82c9856a7d5839335@kernel.org>

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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-06-04 15:42 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 [this message]
2020-06-04 15:48           ` Ard Biesheuvel
2020-06-04 16:07             ` Marc Zyngier
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=CAMj1kXFS8Vvjfpb8HYzRvsaB0j7bs+2V4rXE8DzfNMJxsV3r0g@mail.gmail.com \
    --to=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=maz@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.