Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753929AbbDUO7M (ORCPT ); Tue, 21 Apr 2015 10:59:12 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:55376 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714AbbDUO7K (ORCPT ); Tue, 21 Apr 2015 10:59:10 -0400 From: Arnd Bergmann To: Thomas Gleixner 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 Date: Tue, 21 Apr 2015 16:57:18 +0200 Message-ID: <3231171.5TrYVVBLh4@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1429509459-17068-1-git-send-email-baolin.wang@linaro.org> <3755355.Xf0HbltZXg@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:cTX9xOoKdurwhgy+4ddqvZo1MgJdIoLq/gk4FrKKnAhzs5AG+xy tRTjwqikuqfsLtGOflbXSUEeYuJVJ+dty6tjOOk+fZhEuIzFPwm9MnpjMc1xl7LDmwj3VD9 Lfrt3CXFcyXvLO1BTmP/LhCnqmiwJdVKjkl5nUtQRlVE7HOH8c/GXLJPupWLetxWYex+8G2 p9J869pi7XWQQ4Solqf9A== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2549 Lines: 51 On Tuesday 21 April 2015 16:14:26 Thomas Gleixner wrote: > > Note the use of a separate __kernel_itimerspec64 for the user interface > > here, which I think will be needed to hide the differences between the > > normal itimerspec on 64-bit machines, and the new itimerspec on 32-bit > > platforms that will be defined differently (using 'long long'). > > Confused. > > timespec64 / itimerspec64 should be the same independent of 64bit and > 32bit. So why do we need another variant ? There are multiple reasons: * On 64-bit systems, timespec64 would always be defined in the same way as struct timespec { __kernel_time_t tv_sec; long tv_nsec; }, with __kernel_time_t being 'long'. On 32-bit, we probably need to make both members 'long long' for the user space side, in order to share the syscall implementation with the kernel side, but we may also want to keep the internal timespec64 using a 'long' for tv_nsec, as we do today. This means that both the binary layout (padding or no padding) and the basic types (long or long long) are different between 32-bit and 64-bit, and between kernel and user space * We should not put 'struct timespec64' into the user space namespace, as applications might already use that identifier. This is similar to the __u32/u32 or __kernel_time_t/time_t tuple of types for interface and in-kernel uses. This is particularly important when embedding a timespec in another data structure. * My plan is to use a temporary hack where I actually define __kernel_timespec64 to look like the 32-bit version of timespec, as an intermediate step when converting all 32-bit architectures over to use the compat_*() syscalls in place of the existing ones, so I can change over the normal syscalls to use __kernel_timespec64 without having to change all architectures at once, or having to modify each syscall multiple times. > > I would also prefer not too many people to work on the syscalls, and > > would rather have Baolin not touch any of the syscall prototypes for > > the moment. > > I did not ask him to change any of the syscall prototypes. I just > wanted him to split out the guts of the syscall into a seperate static > function to avoid all that code churn. Ok, I wasn't sure about that part, thanks for clarifying. Arnd -- 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/