]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
prctl: cfi: change the branch landing pad prctl()s to be more descriptive
authorPaul Walmsley <pjw@kernel.org>
Sun, 5 Apr 2026 00:40:58 +0000 (18:40 -0600)
committerPaul Walmsley <pjw@kernel.org>
Sun, 5 Apr 2026 00:40:58 +0000 (18:40 -0600)
commit08ee1559052be302f1d3752f48360b89517d9f8d
tree75318cdfd654c53621e9e75e7b429877acc556ad
parente5342fe2c1bb5b4fab6ed531a0122c6417e57ecf
prctl: cfi: change the branch landing pad prctl()s to be more descriptive

Per Linus' comments requesting the replacement of "INDIR_BR_LP" in the
indirect branch tracking prctl()s with something more readable, and
suggesting the use of the speculation control prctl()s as an exemplar,
reimplement the prctl()s and related constants that control per-task
forward-edge control flow integrity.

This primarily involves two changes.  First, the prctls are
restructured to resemble the style of the speculative execution
workaround control prctls PR_{GET,SET}_SPECULATION_CTRL, to make them
easier to extend in the future.  Second, the "indir_br_lp" abbrevation
is expanded to "branch_landing_pads" to be less telegraphic.  The
kselftest and documentation is adjusted accordingly.

Link: https://lore.kernel.org/linux-riscv/CAHk-=whhSLGZAx3N5jJpb4GLFDqH_QvS07D+6BnkPWmCEzTAgw@mail.gmail.com/
Cc: Deepak Gupta <debug@rivosinc.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Documentation/arch/riscv/zicfilp.rst
arch/riscv/kernel/usercfi.c
include/uapi/linux/prctl.h
kernel/sys.c
tools/perf/trace/beauty/include/uapi/linux/prctl.h
tools/testing/selftests/riscv/cfi/cfitests.c