From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112619 invoked by alias); 25 Jun 2019 14:21:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 112611 invoked by uid 89); 25 Jun 2019 14:21:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=highest, H*i:sk:87r27hz, H*f:sk:87r27hz X-HELO: mail-qk1-f194.google.com MIME-Version: 1.0 References: <2df9d3878359585ac1cc46243fb6664f7a50b3b3.1561421042.git.alistair.francis@wdc.com> <87ftnx6i0m.fsf@oldenburg2.str.redhat.com> <877e9950hj.fsf@oldenburg2.str.redhat.com> <87a7e522wb.fsf@oldenburg2.str.redhat.com> <87r27hzrjd.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87r27hzrjd.fsf@oldenburg2.str.redhat.com> From: Arnd Bergmann Date: Tue, 25 Jun 2019 14:21:00 -0000 Message-ID: Subject: Re: [RFC v2 08/20] sysdeps/wait: Use waitid if avaliable To: Florian Weimer Cc: Zack Weinberg , Alistair Francis , GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-06/txt/msg00675.txt.bz2 On Tue, Jun 25, 2019 at 4:08 PM Florian Weimer wrote: > * Arnd Bergmann: > > On Tue, Jun 25, 2019 at 3:47 PM Florian Weimer wrote: > >> This makes me rather unhappy. I also don't see the benefit of renaming > >> all time-related system calls for new architectures. > > > > What got renamed? > > futex to futex_time64 on RV32. seems to expose only the > latter. But that's the point: futex() takes a timespec argument based on 'long', so that won't work beyond y2038 on 32-bit architectures and we cannot provide that. One of the highest priorities in the conversion was always to ensure that new architectures would behave exactly the same way as the existing ones, except for leaving out the compatibility support for old C libraries that never existed on those architectures. Reusing the old __NR_futex() macro with a new ABI would require having architecture specific hacks even in C libraries that never supported 32-bit time_t on any architectures, or that dropped that support. > > I was trying very hard to make it as consistent > > and easy as possible. There is a strict mapping of __NR_* macros > > to argument types for each system call [1], so e.g. __kernel_timespec > > will always be used together with system calls named *time64(), > > while the old system calls always refer to the traditional > > "struct timespec {long tv_sec; long tv_nsec;}" type. This is the > > same way that loff_t gets handled, so I assumed that all C libraries > > would know how to deal with this well. > > I'm afraid, but this setup makes little sense if the old system call > does not exist for an architecture. Instead it requires additional > porting effort. I think we can still add back the time32 syscalls for rv32 in linux-5.2 if that helps, it should be a one-line patch in the kernel (and it would mean that linux-5.1 would be broken for anyone actually using those). Arnd