Debian Codegraph @

debian/patches/0006-Fix-bug-Added-syscalls-for-tasks-example.patch

raw
1 From: Dennis Dillert <[email protected]>
2 Date: Sun, 2 Apr 2023 19:54:29 +0200
3 Subject: Fix bug: Added syscalls for tasks example.
4
5 The tasks example stopped working on Linux (Ubuntu 22.04) due to the use of missing syscalls, which have been added in this fix. In addition, the definition files have been updated to include the newer clone3 system call (in the Linux kernel since 5.6) for new process and thread creation.
6 ---
7 examples/tasks/src/tasks.c | 2 ++
8 misc/linux/aarch64_syscall.h.in | 1 +
9 misc/linux/arm_syscall.h.in | 1 +
10 misc/linux/x86_64_syscall.h.in | 1 +
11 4 files changed, 5 insertions(+)
12
13 diff --git a/examples/tasks/src/tasks.c b/examples/tasks/src/tasks.c
14 index e21a6ea..a7ee1ce 100644
15 --- a/examples/tasks/src/tasks.c
16 +++ b/examples/tasks/src/tasks.c
17 @@ -55,6 +55,8 @@ KORE_SECCOMP_FILTER("tasks",
18 KORE_SYSCALL_ALLOW(recvmsg),
19 KORE_SYSCALL_ALLOW(sendmmsg),
20 KORE_SYSCALL_ALLOW(getpeername),
21 + KORE_SYSCALL_ALLOW(rseq),
22 + KORE_SYSCALL_ALLOW(clone3),
23 );
24 #endif
25
26 diff --git a/misc/linux/aarch64_syscall.h.in b/misc/linux/aarch64_syscall.h.in
27 index 955e2ca..47d1d51 100644
28 --- a/misc/linux/aarch64_syscall.h.in
29 +++ b/misc/linux/aarch64_syscall.h.in
30 @@ -287,4 +287,5 @@
31 #define __NR_fsconfig 431
32 #define __NR_fsmount 432
33 #define __NR_fspick 433
34 +#define __NR_clone3 435
35
36 diff --git a/misc/linux/arm_syscall.h.in b/misc/linux/arm_syscall.h.in
37 index a565a4e..86334ed 100644
38 --- a/misc/linux/arm_syscall.h.in
39 +++ b/misc/linux/arm_syscall.h.in
40 @@ -387,6 +387,7 @@
41 #define __NR_fsconfig 431
42 #define __NR_fsmount 432
43 #define __NR_fspick 433
44 +#define __NR_clone3 435
45
46 #define __ARM_NR_breakpoint 0x0f0001
47 #define __ARM_NR_cacheflush 0x0f0002
48 diff --git a/misc/linux/x86_64_syscall.h.in b/misc/linux/x86_64_syscall.h.in
49 index 2d4634f..d2cab06 100644
50 --- a/misc/linux/x86_64_syscall.h.in
51 +++ b/misc/linux/x86_64_syscall.h.in
52 @@ -343,4 +343,5 @@
53 #define __NR_fsconfig 431
54 #define __NR_fsmount 432
55 #define __NR_fspick 433
56 +#define __NR_clone3 435
57