linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm64: kernel: Add support for Privileged Access Never
@ 2015-07-16 16:01 James Morse
  2015-07-16 16:01 ` [PATCH 1/5] arm64: kernel: preparatory: Move config_sctlr_el1 James Morse
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: James Morse @ 2015-07-16 16:01 UTC (permalink / raw)
  To: linux-arm-kernel

This series adds support for Privileged Access Never (PAN; part of the ARMv8.1
Extensions). When enabled, this feature causes a permission fault if the kernel
attempts to access memory that is also accessible by userspace - instead the
PAN bit must be cleared when accessing userspace memory. (or use the
ldt*/stt* instructions).

This series detects and enables this feature, and uses alternatives to change
{get,put}_user() et al to clear the PAN bit while they do their work.


James Morse (5):
  arm64: kernel: preparatory: Move config_sctlr_el1
  arm64: kernel: Add cpufeature 'enable' callback.
  arm64: kernel: Add min/max values in feature-detection register
    values.
  arm64: kernel: Add optional CONFIG_ parameter to ALTERNATIVE().
  arm64: kernel: Add support for Privileged Access Never

 arch/arm64/Kconfig                   | 14 ++++++++++++++
 arch/arm64/include/asm/alternative.h | 28 +++++++++++++++++++++++++---
 arch/arm64/include/asm/cpufeature.h  |  7 +++++--
 arch/arm64/include/asm/futex.h       |  8 ++++++++
 arch/arm64/include/asm/processor.h   |  2 ++
 arch/arm64/include/asm/sysreg.h      | 18 ++++++++++++++++++
 arch/arm64/include/asm/uaccess.h     | 11 +++++++++++
 arch/arm64/kernel/armv8_deprecated.c | 11 +----------
 arch/arm64/kernel/cpufeature.c       | 34 ++++++++++++++++++++++++++++++++--
 arch/arm64/kernel/process.c          |  3 +++
 arch/arm64/lib/clear_user.S          |  8 ++++++++
 arch/arm64/lib/copy_from_user.S      |  8 ++++++++
 arch/arm64/lib/copy_in_user.S        |  8 ++++++++
 arch/arm64/lib/copy_to_user.S        |  8 ++++++++
 arch/arm64/mm/fault.c                | 23 +++++++++++++++++++++++
 15 files changed, 174 insertions(+), 17 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-07-17 12:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 16:01 [PATCH 0/5] arm64: kernel: Add support for Privileged Access Never James Morse
2015-07-16 16:01 ` [PATCH 1/5] arm64: kernel: preparatory: Move config_sctlr_el1 James Morse
2015-07-17 11:06   ` Catalin Marinas
2015-07-17 12:59   ` Catalin Marinas
2015-07-16 16:01 ` [PATCH 2/5] arm64: kernel: Add cpufeature 'enable' callback James Morse
2015-07-17 11:06   ` Catalin Marinas
2015-07-16 16:01 ` [PATCH 3/5] arm64: kernel: Add min/max values in feature-detection register values James Morse
2015-07-17 10:51   ` Will Deacon
2015-07-17 11:05     ` Catalin Marinas
2015-07-17 11:05     ` James Morse
2015-07-17 12:45       ` Will Deacon
2015-07-16 16:01 ` [PATCH 4/5] arm64: kernel: Add optional CONFIG_ parameter to ALTERNATIVE() James Morse
2015-07-17 11:08   ` Catalin Marinas
2015-07-16 16:01 ` [PATCH 5/5] arm64: kernel: Add support for Privileged Access Never James Morse
2015-07-17 12:57   ` Catalin Marinas

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).