Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3813028imc; Thu, 14 Mar 2019 06:02:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYJEzhfCiLKeY29/dtcHU738IZfYVbUApM45W2HXNhXoSqO254RDwELbCppK7UDXBy9FlT X-Received: by 2002:a17:902:2947:: with SMTP id g65mr50972238plb.258.1552568523955; Thu, 14 Mar 2019 06:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552568523; cv=none; d=google.com; s=arc-20160816; b=mWtdWBAo4PQWCt1s+PkTa0ESEhsYdAu7ZKprOAETilVkORu/H2it9DaZT/qG7UqHGP xFrWH6Id55Olq14Q1DH9GQNuQG00m63pEQi8HRDY5KsLycuejbh1GfjSeCWOiKDFF7Td jvi64KmJq5h18dKRYk/Ij/YAlQ9e6eFSYMaoAyARtGeEtzA3ZTT59546wv5Df3mQwuBC Ru5ZdKkrgfrKYferO0oF22OAQIDFAQnK7QpD+m0D6UjTqscOhwePov3EWgQlRXUsGBrF bueQm1K6aFOObesJK0PRm9on4JVy+cwesGQmmn722Fz+JMELeLrKTVcI6il0dZ3N8a2M YSTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=/qb1gxco0Imk6onyQ8juDJjuYjohpr/NHdDml6LLUsI=; b=KItgBdekNAzqVs0SRMFHSaA9kBEXum9DWvOqfCug3urI1JKrCznrPY4Zt59kALHh+3 7KAHUBE60QTKYdBKKSJVBMTIbjQzwNd/j7x30ZX4d79ANWrRdYzRcz43iu233U9Wn3ua DqV75mkaYins9O5O/mEagL/mKdWbhgG0j6x0RaMrfryHaNehYOhUmkb2qnNuBd4KM720 pQK1RUOvEhU3e1SZ6BMBhoZy0sksZF6JnKbkOok66FpsEN8QX30lAaE8VcYF2AJgIiRH tKpXF7aOMAxDEeSdJ17ssKLDMrN7z8PyfZS229l9Zqgdx4Mx/9xvWLFrxpK8PJ8R01Bw uE7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d62si13039692pfg.160.2019.03.14.06.01.46; Thu, 14 Mar 2019 06:02:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727268AbfCNNBG (ORCPT + 99 others); Thu, 14 Mar 2019 09:01:06 -0400 Received: from ozlabs.org ([203.11.71.1]:43027 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727059AbfCNNBG (ORCPT ); Thu, 14 Mar 2019 09:01:06 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 44Kpjp5fV9z9s55; Fri, 15 Mar 2019 00:01:02 +1100 (AEDT) From: Michael Ellerman To: Arnd Bergmann Cc: linuxppc-dev@ozlabs.org, Thomas Gleixner , Stephen Boyd , John Stultz , jaydee@email.cz, Benjamin Herrenschmidt , Linux Kernel Mailing List , Vincenzo Frascino Subject: Re: [PATCH] powerpc/vdso64: Fix CLOCK_MONOTONIC inconsistencies across Y2038 In-Reply-To: References: <20190313131438.8212-1-mpe@ellerman.id.au> Date: Fri, 15 Mar 2019 00:00:59 +1100 Message-ID: <871s398vas.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann writes: > On Wed, Mar 13, 2019 at 2:14 PM Michael Ellerman wrote: > >> That causes CLOCK_MONOTONIC to jump ahead by ~4 billion seconds which >> it is not meant to do. Worse, if the time is then set back before the >> Y2038 boundary CLOCK_MONOTONIC will jump backward. >> >> We can fix it simply by storing the full 64-bit offset in the >> vdso_data, and using that in the VDSO assembly code. We also shuffle >> some of the fields in vdso_data to avoid creating a hole. > > I see nothing wrong with your patch, Thanks. > but I would point out that there is a patch series [1] from Vincenzo > Frascino to unify the vdso implementation across architectures that I > hope can make it into linux-5.2, and that will resolve this issue, as > well as allow 32-bit architectures to provide a working interface with > 64-bit time_t. Yeah I did see that series. I will try and keep an eye on it, though I'm not sure I'll have time to convert powerpc to use it for 5.2. I'm also not sure how easy it's going to be to convert to the C versions, because our syscall ABI is not a simple function call (result code is returned in CR0.SO). cheers