History

arm64: ptrace: add NT_ARM_SYSTEM_CALL regset

This regeset is intended to be used to get and set a system call number while tracing. There was some discussion about possible approaches to do so: (1) modify x8 register with ptrace(PTRACE_SETREGSET) indirectly, and update regs->syscallno later on in syscall_trace_enter(), or (2) define a dedicated regset for this purpose as on s390, or (3) support ptrace(PTRACE_SET_SYSCALL) as on arch/arm Thinking of the fact that user_pt_regs doesn't expose 'syscallno' to tracer as well as that secure_computing() expects a changed syscall number, especially case of -1, to be visible before this function returns in syscall_trace_enter(), (1) doesn't work well. We will take (2) since it looks much cleaner.

AKASHI Takahiro committed 11 years ago

Commit 766a85d1 parent 034edab2 files · +36 −0Browse files

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

Unified · Split

include/uapi/linux/elf.h+1−0
@@ -397,6 +397,7 @@ typedef struct elf64_shdr { · 396 unmodified lines
397#define NT_ARM_TLS 0x401 /* ARM TLS register */397#define NT_ARM_TLS 0x401 /* ARM TLS register */
398#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */398#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
399#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */399#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */
400#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */
400#define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */401#define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */
401#define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */402#define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */
402#define NT_METAG_TLS 0x502 /* Metag TLS pointer */403#define NT_METAG_TLS 0x502 /* Metag TLS pointer */