From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 6C9AA1F454 for ; Sun, 10 Nov 2019 03:02:33 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=G9+ fx2LPDTXfntJ/B/yl1FpJ/4/MOmvSp5+P45MtLmwlDg/wKbbpvx28ysvZYSaaMmZ j+spNXUQjk/mQ/RZ/o2TYcAknNzUKDemW6E8OqZ1MIthh1Z46k+EdRFfe5op0Fsg 4/RNw8W4kSYM9syXTlu4ZvrQzDYEktIwcG3gzhiI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=HHr9C2SEH lRRDVPrA9+lPVYqqls=; b=U5M/c2obkFZlLzXGPm/TnxpHbav30KZSBywGMvPSo BMWM0qwPN5z9ca1PLH9LUTKtmn7Kx5blxEI/jY9IYNLuTIxgChpVseHzFaI7Onr6 gu9zjqnUSdto0S55Ide21SC0VtwWOMXZ2py8hEmzdU51OmNFFKXAZhEjQnLN7Sm3 rs= Received: (qmail 92994 invoked by alias); 10 Nov 2019 03:02:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 92960 invoked by uid 89); 10 Nov 2019 03:02:24 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: esa3.hgst.iphmx.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1573354942; x=1604890942; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=t6yiXLD7ionGNfbEb3/5GBf/JS1x7bVZ8EnMG81a1qY=; b=Pgq3ruBeXbStfsEoHGOelPtNuwlmX7XWKXm9LPCnpg0EmPgCDLgYfm/l ChrNNMGNx8qXL/MHZBn1FjOZoJWuz762pNCROOYyLmoa7M0u9KqQbAblb Flp9rhAi8ed9B5dPwW7LD8/j/MksYW1pARLvNMmUEY9hAY9GtldhgLCvQ 6JQ2ycdknQskuP2aByX4CRa2x966POvfZGS49DiFu6t3VTKFmCCyFO5WV IwE/nzwhBaQSEQ+sULz/qib3MqR9Ms62nsWWp7fHgMi3NeLOW7Eu5rMuN b2aUic4wvu+xwyou041R+DKGrQo3Z6Wcv2J3VUcFojTDv6dXhUk2051NS Q==; IronPort-SDR: troff2zG040W7IiPeTh1qCKpf4hcNEInuhMFDkC+P1wlHoNG1Mj/Cm4FigDR6CcFXvTLpzHT7F RUI2slOK6rCNisWh6WM/es2reFG+jx3rqZgkHpP8dfsqYkoc9M8ZlF/aOSsCTirLL/I4OJTleV GJ204T7plqp69bCbOA2V7TtGM1BVsRFmRVML9xOvytlTwrvnljtrLX4AGfhB3RK8sPEDcSuLAg Rwg5Rq4ioLA8SurNhwhrFfGHAi3t23UePaVQ/LM6WCs4tSF5OVJG1199WTUWWUFnBxNV0XmmAP Fr0= IronPort-SDR: cc635yjyjw7pk4vC5maa2pyFeg6m8HtDDP11OTIrQWw1HRgYYi1FKQrhkRg6xw0YEOiCi4PUyT VGBg6g0R3UUyBQCpjzsIjQ/lV4nLAxK3z8DX4ABMu2c9TIfz3prtdRVQhnp2jQVzU2e93FLOno 2YPlzAs5l8y/9EMzrrr2zyDey71sGG97c/OH/dx7q12rZ/xWexuMXVCPx5BycR5DDZlx3DDMUF HkjCIZTg2+IW6yG2W8oReGb5cdVwpPryDTCL5gOFjoqJXqvu+ICSVbce1odt4BJl7SOmqZnssk CWSDndCr9a/2V6N3H1p2tO4d IronPort-SDR: gHBLBtGzs/CYVm1O0nY49DkcG4dkyNUsstUoWSRdmZybPVhHHrAyvcNpgCwfw8FfOxbOkYXryU Ia+Ypmz/fNuvRBMKG0O4+7W/1OZTP58nWHqduCqvyWs4CxAkgN1Hdc8uKUkhv3EWSFny6N7Lni VAu5MjkQYmg5F9EBe+eYmwFkUy/a5up1sGVd8K+M14bUIWrvwP6uq4oghcSfuctAFXes+Fk+yO J9wBORKE2YNcgBSUup6/LUk3p1xyVJseSGl2SdZssnvE7BjFckZJXhjsRIwA6GQiQo+5BtkmYj yH4= WDCIronportException: Internal From: Alistair Francis To: libc-alpha@sourceware.org Cc: alistair23@gmail.com, Alistair Francis Subject: [PATCH v2 1/2] sysdeps: Add clock_gettime64 vDSO Date: Sat, 9 Nov 2019 18:56:57 -0800 Message-Id: <20191110025658.3149-1-alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for the clock_gettim64 vDSO calls. These are protected by the HAVE_CLOCK_GETTIME64_VSYSCALL define. HAVE_CLOCK_GETTIME64_VSYSCALL should be defined for 32-bit platforms (WORDSIZE == 32) that only run on the 5.1 kernel or later. WORDSIZE == 64 platforms can use #define __vdso_clock_gettime64 __vdso_clock_gettime and use the __vdso_clock_gettime syscall as they don't have a __vdso_clock_gettime64 call. * sysdeps/unix/sysv/linux/init-first.c: Add clock_gettime64 vDSO. * sysdeps/unix/sysv/linux/libc-vdso.h: Likewise. --- sysdeps/unix/sysv/linux/init-first.c | 10 ++++++++++ sysdeps/unix/sysv/linux/libc-vdso.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c index d90ca820be0..d005d133220 100644 --- a/sysdeps/unix/sysv/linux/init-first.c +++ b/sysdeps/unix/sysv/linux/init-first.c @@ -24,6 +24,11 @@ int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *) attribute_hidden; #endif +/* vDSO symbol used on clock_gettime64 implementation. */ +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL +int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *) + attribute_hidden; +#endif /* vDSO symbol used on clock_getres implementation. */ #ifdef HAVE_CLOCK_GETRES_VSYSCALL int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *) @@ -52,6 +57,11 @@ __libc_vdso_platform_setup (void) = get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME_VSYSCALL); #endif +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL + VDSO_SYMBOL(clock_gettime64) + = get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME64_VSYSCALL); +#endif + #ifdef HAVE_CLOCK_GETRES_VSYSCALL VDSO_SYMBOL(clock_getres) = get_vdso_mangle_symbol (HAVE_CLOCK_GETRES_VSYSCALL); diff --git a/sysdeps/unix/sysv/linux/libc-vdso.h b/sysdeps/unix/sysv/linux/libc-vdso.h index 792ac39d85a..c6d505bab39 100644 --- a/sysdeps/unix/sysv/linux/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/libc-vdso.h @@ -32,6 +32,10 @@ extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *) attribute_hidden; #endif +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL +extern int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *) + attribute_hidden; +#endif #ifdef HAVE_CLOCK_GETRES_VSYSCALL extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *) attribute_hidden; -- 2.23.0