From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 17 Nov 2017 11:40:48 +0100 (CET) From: Thomas Gleixner Subject: Re: [PATCH 0/9] posix_clocks: Prepare syscalls for 64 bit time_t conversion In-Reply-To: Message-ID: References: <20171110224259.15930-1-deepa.kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: List-Archive: List-Post: To: Arnd Bergmann Cc: Deepa Dinamani , John Stultz , Linux Kernel Mailing List , y2038 Mailman List , Arnaldo Carvalho de Melo , Benjamin Herrenschmidt , Christian Borntraeger , Catalin Marinas , Chris Metcalf , cohuck@redhat.com, David Miller , Helge Deller , devel@driverdev.osuosl.org, gerald.schaefer@de.ibm.com, gregkh , Heiko Carstens , Jan Hoeppner , "H. Peter Anvin" , "James E.J. Bottomley" , Julian Wiedmann , Linux API , linux-arch , "open list:RALINK MIPS ARCHITECTURE" , Parisc List , linuxppc-dev , linux-s390 , Mark Rutland , Ingo Molnar , Michael Ellerman , oberpar@linux.vnet.ibm.com, oprofile-list@lists.sf.net, Paul Mackerras , Peter Zijlstra , Ralf Baechle , Steven Rostedt , Robert Richter , Martin Schwidefsky , sebott@linux.vnet.ibm.com, sparclinux , Stefan Haberland , Ursula Braun , Will Deacon , the arch/x86 maintainers List-ID: On Fri, 17 Nov 2017, Arnd Bergmann wrote: > On Fri, Nov 17, 2017 at 10:54 AM, Thomas Gleixner wrote: > > On Fri, 17 Nov 2017, Arnd Bergmann wrote: > >> On Fri, Nov 17, 2017 at 9:58 AM, Thomas Gleixner wrote: > >> > >> No, syscall that existing 32-bit user space enters would be handled by > >> compat_sys_nanosleep() on both 32-bit and 64-bit kernels at that > >> point. The idea here is to make the code path more uniform between > >> 32-bit and 64-bit kernels. > > > > So on a 32bit system compat_sys_nanosleep() would be the legacy > > sys_nanosleep() with the existing syscall number, but you don't want to > > introduce a new sys_nanosleep64() for 32bit. That makes a lot of sense. > > > > So back to your original question whether to use #if (MAGIC logic) or a > > separate config symbol. Please use the latter, these magic logic constructs > > are harder to read and prone to get wrong at some point. Having the > > decision logic in one place is always the right thing to do. > > How about this: > > config LEGACY_TIME_SYSCALLS > def_bool 64BIT || !64BIT_TIME > help > This controls the compilation of the following system calls: > time, stime, > gettimeofday, settimeofday, adjtimex, nanosleep, alarm, getitimer, > setitimer, select, utime, utimes, futimesat, and > {old,new}{l,f,}stat{,64}. > These all pass 32-bit time_t arguments on 32-bit architectures and > are replaced by other interfaces (e.g. posix timers and clocks, statx). > C libraries implementing 64-bit time_t in 32-bit architectures have to > implement the handles by wrapping around the newer interfaces. s/handles/handling/ ???? > New architectures should not explicitly disable this. New architectures should never enable this, right? Thanks, tglx