Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2130042imu; Fri, 14 Dec 2018 06:17:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/WaKbssi8xmBDQzKpw5qiKv2zMLKFjN4J2ppXpcvSGzTs9MsuT7I4OAasc5AWIpQtH9uyDr X-Received: by 2002:a62:cdd:: with SMTP id 90mr2993613pfm.219.1544797039783; Fri, 14 Dec 2018 06:17:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544797039; cv=none; d=google.com; s=arc-20160816; b=r/AtrqumoR7D+H97LRFGWnUMRbKyGC6vRi0e/E4vT4pjwdOC02I6WuHETSy6wvS6Y+ 9QpAhZJAZVck19txz+AlRVMDVSIczl+bTf/wJuuXx5coLWpWgeDI1dgXzWG/U5Ej21Vh 4FpF7d3SVWhyN3g23BmO+AVEPlcBr2XKQUifQmAQ6Sa/Lvz2jcnzgGqdYpne21GvnsX0 5v14y5XxTbAbO02jEzCBuJWR1oV2MtPZp001lEPy1y5ncaWQDNkF6b0HXlzDSvwGd0f0 024+Xe8FTF5albIvaC1N7dNOLa8SifC6A5uG+raSdQeE+osBzE9R0N/YUHcyTypjcGiH 5Hgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject; bh=UN/SxKdkYq2/tOE0vJsk2RL4PlicWDXz1aoB+GYizpc=; b=WTXzp4q9zEf0Gyf/mhXyWQq0SEfitDgw+V4g+bRyzvpwYSIVpECZDQh5V2i/y70iCg 9Ft+QdRfWyFlhpGPN6oitjkg1ivu9R+00K+B4YHVNAgGs+qEz+WQZsBpY1BmgAhwEMND EN1WnfduRG6JxHC07wjjuJATc7t0nQ0h1WspI6lPuMuOeKBLbY5gZj9a1POBW/DaLftz QnzmaJwxd5j6ngblE/mAnoQ7dkLrHXIsEXmeFhPjG0oZsWYTEf1X+fx0DNUG2JjiHRsg ILMJ9KNxIfpNPQmP7uZRktf58G/lrSsuCmKhLEoy8NNRVa5k/2Tj6DCNP6TELqE+krsd SHMQ== 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 t3si772807pgg.403.2018.12.14.06.16.54; Fri, 14 Dec 2018 06:17:19 -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 S1730084AbeLNOPH (ORCPT + 99 others); Fri, 14 Dec 2018 09:15:07 -0500 Received: from esgaroth.petrovitsch.at ([78.47.184.11]:2732 "EHLO esgaroth.tuxoid.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbeLNOPH (ORCPT ); Fri, 14 Dec 2018 09:15:07 -0500 Received: from [10.68.100.236] (h10-gesig.woeg.acw.at [217.116.178.11] (may be forged)) (authenticated bits=0) by esgaroth.tuxoid.at (8.15.2/8.15.2) with ESMTPSA id wBEEDHuR001286 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Fri, 14 Dec 2018 15:13:18 +0100 Subject: Re: Can we drop upstream Linux x32 support? To: Rich Felker , John Paul Adrian Glaubitz Cc: Andy Lutomirski , X86 ML , LKML , Linux API , "H. Peter Anvin" , Peter Zijlstra , Borislav Petkov , Florian Weimer , Mike Frysinger , "H. J. Lu" , x32@buildd.debian.org, Arnd Bergmann , Will Deacon , Catalin Marinas , Linus Torvalds References: <70bb54b2-8ed3-b5ee-c02d-6ef66c4f27eb@physik.fu-berlin.de> <20181213160242.GV23599@brightrain.aerifal.cx> From: Bernd Petrovitsch Message-ID: Date: Fri, 14 Dec 2018 15:13:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181213160242.GV23599@brightrain.aerifal.cx> Content-Type: multipart/mixed; boundary="------------544822C287D28255C7136853" Content-Language: en-US X-DCC-URT-Metrics: esgaroth.tuxoid.at 1060; Body=17 Fuz1=17 Fuz2=17 X-Virus-Scanned: clamav-milter 0.97 at esgaroth.tuxoid.at X-Virus-Status: Clean X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on esgaroth.tuxoid.at Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------544822C287D28255C7136853 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 13/12/2018 17:02, Rich Felker wrote: > On Tue, Dec 11, 2018 at 11:29:14AM +0100, John Paul Adrian Glaubitz wro= te: >> I can't say anything about the syscall interface. However, what I do k= now >> is that the weird combination of a 32-bit userland with a 64-bit kerne= l >> interface is sometimes causing issues. For example, application code u= sually >> expects things like time_t to be 32-bit on a 32-bit system. However, t= his IMHO this just historically grown (as in "it has been forever that way" - it sounds way better in Viennese dialect though;-). >> isn't the case for x32 which is why code fails to build. >=20 > I don't see any basis for this claim about expecting time_t to be > 32-bit. I've encountered some programs that "implicitly assume" this > by virtue of assuming they can cast time_t to long to print it, or > similar. IIRC this was an issue in busybox at one point; I'm not sure > if it's been fixed. But any software that runs on non-Linux unices has > long been corrected. If not, 2038 is sufficiently close that catching > and correcting any such remaining bugs is more useful than covering > them up and making the broken code work as expected. Yup, unconditionally providing 64bit time_t/timespec/timeval/...-equivalents with libc and syscall support also for 32bit architectures (and deprecating all 32bit versions) should be the way to go. FWIW I have ---- snip ---- #if defined __x86_64__ # if defined __ILP32__ // x32 # define PRI_time_t "lld" // for time_t # define PRI_nsec_t "lld" // for tv_nsec in struct timespec # else // x86_64 # define PRI_time_t "ld" // for time_t # define PRI_nsec_t "ld" // for tv_nsec in struct timespec # endif #else // i[3-6]68 # define PRI_time_t "ld" // for time_t # define PRI_nsec_t "ld" // for tv_nsec in struct timespec #endif ---- snip ---- in my userspace code for printf() and friends - I don't know how libc's react to such a patch (and I don't care for the name of the macros as long it's obviously clear for which type they are). I assume/fear we won't get additional modifiers into the relevant standards for libc types (as they are far more like pid_t, uid_t etc.). And casting to u/intmaxptr_t to get a defined printf()-modifier doesn't look appealing to me to "solve" such issues. MfG, Bernd --=20 "I dislike type abstraction if it has no real reason. And saving on typing is not a good reason - if your typing speed is the main issue when you're coding, you're doing something seriously wrong." - Linus Torvalds --------------544822C287D28255C7136853 Content-Type: application/pgp-keys; name="pEpkey.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pEpkey.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- mQGNBFss+8cBDACpXlq0ZC9Qp8R+iFPx5vDPu12FpnmbbV8CwexVDchdizF2qz+A PFh12RrkE6yudI0r7peAIRePiSVYqv8XT82TpJM+tbTYk/MSQaPhcmz8jl1HaKv0 q8g5nKtr42qRsswU7Q2Sa6mWXaIdOisPYZ9eLZC9BDBhI/YrgdAwszyYJ1HUwNkp Dw5i4wW/SsIKrotCboYzbBjZfHbmDJr4dFYSoMg5jQVHD2Yz8fqNSoRyd7i/oicn 1bH/DjEkrmIu9YuptuHYmblpCRo5dLww7kgszNw12j8Iljp64uJ/uz5+asBUmRZM mGey82BB1DnIvy1v+GnbGWFIYy79/HeqdN+KbOgO/sXoqYKS5KJ6aSqWOLTQk6sv AnDN2PNF5jOB9ROCNwoQSH/YNEfMd/mQ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a4FTQtKCXno5Stys5wYG6OXiGOw3sTbs3v qy95H5/cVa6mf81OiNZP1liXnm0cBrT+UbFgtZk/OnoekzS7RPCdCuMZyxMqPTLl +EjNyejmSN3cnGLNDa+Jh/eSIUZzvihuNFxdtQQfuD+nqoPanfSfrWaDABMU7Daf 6vZI10D3d473WzCplWR4A+Rdm8ysi2haas7KZnL+ajcEo2jCghW83BQPBD57fEtl UWLXihAFcEiSx0i2AUAXYOcAEQEAAYkBvAQYAQoAJhYhBIA1sshxMJLHm6Oee4VK uwIQRyhmBQJbLPvJAhsMBQkB4TOAAAoJEIVKuwIQRyhmrGIL/3rsdQqaO3umXj9X Ts4nAme/2DVsEyGUFzeDllbzOKH7PsjJhbEsQRRE+kDk0tp2xbpVzNZ73wFhXFL+ zqa8tdMhYEjLUZ4ry/bg83yZH2bNj/jTii32AkvmL2zcYf0/knuAAAypdfTM4K6S PVlwOo09Drkiz/SDXyvpSG9GdCZLVR/HbQpsob0JddcouWwliATRrnUETb/MN6MO WI4687r1wi4Kn28CHydWA5YONvFyb7BJZRHiLQnJwlh7dgBtOSCeZClrKfhIBFB2 YgfBcgmHnpYkzyBGdUTnrrlmiMeuxZqG2SzwswRMACYqUFoe+3E7RZQX5ym17oUP Kat5L8uZbd2+TlbICXnxwTadBKDvk8qxjLSwzthoHlmM6zeFekQdq67aiBWfa9oV 6tljJtvE9QREo+hDjQaiVmzHqeB8pMGVHWzAGJzvxFuXMaKzUI8vWDH5jaht0Sqn xHyhVz8+rEsLoB67PBuY3GLecTeQ3rr52BVMzfNRPdSyVHESzw=3D=3D =3Dv2Yn -----END PGP PUBLIC KEY BLOCK----- --------------544822C287D28255C7136853--