Thread (9 messages) 9 messages, 2 authors, 2021-03-27

Re: [PATCH 2/4] arm64/ptrace: introduce orig_x7 in the user_pt_regs structure

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2021-03-26 18:40:30
Also in: lkml

On Mon, Mar 22, 2021 at 03:50:51PM -0700, Andrei Vagin wrote:
quoted hunk ↗ jump to hunk
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index d4cdf98ac003..1008f0fbc5ea 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -184,6 +184,7 @@ struct pt_regs {
 			u64 pc;
 			u64 pstate;
 			u64 orig_x0;
+			u64 orig_x7;
 		};
 	};
 #ifdef __AARCH64EB__
diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h
index 3c118c5b0893..be7583ff5f4d 100644
--- a/arch/arm64/include/uapi/asm/ptrace.h
+++ b/arch/arm64/include/uapi/asm/ptrace.h
@@ -91,6 +91,7 @@ struct user_pt_regs {
 	__u64		pc;
 	__u64		pstate;
 	__u64		orig_x0;
+	__u64		orig_x7;
 };
Same here. So unless I miss something, we better have a separate
NT_ORIGREG (or some better name) regset to retrieve the additional
registers. Or, if you want to get all of them in one go, just add a
new one similar to NT_PRSTATUS but which restores x0 to orig_x0 and x7
to orig_x7.

Sorry if this was already discussed. I had a brief look at the previous
versions and couldn't see a user_pt_regs structure change, nor a
suggestion to do so.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help