diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-02-27 11:33:26 -1000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-03-06 14:08:11 +0000 |
commit | e995d5cce4a022afc4624471cafd2e4eb72962e6 (patch) | |
tree | 608192b3e8f286b980878e528dee54b270dadd48 /target/arm/gdbstub.c | |
parent | abf1f1b03aad07d9b7aa4bb5b06ac5a2c7b134d1 (diff) | |
download | qemu-e995d5cce4a022afc4624471cafd2e4eb72962e6.zip qemu-e995d5cce4a022afc4624471cafd2e4eb72962e6.tar.gz qemu-e995d5cce4a022afc4624471cafd2e4eb72962e6.tar.bz2 |
target/arm: Implement gdbstub pauth extension
The extension is primarily defined by the Linux kernel NT_ARM_PAC_MASK
ptrace register set.
The original gdb feature consists of two masks, data and code, which are
used to mask out the authentication code within a pointer. Following
discussion with Luis Machado, add two more masks in order to support
pointers within the high half of the address space (i.e. TTBR1 vs TTBR0).
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1105
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230227213329.793795-12-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/gdbstub.c')
-rw-r--r-- | target/arm/gdbstub.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index bf8aff7..062c8d4 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -355,6 +355,11 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) aarch64_gdb_set_fpu_reg, 34, "aarch64-fpu.xml", 0); } + if (isar_feature_aa64_pauth(&cpu->isar)) { + gdb_register_coprocessor(cs, aarch64_gdb_get_pauth_reg, + aarch64_gdb_set_pauth_reg, + 4, "aarch64-pauth.xml", 0); + } #endif } else { if (arm_feature(env, ARM_FEATURE_NEON)) { |