From patchwork Fri Sep 6 14:59:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1159053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-105079-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="qp599JCX"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 46Q11S4WRKz9s3Z for ; Sat, 7 Sep 2019 00:59:39 +1000 (AEST) 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; q=dns; s= default; b=qSRWNOamy50bRjKl9JanGnFpg6aFHV0iBYXbjT1n/YDB9Zez5pwue XgcbapMjhNV7YrYTU9BEqbo/huvO3bt47igVYKAfX/fB1CsV1J3S5UOmzJYV8eNd 2YAyhQsvWKsN4+dRxSJdlIwcIV9CtumsG6Zvg7LpHBQd45pYUv0/gM= 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; s=default; bh=Sq7BjYCfHFpnIHU4X4y4OYb3p98=; b=qp599JCXLMZKNeBQqjCpOw1D2hpy L8yBTQmTP1Fre+yryx5BXT3ndP9I8Qmtz8KK7osWizFmbuNmkTDjZWDesloLJLrh SMIM4T/6PauMQ3PMNfaYH7Xa0s9O5cZ1QWXH0AsiBUx+n773b8D29SvydFGarCxx ofD2yWM1hXFE6LI= Received: (qmail 63870 invoked by alias); 6 Sep 2019 14:59:34 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 63788 invoked by uid 89); 6 Sep 2019 14:59:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*r:192.168.8 X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Zack Weinberg Cc: Alistair Francis , Arnd Bergmann , Alistair Francis , GNU C Library , Adhemerval Zanella , Florian Weimer , Carlos O'Donell , Stepan Golosunov , Lukasz Majewski Subject: [PATCH v7 0/3] y2038: Linux: Introduce __clock_settime64 function Date: Fri, 6 Sep 2019 16:59:08 +0200 Message-Id: <20190906145911.30207-1-lukma@denx.de> This patch set introduces the conversion of clock_settime to explicit 64 bit struct __timespec64 arguments. As a result this function is now Y2038 safe. This work is (loosely) based on a previous development/patches: https://libc-alpha.sourceware.narkive.com/zniMOWui/rfc-patch-00-52-make-glibc-y2038-proof#post68 Github branch (including the y2038 conversion example): https://github.com/lmajewski/y2038_glibc/commits/glibc__clock_settime-conversion-v7 Those patches have been applied on top of master branch: SHA1: a26918cfda4bc4b9dad8aae1496e3ef7cbb63d96 Shall be used with provided meta-y2038 for development and testing: https://github.com/lmajewski/meta-y2038 I've used guidelines from: https://www.gnu.org/software/libc/manual/html_mono/libc.html "D.2.1 64-bit time symbol handling in the GNU C Library" to convert *clock_settime*. and most notably from: https://sourceware.org/glibc/wiki/Y2038ProofnessDesign#clock_gettime.28.29 Lukasz Majewski (3): y2038: Introduce internal for glibc struct __timespec64 y2038: Provide conversion helpers for struct __timespec64 y2038: linux: Provide __clock_settime64 implementation include/time.h | 116 ++++++++++++++++++++++++ sysdeps/unix/sysv/linux/clock_settime.c | 38 +++++++- 2 files changed, 150 insertions(+), 4 deletions(-)