]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: Implement indirect branch tracking prctls
authorDeepak Gupta <debug@rivosinc.com>
Mon, 26 Jan 2026 04:09:54 +0000 (21:09 -0700)
committerPaul Walmsley <pjw@kernel.org>
Thu, 29 Jan 2026 09:38:40 +0000 (02:38 -0700)
commit8a9e22d2ca5855263d6e3f83509eabf16d7b8a0a
tree4271a5e7a75fdf305d9900fb7cfb71fa9589de71
parent5ca243f6e3c30b979a54a96b96df355dda2b4d0f
riscv: Implement indirect branch tracking prctls

This patch adds a RISC-V implementation of the following prctls:
PR_SET_INDIR_BR_LP_STATUS, PR_GET_INDIR_BR_LP_STATUS and
PR_LOCK_INDIR_BR_LP_STATUS.

Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Tested-by: Andreas Korb <andreas.korb@aisec.fraunhofer.de>
Tested-by: Valentin Haudiquet <valentin.haudiquet@canonical.com>
Link: https://patch.msgid.link/20251112-v5_user_cfi_series-v23-14-b55691eacf4f@rivosinc.com
[pjw@kernel.org: clean up patch description]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/include/asm/usercfi.h
arch/riscv/kernel/entry.S
arch/riscv/kernel/process.c
arch/riscv/kernel/usercfi.c