Changes since v6: * Rebased on the ARMv8.1-VHE patch set. * Review from Dave Martin: + Remove PSTATE.BTYPE adjustment on syscall entry. + Rely on PT_GNU_PROPERTY to find the NT_GNU_PROPERTY_TYPE_0 note. + For the test case, add a linker script to create the PHDR.
Changes since v5: * New function to validate the target PROT parameter for mmap/mprotect. * Require BTI in the cpu for PROT_BTI set. * Set PSTATE.BTYPE=2 for the signal handler. Adjust the smoke test to match. * Tidy up the note parsing. Based-on: 20190803184800.8221-1-richard.hender...@linaro.org "[PATCH v3 00/34] target/arm: Implement ARMv8.1-VHE" r~ Richard Henderson (6): linux-user/aarch64: Reset btype for signals linux-user: Validate mmap/mprotect prot value linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI include/elf: Add defines related to GNU property notes for AArch64 linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes tests/tcg/aarch64: Add bti smoke test include/elf.h | 22 ++++++ include/exec/cpu-all.h | 2 + linux-user/syscall_defs.h | 4 + linux-user/aarch64/signal.c | 10 ++- linux-user/elfload.c | 94 +++++++++++++++++++++-- linux-user/mmap.c | 121 ++++++++++++++++++++++-------- target/arm/translate-a64.c | 6 +- tests/tcg/aarch64/bti-1.c | 77 +++++++++++++++++++ tests/tcg/aarch64/bti-crt.inc.c | 69 +++++++++++++++++ tests/tcg/aarch64/Makefile.target | 3 + tests/tcg/aarch64/bti.ld | 15 ++++ 11 files changed, 379 insertions(+), 44 deletions(-) create mode 100644 tests/tcg/aarch64/bti-1.c create mode 100644 tests/tcg/aarch64/bti-crt.inc.c create mode 100644 tests/tcg/aarch64/bti.ld -- 2.17.1