mirror-linux/tools/testing/selftests/riscv
Paul Walmsley 08ee155905 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>
2026-04-04 18:40:58 -06:00
..
abi selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cfi prctl: cfi: change the branch landing pad prctl()s to be more descriptive 2026-04-04 18:40:58 -06:00
hwprobe riscv: hwprobe: add support for RISCV_HWPROBE_KEY_IMA_EXT_1 2026-01-29 02:38:40 -07:00
mm selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
sigreturn selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
vector selftests: riscv: Add braces around EXPECT_EQ() 2026-04-04 18:37:57 -06:00
Makefile kselftest/riscv: add kselftest for user mode CFI 2026-01-29 02:38:40 -07:00
README selftests: riscv: Add README for RISC-V KSelfTest 2025-09-18 19:26:07 -06:00

README

KSelfTest RISC-V
================

- These tests are riscv specific and so not built or run but just skipped
  completely when env-variable ARCH is found to be different than 'riscv'.

- Holding true the above, RISC-V KSFT tests can be run within the
  KSelfTest framework using standard Linux top-level-makefile targets:

      $ make TARGETS=riscv kselftest-clean
      $ make TARGETS=riscv kselftest

      or

      $ make -C tools/testing/selftests TARGETS=riscv \
		INSTALL_PATH=<your-installation-path> install

      or, alternatively, only specific riscv/ subtargets can be picked:

      $ make -C tools/testing/selftests TARGETS=riscv RISCV_SUBTARGETS="mm vector" \
		INSTALL_PATH=<your-installation-path> install

   Further details on building and running KSFT can be found in:
     Documentation/dev-tools/kselftest.rst