summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2026-10-09 17:21:31 +0200
committerHeiko Carstens <hca@linux.ibm.com>2026-10-13 16:59:55 +0200
commit946b9dcff33bd4669464674ae1c00683b875be55 (patch)
tree57398957f14228840b520ddb1b50907adc57792f /tools/lib/python
parent9fd7fca66735307fd7afa3450882a55ef80f2add (diff)
downloadlinux-next-946b9dcff33bd4669464674ae1c00683b875be55.tar.gz
linux-next-946b9dcff33bd4669464674ae1c00683b875be55.zip
s390/ptrace: Preserve ILC when updating system call number
When an attached debugger changes gpr2 via PTRACE_POKEUSR while the traced process has PIF_SYSCALL set, the int_code in pt_regs is also updated. In case of an svc it contains the instruction length code (ILC), as well as the system call number. The ptrace code sets the ILC unconditionally to a value which matches the svc instruction. However the svc instruction also may have been executed via the execute or execute relative long instruction, which have a different length. Therefore preserve the ILC and only change the system call number using syscall_set_nr(). This makes sure that in case of a PSW rewind the instruction address points to the correct instruction. Fixes: 56e62a737028 ("s390: convert to generic entry") Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions