From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22086 invoked from network); 27 Dec 2020 21:52:35 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 27 Dec 2020 21:52:35 -0000 Received: (qmail 27742 invoked by uid 550); 27 Dec 2020 21:52:32 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 27721 invoked from network); 27 Dec 2020 21:52:31 -0000 Date: Sun, 27 Dec 2020 16:52:19 -0500 From: Rich Felker To: musl@lists.openwall.com Cc: Alexander Lobakin Message-ID: <20201227215218.GA22981@brightrain.aerifal.cx> References: <20201227183842.22030-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201227183842.22030-1-alobakin@pm.me> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH 00/18] time64: always prefer time64 syscalls On Sun, Dec 27, 2020 at 06:39:03PM +0000, Alexander Lobakin wrote: > Since Linux 4.18, there's an option CONFIG_COMPAT_32BIT_TIME that > allows to ultimately test libc and userland programs if they are > using the latest available syscall variants, time64 variants in > particular. > With this option turned off, old time32 syscalls don't get compiled > at all. The same applies to some deprecated syscalls such as > nanosleep. CONFIG_COMPAT_32BIT_TIME is a violation of kernel stability policy and was introduced as a bait-and-switch, with an initial promise that it was a debugging option that would be hidden behind kernel hacking, that somehow disappeared and ended up getting replaced with a situation where it's turned off by allnoconfig. It should never be enabled on any production system, as it precludes running any existing binaries that depend on the kernel stability policy. In general musl usually uses the oldest kernel APIs supporting the needed functionality, and this is very intentional. It avoids costly fallback procedures and situations where these code paths don't get tested. Aside from the principle of the matter, there are fairly large number of call points where no fallback at all is needed, but one would be needed if we used the new time64 syscalls first. This is because a lot of the syscalls that CONFIG_COMPAT_32BIT_TIME=n wrongly removes (again, in violation of kernel stability policy) are only time-dependent for an optional timeout, and are usually called without a timeout. This is particularly the case for futex, where each futex call point would get considerably heavier if it had to support fallbacks with a different syscall. I haven't looked at the specifics of your patches yet to know if they even got this. I will soon, but I'm pretty sure this is all just going to have to be a no. Rich