From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3] arm64: relocatable kernel proof of concept
Date: Tue, 17 Mar 2015 16:35:54 +0000 [thread overview]
Message-ID: <20150317163554.GM23340@leverpostej> (raw)
In-Reply-To: <CAKv+Gu_A=_d+2=25WCOhAZnxTHQAWY4QZ2eVgyu03aweJvKjPQ@mail.gmail.com>
> > Possibly related to running with/detecting an offset, we need a way to
> > communicate that kASLR is active through the compressed kernel to
> > uncompressed kernel. x86 is going to be using x86's setup_data, but we
> > may need to generalize this. (The reasoning here is that when kaslr is
> > disabled at runtime, we should turn off other kernel ASLR, like module
> > offset ASLR, without duplicating kernel command line parameter parsing
> > -- which is what x86 is currently doing now.) Just examining the
> > offset isn't sufficient because perhaps we got randomized to offset 0.
> > :)
> >
>
> There is no decompressor on arm64, just the core kernel Image. So if
> an offset needs to be chosen before branching into the kernel proper,
> it needs to be the bootloader that chooses it.
Agreed.
Our equivalent to setup_data is the DT /chosen node, and I don't think
we want to try parsing that before we've turned on the MMU.
However, for the UEFI boot case we could have the stub do something more
intelligent and choose a random physical offset itself.
> > You mention the linear mappings in "performance", which I worry may be
> > at odds with kASLR? Can large mappings still be used even when we've
> > got smaller alignment goals? Since you mention the "upper half of the
> > virtual address range", I assume ARM is built using the -2GB
> > addressing as used by x86, is that right? So it sounds like it would
> > be similar entropy to x86.
> >
>
> I haven't quantified the performance gain, but it is arguably more
> efficient to map RAM using 1 GB blocks than using 2 MB sections.
> On the other part of the question, I really need to do more research
> on what x86 implements in the first place before even trying to answer
> it.
That might not always be true, depending on the TLB implementation
(though it's better to assume that it is, as it shouldn't result in a
performance loss).
Also, if you use DEBUG_RODATA the kernel won't be mapped with 1GB
mappings after early boot anyway.
Mark.
next prev parent reply other threads:[~2015-03-17 16:35 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 15:23 [RFC PATCH 0/3] arm64: relocatable kernel proof of concept Ard Biesheuvel
2015-03-16 15:23 ` [RFC PATCH 1/3] arm64: head.S: replace early literals with constant immediates Ard Biesheuvel
2015-03-16 17:14 ` Mark Rutland
2015-03-17 7:01 ` Ard Biesheuvel
2015-03-16 15:23 ` [RFC PATCH 2/3] arm64: add support for relocatable kernel Ard Biesheuvel
2015-03-16 15:23 ` [RFC PATCH 3/3] arm64/efi: use relocated kernel Ard Biesheuvel
2015-03-16 16:09 ` [RFC PATCH 0/3] arm64: relocatable kernel proof of concept Mark Rutland
2015-03-16 16:45 ` Ard Biesheuvel
2015-03-16 17:33 ` Mark Rutland
2015-03-16 17:43 ` Ard Biesheuvel
2015-03-17 16:20 ` Mark Rutland
2015-03-16 23:19 ` Kees Cook
2015-03-17 7:38 ` Ard Biesheuvel
2015-03-17 16:35 ` Mark Rutland [this message]
2015-03-17 16:40 ` Ard Biesheuvel
2015-03-17 16:43 ` Mark Rutland
2015-03-23 15:36 ` [PATCH 0/4] RFC: split text and linear mappings using tagged pointers Ard Biesheuvel
2015-03-23 15:36 ` [PATCH 1/4] arm64: use tagged pointers to distinguish kernel text from the linear mapping Ard Biesheuvel
2015-03-25 14:04 ` Catalin Marinas
2015-03-26 1:27 ` Mark Rutland
2015-03-23 15:36 ` [PATCH 2/4] arm64: fixmap: move translation tables to dedicated region Ard Biesheuvel
2015-03-26 1:28 ` Mark Rutland
2015-03-26 6:20 ` Ard Biesheuvel
2015-03-30 14:34 ` Mark Rutland
2015-03-23 15:36 ` [PATCH 3/4] arm64: move kernel text below PAGE_OFFSET Ard Biesheuvel
2015-03-25 14:10 ` Catalin Marinas
2015-03-23 15:36 ` [PATCH 4/4] arm64: align PHYS_OFFSET to block size Ard Biesheuvel
2015-03-25 14:14 ` Catalin Marinas
2015-03-26 6:23 ` Ard Biesheuvel
2015-03-25 14:59 ` Catalin Marinas
2015-03-26 6:22 ` Ard Biesheuvel
2015-03-27 13:16 ` Ard Biesheuvel
2015-03-30 13:49 ` Catalin Marinas
2015-03-30 14:00 ` Ard Biesheuvel
2015-03-30 14:55 ` Mark Rutland
2015-03-30 15:00 ` Catalin Marinas
2015-03-30 18:08 ` Ard Biesheuvel
2015-03-31 14:49 ` Catalin Marinas
2015-03-31 16:19 ` Catalin Marinas
2015-03-31 16:46 ` Catalin Marinas
2015-03-26 1:26 ` [PATCH 0/4] RFC: split text and linear mappings using tagged pointers Mark Rutland
2015-03-26 6:09 ` 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=20150317163554.GM23340@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).