From: Jun Yao <yaojun8558363@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: catalin.marinas@arm.com, will.deacon@arm.com,
ard.biesheuvel@linaro.org, james.morse@arm.com,
linux-kernel@vger.kernel.org,
kernel-hardening@lists.openwall.com
Subject: [PATCH v2 0/2] Move {tramp_pg_dir,swapper_pg_dir} to .rodata
Date: Mon, 25 Jun 2018 19:39:19 +0800 [thread overview]
Message-ID: <20180625113921.21854-1-yaojun8558363@gmail.com> (raw)
Version 2 changes:
As James Morse suggested[1], we introduce init_pg_dir, which
is a reserved area of __initdata section. We setup initial
page tables in it and then we setup final page tables in
swapper_pg_dir directly. In this way, we can avoid using
temporary top level.
To defend 'KSMA', we need to handle page table configurations
which we can write a block-mapping into swapper_pg_dir. These
configurations are:
CONFIG_ARM64_VA_BITS_39(4KB granule, 1GB block)
CONFIG_ARM64_VA_BITS_36(16KB granule, 32MB block)
CONFIG_ARM64_VA_BITS_42(64KB granule, 512MB block)
If these configurations are selected, we move {tramp_pg_dir,
swapper_pg_dir} to .rodata section. And we update
swapper_pg_dir by fixmap.
[1] https://patchwork.kernel.org/patch/10476597/
Jun Yao (2):
arm64/mm: Introduce init_pg_dir
arm64/mm: Move {tramp_pg_dir, swapper_pg_dir} to .rodata section
arch/arm64/include/asm/fixmap.h | 2 +-
arch/arm64/include/asm/pgalloc.h | 33 ++++++++++++++++++++
arch/arm64/include/asm/pgtable.h | 8 +++--
arch/arm64/kernel/head.S | 52 ++++++++++++++++++++++---------
arch/arm64/kernel/vmlinux.lds.S | 26 +++++++++++++++-
arch/arm64/mm/mmu.c | 36 +++++++--------------
include/asm-generic/vmlinux.lds.h | 5 +++
mm/init-mm.c | 2 +-
8 files changed, 119 insertions(+), 45 deletions(-)
--
2.17.1
next reply other threads:[~2018-06-25 11:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 11:39 Jun Yao [this message]
2018-06-25 11:39 ` [PATCH v2 1/2] arm64/mm: Introduce init_pg_dir Jun Yao
2018-06-25 13:55 ` kbuild test robot
2018-06-25 13:55 ` kbuild test robot
2018-06-25 16:37 ` James Morse
2018-06-25 11:39 ` [PATCH v2 2/2] arm64/mm: Move {tramp_pg_dir, swapper_pg_dir} to .rodata section Jun Yao
2018-06-26 11:21 ` James Morse
2018-06-27 11:07 ` Suzuki K Poulose
2018-06-27 11:23 ` James Morse
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=20180625113921.21854-1-yaojun8558363@gmail.com \
--to=yaojun8558363@gmail.com \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®