From: laurentiu.tudor@nxp.com (Laurentiu Tudor)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 0/4] arm64: avoid early __va translations
Date: Mon, 15 Feb 2016 10:42:28 +0000 [thread overview]
Message-ID: <56C1AB93.3020101@nxp.com> (raw)
In-Reply-To: <1455289046-21321-1-git-send-email-ard.biesheuvel@linaro.org>
Hi Ard,
On 02/12/2016 04:57 PM, Ard Biesheuvel wrote:
> This is a somewhat cleaner approach for dealing with the issue that the
> early FDT performs __va() translations before the linear mapping has been
> set up. Being able to defer the assignment of memstart_addr until after we
> have discovered all of memory is an important piece of functionality, not
> only for KASLR but also for mapping the linear region as efficiently as
> possible.
>
> Changes since v2:
> - replace __weak function in patches #1 and #2 with a preprocessor macro
> - add patch to address the circular header dependency when including
> asm/bug.h in asm/memory.h
> - turned the hack that adds the BUG_ON() into a proper patch
>
> Patch #1 refactors the early FDT code so that the actual assignment of
> initrd_start and initrd_end (which is where the __va() translations are
> performed) can be overridden in architecture specific code.
>
> Patch #2 performs the override, and only records the physical addresses
> as they are found in the /chosen node, or on the command line, and defers
> the __va() translation until after memstart_addr has been assigned.
>
> Patch #3 reshuffles some #includes and #defines so that asm/bug.h can be
> included (and used) in asm/memory.h
>
> Patch #4 implements a BUG_ON() check to ensure that no references to
> memstart_addr are made before it has been assigned.
>
> Ard Biesheuvel (4):
> of/fdt: factor out assignment of initrd_start/initrd_end
> arm64: defer __va translation of initrd_start and initrd_end
> arm64: prevent potential circular header dependencies in asm/bug.h
> arm64: prevent __va() translations before memstart_addr is assigned
>
> arch/arm64/include/asm/bug.h | 2 +-
> arch/arm64/include/asm/debug-monitors.h | 2 +-
> arch/arm64/include/asm/memory.h | 12 ++++++++++-
> arch/arm64/kvm/hyp/debug-sr.c | 1 +
> arch/arm64/mm/init.c | 21 +++++++++++++++-----
> drivers/of/fdt.c | 14 ++++++++++---
> 6 files changed, 41 insertions(+), 11 deletions(-)
Tried these on one of our LS2 boards so here's a:
Tested-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
Best Regards, Laurentiu
prev parent reply other threads:[~2016-02-15 10:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 14:57 [PATCH v3 0/4] arm64: avoid early __va translations Ard Biesheuvel
2016-02-12 14:57 ` [PATCH v3 1/4] of/fdt: factor out assignment of initrd_start/initrd_end Ard Biesheuvel
2016-02-22 16:49 ` Will Deacon
2016-02-22 16:56 ` Ard Biesheuvel
2016-02-22 17:09 ` Will Deacon
2016-02-22 17:16 ` Ard Biesheuvel
2016-02-12 14:57 ` [PATCH v3 2/4] arm64: defer __va translation of initrd_start and initrd_end Ard Biesheuvel
2016-02-12 14:57 ` [PATCH v3 3/4] arm64: prevent potential circular header dependencies in asm/bug.h Ard Biesheuvel
2016-02-22 18:00 ` Will Deacon
2016-02-12 14:57 ` [PATCH v3 4/4] arm64: prevent __va() translations before memstart_addr is assigned Ard Biesheuvel
2016-02-22 16:52 ` Will Deacon
2016-02-22 17:17 ` Ard Biesheuvel
2016-02-22 17:41 ` Catalin Marinas
2016-02-22 17:55 ` Ard Biesheuvel
2016-02-22 17:26 ` Catalin Marinas
2016-02-22 17:38 ` Ard Biesheuvel
2016-02-15 10:42 ` Laurentiu Tudor [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=56C1AB93.3020101@nxp.com \
--to=laurentiu.tudor@nxp.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 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.