[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20221006012432.19008-1-palmer@rivosinc.com>
Date: Wed, 5 Oct 2022 18:24:32 -0700
From: Palmer Dabbelt <palmer@...osinc.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: oleg@...hat.com, linux-kernel@...r.kernel.org, linux@...osinc.com,
Palmer Dabbelt <palmer@...osinc.com>
Subject: [PATCH] ptrace: Mark PTRACE_{PEEK,POKE}USR as deprecated for new ports
From: Palmer Dabbelt <palmer@...osinc.com>
Folks keep submitting implementations of these for RISC-V. As far as I
understand they're not meant to be implemented in new ports, this adds a
comment to make that more explicit.
Signed-off-by: Palmer Dabbelt <palmer@...osinc.com>
---
include/uapi/linux/ptrace.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h
index 195ae64a8c87..38201ebec276 100644
--- a/include/uapi/linux/ptrace.h
+++ b/include/uapi/linux/ptrace.h
@@ -11,14 +11,19 @@
#define PTRACE_TRACEME 0
#define PTRACE_PEEKTEXT 1
#define PTRACE_PEEKDATA 2
-#define PTRACE_PEEKUSR 3
#define PTRACE_POKETEXT 4
#define PTRACE_POKEDATA 5
-#define PTRACE_POKEUSR 6
#define PTRACE_CONT 7
#define PTRACE_KILL 8
#define PTRACE_SINGLESTEP 9
+/*
+ * These are deprecated for new ports in favor of PTRACE_{GET,SET}REGSET, which
+ * support accessing multiple CPU registers in a single syscall.
+ */
+#define PTRACE_PEEKUSR 3
+#define PTRACE_POKEUSR 6
+
#define PTRACE_ATTACH 16
#define PTRACE_DETACH 17
--
2.34.1
Powered by blists - more mailing lists