All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	Jonathan Marek <jonathan@marek.ca>
Subject: Re: [PATCH] arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely
Date: Wed, 10 Jun 2020 11:25:13 +0200	[thread overview]
Message-ID: <CAMj1kXFTnxNF955BprE36SoeYY05sgy0yuUGVNuBm-pGbMHOmQ@mail.gmail.com> (raw)
In-Reply-To: <20200610085746.GA38107@C02TD0UTHF1T.local>

On Wed, 10 Jun 2020 at 10:57, Mark Rutland <mark.rutland@arm.com> wrote:
>
> On Tue, Jun 09, 2020 at 08:52:42AM -0400, Jonathan Marek wrote:
> > On 6/9/20 8:37 AM, Ard Biesheuvel wrote:
> > > On Tue, 9 Jun 2020 at 14:35, Jonathan Marek <jonathan@marek.ca> wrote:
> > > >
> > > > Hi,
> > > >
> > > > Just want to add that this patch also broke booting my arm64 kernel
> > > > (CONFIG_RANDOMIZE_BASE=n). This is on a recent qualcomm board.
> > >
> > > Which bootloader does it use?
> >
> > abl/edk2 (https://source.codeaurora.org/quic/la/abl/tianocore/edk2/tree/?h=LA.UM.8.12.r1-11700-sm8250.0)
> >
> > Just looking at it quickly (I am no bootloader expert), I think this may
> > have something to do with it: https://source.codeaurora.org/quic/la/abl/tianocore/edk2/tree/QcomModulePkg/QcomModulePkg.dec?h=LA.UM.8.12.r1-11700-sm8250.0#n149
> >
>
> For others following, the relevant lines are:
>
> | [PcdsFixedAtBuild.common]
> |   # linuxloadercommon
> |   gqcomtokenspaceguid.kernelloadaddress|0x00080000|uint32|0x00015000
>
> ... which means this is using the dodgy built-in Linux loader rather than
> booting Linux as an EFI application. It's disappointing that's still being used. :(
>

Yeah.

So one way we might deal with this is to make CONFIG_RELOCATABLE
default to y (unless CONFIG_EXPERT?), independently of
CONFIG_RANDOMIZE_BASE, so that even if you decide to disable KASLR,
you still get the metadata you need to apply the relocations. This
uses a bit more space, but I think it is a reasonable compromise
between support for broken bootloaders such as this one, and having
the ability to trim down your kernel if you want to.

_______________________________________________
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-10  9:25 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
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 [this message]

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=CAMj1kXFTnxNF955BprE36SoeYY05sgy0yuUGVNuBm-pGbMHOmQ@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=jonathan@marek.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@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.