From ee46b1b5755eacf3be02a67934f0dc690293745b Mon Sep 17 00:00:00 2001
From: bb-cat <ningyu9@huawei.com>
Date: Wed, 2 Mar 2022 13:28:51 +0800
Subject: [PATCH 02/16] compel: add rseq syscall into compel std plugin syscall
 tables Add rseq syscall numbers for: arm/aarch64, mips64, ppc64le, s390,
 x86_64/x86

Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
---
 compel/arch/arm/plugins/std/syscalls/syscall.def     | 1 +
 compel/arch/mips/plugins/std/syscalls/syscall_64.tbl | 1 +
 .../compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl     | 1 +
 .../compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl       | 1 +
 compel/arch/x86/plugins/std/syscalls/syscall_32.tbl  | 1 +
 compel/arch/x86/plugins/std/syscalls/syscall_64.tbl  | 1 +
 6 files changed, 6 insertions(+)

diff --git a/compel/arch/arm/plugins/std/syscalls/syscall.def b/compel/arch/arm/plugins/std/syscalls/syscall.def
index 1b877d1..bb78cbb 100644
--- a/compel/arch/arm/plugins/std/syscalls/syscall.def
+++ b/compel/arch/arm/plugins/std/syscalls/syscall.def
@@ -119,3 +119,4 @@ clone3				435	435	(struct clone_args *uargs, size_t size)
 sched_setaffinity		122	241	(int fd, size_t cpusetsize, const cpu_set_t *mask)
 pidfd_open			434	434	(pid_t pid, unsigned int flags)
 pidfd_getfd			438	438	(int pidfd, int targetfd, unsigned int flags)
+rseq				293	398	(void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
diff --git a/compel/arch/mips/plugins/std/syscalls/syscall_64.tbl b/compel/arch/mips/plugins/std/syscalls/syscall_64.tbl
index 7a6db19..95dc7d3 100644
--- a/compel/arch/mips/plugins/std/syscalls/syscall_64.tbl
+++ b/compel/arch/mips/plugins/std/syscalls/syscall_64.tbl
@@ -115,3 +115,4 @@ __NR_fsmount			5432		sys_fsmount		(int fd, unsigned int flags, unsigned int attr
 __NR_clone3			5435		sys_clone3		(struct clone_args *uargs, size_t size)
 __NR_pidfd_open			5434		sys_pidfd_open		(pid_t pid, unsigned int flags)
 __NR_pidfd_getfd		5438		sys_pidfd_getfd		(int pidfd, int targetfd, unsigned int flags)
+__NR_rseq		        5327		sys_rseq		(void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
diff --git a/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl b/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
index dd79187..ad0d94f 100644
--- a/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
+++ b/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
@@ -115,3 +115,4 @@ __NR_clone3		435		sys_clone3		(struct clone_args *uargs, size_t size)
 __NR_sched_setaffinity	222		sys_sched_setaffinity	(int fd, size_t cpusetsize, const cpu_set_t *mask)
 __NR_pidfd_open		434		sys_pidfd_open		(pid_t pid, unsigned int flags)
 __NR_pidfd_getfd	438		sys_pidfd_getfd		(int pidfd, int targetfd, unsigned int flags)
+__NR_rseq       	387		sys_rseq		(void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
diff --git a/compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl b/compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl
index 282adaf..916b697 100644
--- a/compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl
+++ b/compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl
@@ -115,3 +115,4 @@ __NR_clone3		435		sys_clone3		(struct clone_args *uargs, size_t size)
 __NR_sched_setaffinity	239		sys_sched_setaffinity	(int fd, size_t cpusetsize, const cpu_set_t *mask)
 __NR_pidfd_open		434		sys_pidfd_open		(pid_t pid, unsigned int flags)
 __NR_pidfd_getfd	438		sys_pidfd_getfd		(int pidfd, int targetfd, unsigned int flags)
+__NR_rseq       	383		sys_rseq		(void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
diff --git a/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl b/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
index 3fe3194..90f23d5 100644
--- a/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
+++ b/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
@@ -103,3 +103,4 @@ __NR_fsmount		432		sys_fsmount		(int fd, unsigned int flags, unsigned int attr_f
 __NR_clone3		435		sys_clone3		(struct clone_args *uargs, size_t size)
 __NR_pidfd_open		434		sys_pidfd_open		(pid_t pid, unsigned int flags)
 __NR_pidfd_getfd	438		sys_pidfd_getfd		(int pidfd, int targetfd, unsigned int flags)
+__NR_rseq       	386		sys_rseq		(void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
diff --git a/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl b/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
index c1d119d..323fab1 100644
--- a/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
+++ b/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
@@ -114,3 +114,4 @@ __NR_fsmount			432		sys_fsmount		(int fd, unsigned int flags, unsigned int attr_
 __NR_clone3			435		sys_clone3		(struct clone_args *uargs, size_t size)
 __NR_pidfd_open			434		sys_pidfd_open		(pid_t pid, unsigned int flags)
 __NR_pidfd_getfd		438		sys_pidfd_getfd		(int pidfd, int targetfd, unsigned int flags)
+__NR_rseq       		334		sys_rseq		(void *rseq, uint32_t rseq_len, int flags, uint32_t sig)
-- 
2.30.0

