Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1304436

Re: [PATCH v2 11/13] arm64: allow kernel Image to be loaded anywhere in physical memory

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 11/13] arm64: allow kernel Image to be loaded anywhere in physical memory
Date 2016-01-08 12:50 +0100
Message-ID <qODIn-67Q-53@gated-at.bofh.it> (permalink)
References <qLqRk-8m8-9@gated-at.bofh.it> <qLqRl-8m8-31@gated-at.bofh.it> <qODp0-60g-13@gated-at.bofh.it> <qODyF-63D-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jan 08, 2016 at 12:34:18PM +0100, Ard Biesheuvel wrote:
> On 8 January 2016 at 12:26, Mark Rutland <mark.rutland@arm.com> wrote:
> > We might also want to consider if we need to determine whether or not
> > the bootloader actually provided entropy, (and if we need a more general
> > handshake between the bootlaoder and kernel to determine that kind of
> > thing).
> 
> Yes, that is interesting. We should also think about how to handle
> 'nokaslr' if it appears on the command line, since in the !EFI case,
> we will be way too late to parse this, and a capable kernel will
> already be running from a randomized offset. That means it is the
> bootloader's responsibility to ensure that the presence of 'nokaslr'
> and the entropy in x1 are consistent with each other.

Argh, I hadn't considered that. :(

In the absence of a pre-kernel environment, the best thing we can do is
probably to print a giant warning if 'nokaslr' is present but there was
entropy (where that's determined based on some handshake/magic/flag).

> >>  Any memory described to the kernel (even that below the start of the
> >>  image) which is not marked as reserved from the kernel (e.g., with a
> >> diff --git a/arch/arm64/include/asm/boot.h b/arch/arm64/include/asm/boot.h
> >> index 81151b67b26b..984cb0fa61ce 100644
> >> --- a/arch/arm64/include/asm/boot.h
> >> +++ b/arch/arm64/include/asm/boot.h
> >> @@ -11,4 +11,9 @@
> >>  #define MIN_FDT_ALIGN                8
> >>  #define MAX_FDT_SIZE         SZ_2M
> >>
> >> +/*
> >> + * arm64 requires the kernel image to be 2 MB aligned
> >
> > Nit: The image is TEXT_OFFSET from that 2M-aligned base.
> > s/image/mapping/?
> >
> > [...]
> >
> 
> Yep. I hate TEXT_OFFSET, did I mention that?

I would also love to remove it, but I believe it's simply too late. :(

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 11/13] arm64: allow kernel Image to be loaded anywhere  in physical memory Mark Rutland <mark.rutland@arm.com> - 2016-01-08 12:30 +0100
  Re: [PATCH v2 11/13] arm64: allow kernel Image to be loaded anywhere  in physical memory Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-08 12:40 +0100
    Re: [PATCH v2 11/13] arm64: allow kernel Image to be loaded anywhere  in physical memory Mark Rutland <mark.rutland@arm.com> - 2016-01-08 12:50 +0100

csiph-web