Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932745AbbDUUOG (ORCPT ); Tue, 21 Apr 2015 16:14:06 -0400 Received: from www.linutronix.de ([62.245.132.108]:59906 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932501AbbDUUN7 (ORCPT ); Tue, 21 Apr 2015 16:13:59 -0400 Date: Tue, 21 Apr 2015 22:13:42 +0200 (CEST) From: Thomas Gleixner To: Arnd Bergmann cc: y2038@lists.linaro.org, Baolin Wang , pang.xunlei@linaro.org, peterz@infradead.org, benh@kernel.crashing.org, heiko.carstens@de.ibm.com, paulus@samba.org, cl@linux.com, heenasirwani@gmail.com, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, mpe@ellerman.id.au, rafael.j.wysocki@intel.com, ahh@google.com, fweisbec@gmail.com, pjt@google.com, riel@redhat.com, richardcochran@gmail.com, schwidefsky@de.ibm.com, john.stultz@linaro.org, rth@twiddle.net, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, tj@kernel.org, linux390@de.ibm.com, linuxppc-dev@lists.ozlabs.org Subject: Re: [Y2038] [PATCH 04/11] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure In-Reply-To: <2819798.f0KhjY3UAe@wuerfel> Message-ID: References: <1429509459-17068-1-git-send-email-baolin.wang@linaro.org> <3231171.5TrYVVBLh4@wuerfel> <2819798.f0KhjY3UAe@wuerfel> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1346 Lines: 37 On Tue, 21 Apr 2015, Arnd Bergmann wrote: > I know there are concerns about this, in particular because C11 and > POSIX both require tv_nsec to be 'long', unlike timeval->tv_usec, > which is a 'suseconds_t' and can be defined as 'long long'. > > a) > > struct timespec { > time_t tv_sec; > long long tv_nsec; /* or typedef long long snseconds_t */ > }; > > This is not directly compatible with C11 or POSIX.1-2008, but it > matches what we do inside of 64-bit kernels, so probably has the > highest chance of working correctly in practice After reading Linus rant in the x32 thread again (thanks for the reminder), and looking at b/c/d - which rate between ugly and butt ugly - I think we should go for a) and screw POSIX and C11 as those committee dinosaurs seem to completely ignore the 2038 problem on 32bit machines. At least I have not found any hint that these folks care at all. So why should we comply to something which is completely useless? That also makes the question about the upper 32bits check moot, so it's the simplest and clearest of the possible solutions. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/