Skip to contentSkip to conversation

linux-user: Add strace for rseq

PATCH In review Joel Stanley 2 participants 2 messages Aug 26, 2025 – Aug 27, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: Add strace for rseq

build/qemu-riscv64 -cpu rv64,v=on -d strace build/tests/tcg/riscv64-linux-user/test-vstart-overflow 1118081 riscv_hwprobe(0xffffbc038200,1,0,0,0,0) = 0
1118081 brk(NULL) = 0x0000000000085000
1118081 brk(0x0000000000085b00) = 0x0000000000085b00
1118081 set_tid_address(0x850f0) = 1118081
1118081 set_robust_list(0x85100,24) = -1 errno=38 (Function not implemented)
1118081 rseq(0x857c0,32,0,0xf1401073) = -1 errno=38 (Function not implemented)

---
 linux-user/strace.list | 3 +++
 1 file changed, 3 insertions(+)
linux-user/strace.list +3 -0
index ab818352a90c..51b5ead9696c 100644
@@ -1719,3 +1719,6 @@
 #ifdef TARGET_NR_riscv_hwprobe
 { TARGET_NR_riscv_hwprobe, "riscv_hwprobe" , "%s(%p,%d,%d,%d,%d,%d)", NULL, NULL },
 #endif
+#ifdef TARGET_NR_rseq
+{ TARGET_NR_rseq, "rseq" , "%s(%p,%u,%d,%#x)", NULL, NULL },
+#endif
Signature · 1 line
2.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Joel Stanley

build/qemu-riscv64 -cpu rv64,v=on -d strace build/tests/tcg/riscv64-linux-user/test-vstart-overflow 1118081 riscv_hwprobe(0xffffbc038200,1,0,0,0,0) = 0
1118081 brk(NULL) = 0x0000000000085000
1118081 brk(0x0000000000085b00) = 0x0000000000085b00
1118081 set_tid_address(0x850f0) = 1118081
1118081 set_robust_list(0x85100,24) = -1 errno=38 (Function not implemented) 1118081 rseq(0x857c0,32,0,0xf1401073) = -1 errno=38 (Function not implemented)

---
  linux-user/strace.list | 3 +++
  1 file changed, 3 insertions(+)
linux-user/strace.list +0 -0
index ab818352a90c..51b5ead9696c 100644

linux-user/strace.list line 1724

Quoted 6 lines
linux-user/strace.list +3 -0
@@ -1719,3 +1719,6 @@
  #ifdef TARGET_NR_riscv_hwprobe
  { TARGET_NR_riscv_hwprobe, "riscv_hwprobe" , "%s(%p,%d,%d,%d,%d,%d)", NULL, NULL },
  #endif
+#ifdef TARGET_NR_rseq
+{ TARGET_NR_rseq, "rseq" , "%s(%p,%u,%d,%#x)", NULL, NULL },
+#endif

Usually the strace comes with the implementation. But considering that we'll never be able to implement rseq in qemu, this seems reasonable.

and queued.

r~