Skip to content

riscv: add support for restartable sequence

Vincent Chen linux-kselftest linux-riscv lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

1. Use the correct register name to access pt_regs

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3riscv: add required functions to enable HAVE_REGS_AND_STACK_ACCESS_APIarch/riscv/Kconfig arch/riscv/include/asm/ptrace.h arch/riscv/kernel/ptrace.c+128 -10 replies
2/3riscv: Add support for restartable sequencearch/riscv/Kconfig arch/riscv/kernel/entry.S arch/riscv/kernel/signal.c+7 -02 replies
3/3rseq/selftests: Add support for riscvtools/testing/selftests/rseq/param_test.c tools/testing/selftests/rseq/rseq-riscv.h tools/testing/selftests/rseq/rseq.h+647 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 0/3] riscv: add support for restartable sequence

Add RSEQ, restartable sequence, support and related selftest to RISCV. The Kconfig option HAVE_REGS_AND_STACK_ACCESS_API is also required by RSEQ because RSEQ will modify the content of pt_regs.sepc through instruction_pointer_set() during the fixup procedure. In order to select the config HAVE_REGS_AND_STACK_ACCESS_API, the missing APIs for accessing pt_regs are also added in this patch set.

The relevant RSEQ tests in kselftest require the Binutils patch "RISC-V:
Fix linker problems with TLS copy relocs" to avoid placing PREINIT_ARRAY and TLS variable of librseq.so at the same address.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=3e7bd7f24146f162565edf878840449f36a8d974
A segmental fault will happen if binutils misses this patch.

Patrick Stählin (1):
riscv: add required functions to enable HAVE_REGS_AND_STACK_ACCESS_API

Vincent Chen (2):
riscv: Add support for restartable sequence
rseq/selftests: Add support for riscv

Changes since v1:
1. Use the correct register name to access pt_regs

 arch/riscv/Kconfig                        |   2 +
 arch/riscv/include/asm/ptrace.h           |  29 +-
 arch/riscv/kernel/entry.S                 |   4 +
 arch/riscv/kernel/ptrace.c                |  99 +++++
 arch/riscv/kernel/signal.c                |   2 +
 tools/testing/selftests/rseq/param_test.c |  23 ++
 tools/testing/selftests/rseq/rseq-riscv.h | 622 ++++++++++++++++++++++++++++++
 tools/testing/selftests/rseq/rseq.h       |   2 +
 8 files changed, 782 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/rseq/rseq-riscv.h
Signature · 1 line
2.7.4