From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 168722E709 for ; Tue, 17 Sep 2024 22:43:22 +0200 (CEST) Received: (qmail 28565 invoked by uid 550); 17 Sep 2024 20:43:16 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28515 invoked from network); 17 Sep 2024 20:43:16 -0000 Date: Tue, 17 Sep 2024 16:43:07 -0400 From: Rich Felker To: Kevin Cc: musl@lists.openwall.com Message-ID: <20240917204307.GG10433@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] Add clock_gettime VDSO support for Riscv64 On Wed, Sep 18, 2024 at 02:08:02AM +0800, Kevin wrote: > 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 If I understand correctly, the problem isn't that we didn't have it but that the symbol version string was wrong so it wasn't used? I have another pending patch for ppc[64] and s390x to add vdso, so it would be nice to get rv fixed too. Thanks. Rich