-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path0014-Comment-macros-to-stop-using-VDSO.patch
64 lines (56 loc) · 2.31 KB
/
0014-Comment-macros-to-stop-using-VDSO.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 52d58e37701b1433b45721107fa4c143a35ce7d0 Mon Sep 17 00:00:00 2001
From: Florin Postolache <florin.postolache80@gmail.com>
Date: Mon, 18 Jul 2022 20:39:32 +0300
Subject: [PATCH] Comment macros to stop using VDSO
The VDSO is responsible for the virtual system calls in a basic
linux application and makes so that some system calls will be faster
because the transition between kernel mode and user mode is eliminated.
Therefore, it shouldn't be used in Unikraft. At the moment, in musl
this feature is enabled and functions like __clock_gettime will generate
a segfault.
Signed-off-by: Florin Postolache <florin.postolache80@gmail.com>
---
arch/aarch64/syscall_arch.h | 2 +-
arch/i386/syscall_arch.h | 4 ++--
arch/x86_64/syscall_arch.h | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/aarch64/syscall_arch.h b/arch/aarch64/syscall_arch.h
index 504983a..699df67 100644
--- a/arch/aarch64/syscall_arch.h
+++ b/arch/aarch64/syscall_arch.h
@@ -72,7 +72,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
}
#define VDSO_USEFUL
-#define VDSO_CGT_SYM "__kernel_clock_gettime"
+//#define VDSO_CGT_SYM "__kernel_clock_gettime"
#define VDSO_CGT_VER "LINUX_2.6.39"
#define IPC_64 0
diff --git a/arch/i386/syscall_arch.h b/arch/i386/syscall_arch.h
index f92b7aa..b0238ba 100644
--- a/arch/i386/syscall_arch.h
+++ b/arch/i386/syscall_arch.h
@@ -83,7 +83,7 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
}
#define VDSO_USEFUL
-#define VDSO_CGT32_SYM "__vdso_clock_gettime"
+//#define VDSO_CGT32_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_VER "LINUX_2.6"
-#define VDSO_CGT_SYM "__vdso_clock_gettime64"
+//#define VDSO_CGT_SYM "__vdso_clock_gettime64"
#define VDSO_CGT_VER "LINUX_2.6"
diff --git a/arch/x86_64/syscall_arch.h b/arch/x86_64/syscall_arch.h
index 92d5c17..e99279e 100644
--- a/arch/x86_64/syscall_arch.h
+++ b/arch/x86_64/syscall_arch.h
@@ -62,9 +62,9 @@ static __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long
}
#define VDSO_USEFUL
-#define VDSO_CGT_SYM "__vdso_clock_gettime"
+//#define VDSO_CGT_SYM "__vdso_clock_gettime"
#define VDSO_CGT_VER "LINUX_2.6"
-#define VDSO_GETCPU_SYM "__vdso_getcpu"
+//#define VDSO_GETCPU_SYM "__vdso_getcpu"
#define VDSO_GETCPU_VER "LINUX_2.6"
#define IPC_64 0
--
2.38.1