Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2495168imu; Fri, 14 Dec 2018 12:00:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/X+KZ+NmEJPl7nperrPhuscuN6tbl7+MVffpbPDcK6Dy6YJtlXihJJzf+jdOb3cC52LF2G5 X-Received: by 2002:a17:902:d697:: with SMTP id v23mr3997134ply.261.1544817655705; Fri, 14 Dec 2018 12:00:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544817655; cv=none; d=google.com; s=arc-20160816; b=EYnMkJ3L90L6XXyBnviZOXxPGmi0SFgCx4wirRRns6X5f5civVZQCj3JH8X3tw2oeO 47i+8Q3ND6cVJolI9EO7s9MyIIr/X+VVzJvAdRJRCDewbhTrK2KwdrV+IjujKDzydY+s Vb4Wmv1Gmdzc34//yti+/K2tYOl1rRcGhQO7WNgTj52Flg7wtC0IZrKfAvwQYSJ9gDTl K0seFRMnsyQw+m2dqw9HirSuPoH7hJdcxfEAHcT3RqVodc8c/ZX00SYZjiV0SuHWTbNt 6ycb6Ms+tyeOCeUkPvFErJk/EM7/Uq1YlMs/A7AdauhCiLBXlWk5cU0LporAsAFy9nfR PLJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=uBatSFJx1CXJz26gK6EMaGD2mkvDz+TFKUHFbJTmjOk=; b=TC5Jx/2lqUtnxoeX45NUPIaoOaf8TPMDesh52i4QBqKcUWdV23uib9oSSySAu9G9BS BC/dGzOgSv+84aAF9BAUVj1xVCh0baBwxR8ApEwrwk1oK06kuEr4KdZfyzPeI919i4Bp TdkgNfvNzKcIT+yvEm/QCFq8PBPgm/PX9yTfwpeEGD+vS9SF2dKKuf5ITcd26AENNUBl 0ze4sWhR+bwSyjKQRyx8p8WbL8fwGDzOO0kcYghr1QzLFoOndFJHIaBPZxR6+ZPlzw9C +sEf/3J4oRHmiWWkPY6liUvI/3PvNplTq+htkr6gKcUsAQCjFDLhVIQPZm6RvO7BTL2T 4YGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nHWT3lgC; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si4655199pgh.505.2018.12.14.12.00.37; Fri, 14 Dec 2018 12:00:55 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nHWT3lgC; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730686AbeLNT7o (ORCPT + 99 others); Fri, 14 Dec 2018 14:59:44 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:44201 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730493AbeLNT7o (ORCPT ); Fri, 14 Dec 2018 14:59:44 -0500 Received: by mail-qt1-f196.google.com with SMTP id n32so7524159qte.11; Fri, 14 Dec 2018 11:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=uBatSFJx1CXJz26gK6EMaGD2mkvDz+TFKUHFbJTmjOk=; b=nHWT3lgCCcZu5AnU2hGBlw1pHcKfjS/BXwn8GvyplUm/PfQFrKr3Qge2DwdpHY/qnl yiXzscoqiwyMNukkMyVrrXvfeKNCQC5JTWHSgEGTdpYkepI7GyYjiuNXl170vuI3Mq6m ENeh28qvo0EKDeipeDKNBasmb3b5Rdj35j2TnC7t7FT9MFqjR9q/yepiGSotkRfC4d6H pQ2qAhvUPko+1WSwu3+vpcrzMhrpqsxQrw4nk1ovtKuwVrcHi8vX9MgS5OJvtmiz7jUk bhOnyRKFvXXanvj/TKcPykKIeDBICffdn9XrpPqPmoa9MC5CDW9Rya2seB5ZJnrIGzBS GZ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=uBatSFJx1CXJz26gK6EMaGD2mkvDz+TFKUHFbJTmjOk=; b=U01ys0HU+mPAXLlAsJtsVosLnPRZNT7JrWc484rpdUG4ThnXw46Iz8aeXY3js3CxlY 3cT6b4KGQdpiJeS0cab78+PVNml8DFPZyw6O7BWDPkfY1/BOBKuyGAOVUfi6km1fscSk Y/ZrAngetRXfjaPpAg41ve0d3klOtOq4U0O5NH7kXLcLqELDQpuYnAD2QTiKvIzHowOo 9X0ED+g3Jd3gRe9qUDeIx3EaETMHWyuU2D933A5VVrVZ/4v47WwB9KcPQjgkTcNatpyd LWwPybWoKbQiccj6nJrmcP2CMLVxmj97r++bm/aZexKaaOfhJO0mcTOL6hiIQ6dlIb6W OxGg== X-Gm-Message-State: AA+aEWb02Ym/vhuNb1MZmdvWXqws+XcqLvTcEZbZl+21F2uP/280ZLz/ M8F9iITWo6ZxUmc27k4TLylukICDyEuzZSvB+ig= X-Received: by 2002:ac8:839:: with SMTP id u54mr4249224qth.313.1544817583218; Fri, 14 Dec 2018 11:59:43 -0800 (PST) MIME-Version: 1.0 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> <20181214165535.GZ23599@brightrain.aerifal.cx> In-Reply-To: From: Lance Richardson Date: Fri, 14 Dec 2018 14:59:32 -0500 Message-ID: Subject: Re: Can we drop upstream Linux x32 support? To: Andy Lutomirski Cc: Rich Felker , Florian Weimer , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org My impression is it was mostly a desire to reuse existing x86_64 system cal= ls as much as possible without modification or additional compat layer work. The 64-bit time requirement seems to have come from an lkml discussion, whi= ch has quite a bit of interesting background about x32: https://lkml.org/lkml/2011/8/26/415 https://lkml.org/lkml/2011/8/26/453 On Fri, Dec 14, 2018 at 2:05 PM Andy Lutomirski wrote= : > > > > > On Dec 14, 2018, at 8:55 AM, Rich Felker wrote: > > > >> 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 bu= g > >>> in glibc's x32). > >> > >> We should be able to fix standards if they prove unworkable in practic= e. > >> 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. > > > > > > Does anyone know *why* Linux=E2=80=99s x32 has __kernel_long_t defined as= long long? I assume that this is where this bug, and most of the other bu= gs, came from. > > This may be silly, but the kernel could plausibly add a x32v2 where long = is genuinely 32-bit, and then maybe we could drop the old x32 at some point= . From all the discussion so far, it seems like there really is some deman= d for ILP32, but it=E2=80=99s still not really clear that preserving compat= ibility with existing x32 binaries in the long run is critical.