History

Merge tag 'riscv-for-linus-7.0-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V updates from Paul Walmsley: - Add support for control flow integrity for userspace processes. This is based on the standard RISC-V ISA extensions Zicfiss and Zicfilp - Improve ptrace behavior regarding vector registers, and add some selftests - Optimize our strlen() assembly - Enable the ISO-8859-1 code page as built-in, similar to ARM64, for EFI volume mounting - Clean up some code slightly, including defining copy_user_page() as copy_page() rather than memcpy(), aligning us with other architectures; and using max3() to slightly simplify an expression in riscv_iommu_init_check() * tag 'riscv-for-linus-7.0-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (42 commits) riscv: lib: optimize strlen loop efficiency selftests: riscv: vstate_exec_nolibc: Use the regular prctl() function selftests: riscv: verify ptrace accepts valid vector csr values selftests: riscv: verify ptrace rejects invalid vector csr inputs selftests: riscv: verify syscalls discard vector context selftests: riscv: verify initial vector state with ptrace selftests: riscv: test ptrace vector interface riscv: ptrace: validate input vector csr registers riscv: csr: define vtype register elements riscv: vector: init vector context with proper vlenb riscv: ptrace: return ENODATA for inactive vector extension kselftest/riscv: add kselftest for user mode CFI riscv: add documentation for shadow stack riscv: add documentation for landing pad / indirect branch tracking riscv: create a Kconfig fragment for shadow stack and landing pad support arch/riscv: add dual vdso creation logic and select vdso based on hw arch/riscv: compile vdso with landing pad and shadow stack note riscv: enable kernel access to shadow stack memory via the FWFT SBI call riscv: add kernel command line option to opt out of user CFI riscv/hwprobe: add zicfilp / zicfiss enumeration in hwprobe ...

Linus Torvalds committed 9 months ago

Commit cee73b12 parents 7563f7e 18be4ca75 files · +3655 −122Browse files

Showing the changes to include/uapi/linux (2 of 75 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/elf.h +2 −0
  2. include/uapi/linux/prctl.h +27 −0
include/uapi/linux/elf.h+2−0
@@ -545,6 +545,8 @@ typedef struct elf64_shdr { · 544 unmodified lines
545#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */545#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
546#define NN_RISCV_TAGGED_ADDR_CTRL "LINUX"546#define NN_RISCV_TAGGED_ADDR_CTRL "LINUX"
547#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */547#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */
548#define NN_RISCV_USER_CFI "LINUX"
549#define NT_RISCV_USER_CFI 0x903 /* RISC-V shadow stack state */
548#define NN_LOONGARCH_CPUCFG "LINUX"550#define NN_LOONGARCH_CPUCFG "LINUX"
549#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */551#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
550#define NN_LOONGARCH_CSR "LINUX"552#define NN_LOONGARCH_CSR "LINUX"
include/uapi/linux/prctl.h+27−0
@@ -396,4 +396,31 @@ struct prctl_mm_map { · 395 unmodified lines
396 */396 */
397# define PR_RSEQ_SLICE_EXT_ENABLE 0x01397# define PR_RSEQ_SLICE_EXT_ENABLE 0x01
398 398
399/*
400 * Get the current indirect branch tracking configuration for the current
401 * thread, this will be the value configured via PR_SET_INDIR_BR_LP_STATUS.
402 */
403#define PR_GET_INDIR_BR_LP_STATUS 80
404
405/*
406 * Set the indirect branch tracking configuration. PR_INDIR_BR_LP_ENABLE will
407 * enable cpu feature for user thread, to track all indirect branches and ensure
408 * they land on arch defined landing pad instruction.
409 * x86 - If enabled, an indirect branch must land on an ENDBRANCH instruction.
410 * arch64 - If enabled, an indirect branch must land on a BTI instruction.
411 * riscv - If enabled, an indirect branch must land on an lpad instruction.
412 * PR_INDIR_BR_LP_DISABLE will disable feature for user thread and indirect
413 * branches will no more be tracked by cpu to land on arch defined landing pad
414 * instruction.
415 */
416#define PR_SET_INDIR_BR_LP_STATUS 81
417# define PR_INDIR_BR_LP_ENABLE (1UL << 0)
418
419/*
420 * Prevent further changes to the specified indirect branch tracking
421 * configuration. All bits may be locked via this call, including
422 * undefined bits.
423 */
424#define PR_LOCK_INDIR_BR_LP_STATUS 82
425
399#endif /* _LINUX_PRCTL_H */426#endif /* _LINUX_PRCTL_H */