All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] arm64: booti: allow to place kernel image anywhere in physical memory
Date: Tue, 7 Mar 2017 13:54:43 +0000	[thread overview]
Message-ID: <20170307135442.GB24550@leverpostej> (raw)
In-Reply-To: <20170307121656.GO19897@bill-the-cat>

On Tue, Mar 07, 2017 at 07:16:56AM -0500, Tom Rini wrote:
> On Tue, Mar 07, 2017 at 11:43:52AM +0000, Mark Rutland wrote:
> > On Tue, Feb 28, 2017 at 12:15:09PM -0500, Tom Rini wrote:
> > > On Wed, Mar 01, 2017 at 02:03:58AM +0900, Masahiro Yamada wrote:
> > > > 2017-02-27 7:41 GMT+09:00 Tom Rini <trini@konsulko.com>:
> > > > If we put the image at 2MiB aligned base, the relocation would
> > > > always happen.
> > > 
> > > Correct.  But I honestly don't know if non-randomized text offset is the
> > > common case people will optimize for or randomized for added security will be
> > > the more common case.  
> > 
> > FWIW, the randomized text_offset is a bootloader debugging/testing
> > feature, and there's no security aspect to it.
> > 
> > It was added [1] as an additional to hint to bootloader authors that
> > they must respect the text_offset field.
> 
> Right, and we do this today.  But since this doubles as a kind of cheap
> KASLR I would also expect to see it used, even if not intended, in this
> way.

I can certainly imagine people loading the kernel at a random physical
base address (i.e. a random 2M base + text_offset), and doing that's
perfectly fine for kernels happy to be loaded at arbitrary bases. That
may help to frustrate some DMA attacks.

I take it that's what you meant?

Given text_offset itself is fixed at compile time, randomizing it
provides absolutely no security benefit, and we should be careful not to
give the impression that it does.

Thanks,
Mark.

  reply	other threads:[~2017-03-07 13:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22  2:34 [U-Boot] [PATCH 1/2] arm64: booti: update "res1" field to "flags" Masahiro Yamada
2017-02-22  2:34 ` [U-Boot] [PATCH 2/2] arm64: booti: allow to place kernel image anywhere in physical memory Masahiro Yamada
2017-02-22 16:19   ` Tom Rini
2017-02-23  9:17     ` Masahiro Yamada
2017-02-23 15:31       ` Tom Rini
2017-02-26 22:41         ` Tom Rini
2017-02-28 17:03           ` Masahiro Yamada
2017-02-28 17:15             ` Tom Rini
2017-03-07 11:43               ` Mark Rutland
2017-03-07 12:16                 ` Tom Rini
2017-03-07 13:54                   ` Mark Rutland [this message]
2017-03-07 14:12                     ` Tom Rini

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=20170307135442.GB24550@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=u-boot@lists.denx.de \
    /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.