diff options
author | Catalin Marinas <[email protected]> | 2016-07-01 16:53:00 +0100 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2016-11-21 18:48:53 +0000 |
commit | 4b65a5db362783ab4b04ca1c1d2ad70ed9b0ba2a (patch) | |
tree | 56196f2fa7dbe5a41061b1aed297704ef7e2bbea /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | f33bcf03e6079668da6bf4eec4a7dcf9289131d0 (diff) |
arm64: Introduce uaccess_{disable,enable} functionality based on TTBR0_EL1
This patch adds the uaccess macros/functions to disable access to user
space by setting TTBR0_EL1 to a reserved zeroed page. Since the value
written to TTBR0_EL1 must be a physical address, for simplicity this
patch introduces a reserved_ttbr0 page at a constant offset from
swapper_pg_dir. The uaccess_disable code uses the ttbr1_el1 value
adjusted by the reserved_ttbr0 offset.
Enabling access to user is done by restoring TTBR0_EL1 with the value
from the struct thread_info ttbr0 variable. Interrupts must be disabled
during the uaccess_ttbr0_enable code to ensure the atomicity of the
thread_info.ttbr0 read and TTBR0_EL1 write. This patch also moves the
get_thread_info asm macro from entry.S to assembler.h for reuse in the
uaccess_ttbr0_* macros.
Cc: Will Deacon <[email protected]>
Cc: James Morse <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Mark Rutland <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions