Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAi9v1kpNPQ_mvL0uw0cLuVfhBQCDjd3McMeMS1jebhfpxo7eA@mail.gmail.com>
Date: Wed, 18 Sep 2024 02:08:02 +0800
From: Kevin <kevin@...o.gg>
To: musl@...ts.openwall.com
Subject: [PATCH] Add clock_gettime VDSO support for Riscv64

Hello,

Currently, musl on Riscv64 does not implement VDSO for the clock_gettime
function call. The following patch should fix it. (Rudimentary testing on a
Riscv64 virtual machine confirms this works.) A similar patch could
probably be made for Riscv32. This patch was made based on information
from: https://man7.org/linux/man-pages/man7/vdso.7.html

Please CC me on replies.

---
 arch/riscv64/syscall_arch.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/riscv64/syscall_arch.h b/arch/riscv64/syscall_arch.h
index 7fd042cd..81993fc8 100644
--- a/arch/riscv64/syscall_arch.h
+++ b/arch/riscv64/syscall_arch.h
@@ -71,8 +71,7 @@ static inline long __syscall6(long n, long a, long b,
long c, long d, long e, lo
 }

 #define VDSO_USEFUL
-/* We don't have a clock_gettime function.
 #define VDSO_CGT_SYM "__vdso_clock_gettime"
-#define VDSO_CGT_VER "LINUX_2.6" */
+#define VDSO_CGT_VER "LINUX_4.15"

 #define IPC_64 0
-- 
2.34.1

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.