History

arm64: add ptrace regsets for ptrauth key management

Add two new ptrace regsets, which can be used to request and change the pointer authentication keys of a thread. NT_ARM_PACA_KEYS gives access to the instruction/data address keys, and NT_ARM_PACG_KEYS to the generic authentication key. The keys are also part of the core dump file of the process. The regsets are only exposed if the kernel is compiled with CONFIG_CHECKPOINT_RESTORE=y, as the only intended use case is checkpointing and restoring processes that are using pointer authentication. (This can be changed later if there are other use cases.)

Kristina Martsenko committed 7 years ago

Commit d0a060b1 parent e2a2e564 files · +167 −0Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/elf.h+2−0
@@ -421,6 +421,8 @@ typedef struct elf64_shdr { · 420 unmodified lines
421421 #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */
422422 #define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */
423423 #define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication code masks */
424+#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys */
425+#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key */
424426 #define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */
425427 #define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */
426428 #define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */