Blob Blame History Raw
From f097cf5766c5a44b239d36692210bce50deb04ca Mon Sep 17 00:00:00 2001
From: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Date: Tue, 21 Dec 2021 17:38:25 +0300
Subject: [PATCH 01/10] 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 e6508ed9f..866bb07a7 100644
--- a/compel/arch/arm/plugins/std/syscalls/syscall.def
+++ b/compel/arch/arm/plugins/std/syscalls/syscall.def
@@ -118,3 +118,4 @@ fsmount				432	432	(int fd, unsigned int flags, unsigned int attr_flags)
 clone3				435	435	(struct clone_args *uargs, size_t size)
 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 7a6db192c..95dc7d3b2 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 1bb626bc5..e2ee33945 100644
--- a/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
+++ b/compel/arch/ppc64/plugins/std/syscalls/syscall-ppc64.tbl
@@ -114,3 +114,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       	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 7178bf483..bf3bf4714 100644
--- a/compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl
+++ b/compel/arch/s390/plugins/std/syscalls/syscall-s390.tbl
@@ -114,3 +114,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       	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 7e456cdb7..3938b43a8 100644
--- a/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
+++ b/compel/arch/x86/plugins/std/syscalls/syscall_32.tbl
@@ -102,3 +102,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 2dfcc6eee..28f2fb98d 100644
--- a/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
+++ b/compel/arch/x86/plugins/std/syscalls/syscall_64.tbl
@@ -113,3 +113,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.34.1