Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2307608imu; Fri, 14 Dec 2018 08:58:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/V2t2LvWvfX9L+54LggC4wi4iiESVH5x0/pnzViRNrAuQoR86dF8axxW9E6nPqfewBO71rP X-Received: by 2002:a17:902:8607:: with SMTP id f7mr3435494plo.123.1544806710687; Fri, 14 Dec 2018 08:58:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544806710; cv=none; d=google.com; s=arc-20160816; b=dEo6mlKgt+EtcXgfooY9nxYHilfs8QlhXZZC7/+hdNM6ofWyOl5Yv24/YvucWSGtB7 8Y6FJZwq3OKwEsuZiQufoFq67DnC9TY0h/tQ333StSHqM94TEbBNkL1uCZjD7Iq3Qi5O EoUrd6lIxpVUEUf5qzXC/tBZg9ugiGjLIHlegkmg9XovBzVIReZMB1OpkIucdyrF9PVs 2MoQoxfsgkVyLQQOfbgU5M+U0mcIotnWeARIcaNFhdtau3kRdCD/D3HyOiv+lrW9GR+q dwomZZV7d2NY4yfYBdOf5GIqE/xUlsaPZOqRZaZe9ZnkqqRqu7FzIZG8rolyIsHWy7FQ xvhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KTNTjRur3nv0tR8SZ1srzhz4/01457/ZUcuPP3MWtZY=; b=Hkv3mOUSkJ1rkErPjSSC8rJQbwvmEgRqG+vHjtTuDs2xuZEVsVQUSWR0O2pbKyKg04 vxdi3+a5wIsIfscYfPdIBzvbNHXsCHrrVhoOv0VNGo/JW7EC+fHeNejeYAb0yN554Koz j+RK68rji2+Y8VQlS1ZrKeiCJDmbaJJiUbqY//IhOejVH5jWmnt2NiXVaWMK/BrIr3UQ /6xtlZVK3WhIChvXOdGOfELUek3NjaNH3O/R6/VeZ92QY4UEFvef5TqdsFFZ6oxHAvx8 l0pdcO0NsNlkarsYzqJgCZBtzZAcn/Y9sC8OKFNMfwv/eMr4SSikeF4j6nln8czRuqEx jq7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y26si4599073pfd.25.2018.12.14.08.58.14; Fri, 14 Dec 2018 08:58:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730045AbeLNQzq (ORCPT + 99 others); Fri, 14 Dec 2018 11:55:46 -0500 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:59046 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729660AbeLNQzq (ORCPT ); Fri, 14 Dec 2018 11:55:46 -0500 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1gXqkR-0004lx-00; Fri, 14 Dec 2018 16:55:35 +0000 Date: Fri, 14 Dec 2018 11:55:35 -0500 From: Rich Felker To: Florian Weimer Cc: Bernd Petrovitsch , John Paul Adrian Glaubitz , Andy Lutomirski , X86 ML , LKML , Linux API , "H. Peter Anvin" , Peter Zijlstra , Borislav Petkov , Mike Frysinger , "H. J. Lu" , x32@buildd.debian.org, Arnd Bergmann , Will Deacon , Catalin Marinas , Linus Torvalds Subject: Re: Can we drop upstream Linux x32 support? Message-ID: <20181214165535.GZ23599@brightrain.aerifal.cx> References: <70bb54b2-8ed3-b5ee-c02d-6ef66c4f27eb@physik.fu-berlin.de> <20181213160242.GV23599@brightrain.aerifal.cx> <20181214161732.GY23599@brightrain.aerifal.cx> <87mup8gj1y.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mup8gj1y.fsf@oldenburg2.str.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 14, 2018 at 05:38:33PM +0100, Florian Weimer wrote: > * Rich Felker: > > > This is all useless (and wrong since tv_nsec is required to have type > > long as part of C and POSIX, regardless of ILP32-vs-LP64; that's a bug > > in glibc's x32). > > We should be able to fix standards if they prove unworkable in practice. > In my opinion, if standards require complex solutions where an obvious > and simple solution exists, then standards are wrong. The requirement doesn't mandate complex solutions. There's nothing complex about tv_nsec being long. long is the smallest type that C guarantees to be large enough to store the range of values, which is forever fixed and can't grow (because the definition of "nano" prefix is fixed :). The type has been long ever since the structure was introduced, and its being long means that there's lots of (correct!) code using %ld (e.g. ".%.9ld" to format results as a decimal without using floating point approximations) to print it. There might also be code taking pointers to it to pass to functions, etc. The only reason a "complex" need arises is that Linux did something horribly wrong here, ignoring the specified type, when introducing an obscure subarch that almost nobody uses. This kind of mistake is becoming a theme in Linux (see also: msghdr). Application authors should not have to pay the price for fixing this by retrofitting yet another silly type like "snseconds_t" or something into programs to accommodate the mistakes of x32. Rich