summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel
diff options
context:
space:
mode:
authorPaul Walmsley <pjw@kernel.org>2026-04-04 18:40:58 -0600
committerPaul Walmsley <pjw@kernel.org>2026-04-04 18:40:58 -0600
commite5342fe2c1bb5b4fab6ed531a0122c6417e57ecf (patch)
tree939c4ebd44a9c28a3125891eeaee3ae73f3c1645 /arch/riscv/kernel
parentadfc80dd0d7831335b5105fb3d8747094bf42878 (diff)
riscv: ptrace: cfi: expand "SS" references to "shadow stack" in uapi headers
Similar to the recent change to expand "LP" to "branch landing pad", let's expand "SS" in the ptrace uapi macros to "shadow stack" as well. This aligns with the existing prctl() arguments, which use the expanded "shadow stack" names, rather than just the abbreviation. Link: https://lore.kernel.org/linux-riscv/CAHk-=whhSLGZAx3N5jJpb4GLFDqH_QvS07D+6BnkPWmCEzTAgw@mail.gmail.com/ Cc: Deepak Gupta <debug@rivosinc.com> Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'arch/riscv/kernel')
-rw-r--r--arch/riscv/kernel/ptrace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index b6156625d6f8..93de2e7a3074 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -311,10 +311,10 @@ static int riscv_cfi_get(struct task_struct *target,
}
if (is_shstk_enabled(target)) {
- user_cfi.cfi_status.cfi_state |= (PTRACE_CFI_SS_EN_STATE |
- PTRACE_CFI_SS_PTR_STATE);
+ user_cfi.cfi_status.cfi_state |= (PTRACE_CFI_SHADOW_STACK_EN_STATE |
+ PTRACE_CFI_SHADOW_STACK_PTR_STATE);
user_cfi.cfi_status.cfi_state |= is_shstk_locked(target) ?
- PTRACE_CFI_SS_LOCK_STATE : 0;
+ PTRACE_CFI_SHADOW_STACK_LOCK_STATE : 0;
user_cfi.shstk_ptr = get_active_shstk(target);
}
@@ -350,7 +350,7 @@ static int riscv_cfi_set(struct task_struct *target,
*/
if ((user_cfi.cfi_status.cfi_state &
(PTRACE_CFI_BRANCH_LANDING_PAD_EN_STATE | PTRACE_CFI_BRANCH_LANDING_PAD_LOCK_STATE |
- PTRACE_CFI_SS_EN_STATE | PTRACE_CFI_SS_LOCK_STATE)) ||
+ PTRACE_CFI_SHADOW_STACK_EN_STATE | PTRACE_CFI_SHADOW_STACK_LOCK_STATE)) ||
(user_cfi.cfi_status.cfi_state & PTRACE_CFI_STATE_INVALID_MASK))
return -EINVAL;
@@ -365,7 +365,7 @@ static int riscv_cfi_set(struct task_struct *target,
/* If shadow stack enabled on target, set new shadow stack pointer */
if (is_shstk_enabled(target) &&
- (user_cfi.cfi_status.cfi_state & PTRACE_CFI_SS_PTR_STATE))
+ (user_cfi.cfi_status.cfi_state & PTRACE_CFI_SHADOW_STACK_PTR_STATE))
set_active_shstk(target, user_cfi.shstk_ptr);
return 0;