]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powerpc: add exit_flags field in pt_regs
authorMukesh Kumar Chaurasiya <mchauras@linux.ibm.com>
Mon, 27 Apr 2026 12:27:39 +0000 (17:57 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 20 May 2026 01:27:14 +0000 (06:57 +0530)
commitd7a6797e0bc1ee7bddb8a298f2d1acddb300efb3
tree47bad1ee2239117cca73db8d33b2355597436277
parent02565a782c1ee7e8ada38ad24a698e01d6ea9ff8
powerpc: add exit_flags field in pt_regs

Add a new field `exit_flags` in the pt_regs structure. This field will hold
the flags set during interrupt or syscall execution that are required during
exit to user mode.

Specifically, the `TIF_RESTOREALL` flag, stored in this field, helps the
exit routine determine if any NVGPRs were modified and need to be restored
before returning to userspace.

This addition ensures a clean and architecture-specific mechanism to track
per-syscall or per-interrupt state transitions related to register restore.

Changes:
 - Add `exit_flags` and `__pt_regs_pad` to maintain 16-byte stack alignment
 - Update asm-offsets.c and ptrace.c for offset and validation
 - Update PT_* constants in uapi header to reflect the new layout

Signed-off-by: Mukesh Kumar Chaurasiya <mchauras@linux.ibm.com>
Tested-by: Samir M <samir@linux.ibm.com>
Tested-by: David Gow <davidgow@google.com>
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260427122742.210074-6-mkchauras@gmail.com
arch/powerpc/include/asm/ptrace.h
arch/powerpc/include/uapi/asm/ptrace.h
arch/powerpc/kernel/ptrace/ptrace.c