linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/6] replace static mapping for pgdir region
Date: Mon, 19 Mar 2018 19:19:52 +0800	[thread overview]
Message-ID: <20180319111958.4171-1-ard.biesheuvel@linaro.org> (raw)

On systems that are affected by S&M variant 3a, KPTI is not sufficient to
hide the physical placement of the kernel, since the trampoline page is
statically allocated, and the contents of TTBR1_EL1 is visible to attackers.

So instead, use a separate physical allocation and map it at the same
virtual offset as swapper_pg_dir and the trampoline were mapped before.

Ard Biesheuvel (6):
  arm64/mm: add explicit physical address argument to map_kernel_segment
  arm64/mm: create dedicated segment for pgdir mappings
  arm64/mm: use physical address as cpu_replace_ttbr1() argument
  arm64/mm: stop using __pa_symbol() for swapper_pg_dir
  arm64/mm: factor out clear_page() for unmapped memory
  arm64/mm: use independent physical allocation for pgdir segment

 arch/arm64/include/asm/mmu_context.h |  4 +-
 arch/arm64/include/asm/pgtable.h     |  2 +
 arch/arm64/include/asm/sections.h    |  1 +
 arch/arm64/kernel/cpufeature.c       |  2 +-
 arch/arm64/kernel/hibernate.c        |  2 +-
 arch/arm64/kernel/vmlinux.lds.S      |  3 +
 arch/arm64/mm/kasan_init.c           |  4 +-
 arch/arm64/mm/mmu.c                  | 84 ++++++++++----------
 8 files changed, 55 insertions(+), 47 deletions(-)

-- 
2.11.0

             reply	other threads:[~2018-03-19 11:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 11:19 Ard Biesheuvel [this message]
2018-03-19 11:19 ` [RFC PATCH 1/6] arm64/mm: add explicit physical address argument to map_kernel_segment Ard Biesheuvel
2018-03-20  3:33   ` Mark Rutland
2018-03-20  4:09     ` Ard Biesheuvel
2018-03-19 11:19 ` [RFC PATCH 2/6] arm64/mm: create dedicated segment for pgdir mappings Ard Biesheuvel
2018-03-19 11:19 ` [RFC PATCH 3/6] arm64/mm: use physical address as cpu_replace_ttbr1() argument Ard Biesheuvel
2018-03-19 11:19 ` [RFC PATCH 4/6] arm64/mm: stop using __pa_symbol() for swapper_pg_dir Ard Biesheuvel
2018-03-19 11:19 ` [RFC PATCH 5/6] arm64/mm: factor out clear_page() for unmapped memory Ard Biesheuvel
2018-03-19 11:19 ` [RFC PATCH 6/6] arm64/mm: use independent physical allocation for pgdir segment Ard Biesheuvel
2018-03-19 16:17   ` 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=20180319111958.4171-1-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --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).