From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13E7731714A for ; Fri, 5 Jun 2026 03:36:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780630572; cv=none; b=NJ7rcv/QW8Glkt0Mg+ywbGgQjKQBSFxygvpS4/oR9BPxdJus+LT3h2oTlHUEidlWt+qY/V1PGgl0yoUjAkkAHK8I40Nv3+7JEthFihDG8uk5AdUGH5CuVVt3TespKajx6PMqqnO9yz5lBTT1HExHi8pDahDmyIyWSZ6u33P4i20= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780630572; c=relaxed/simple; bh=QnMJ3acknBUTZ7AxSXIa1Qsynda3jpVmBZuVpjcQfes=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=elSTLceTMtdvhJ7tA+pAoLOBigztIdiJkQuDZepKLUhXDUJAAZUqutwN3CvmIbeXYmLUO2PHMi9c1jisWkExeM6vJ55+rEAXyv+g44g5/oGmmve5ogoYp1GZBJOUS24oOx3LwJxljR2P1b+TINssZTEKQPp3epFRVEZI6Ti+oCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=oHfBt4SE; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="oHfBt4SE" Received: from ehlo.thunderbird.net (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 6553ZRxY237429 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 4 Jun 2026 20:35:27 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 6553ZRxY237429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026052701; t=1780630529; bh=QWXxy/+QLio48UDLQfZlEr9QaL/fgFJtewZyBShI5gM=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=oHfBt4SEf/PztVeyLSnErr5m5RrXcPfwSaAZhR//h87wv3SueKsLE4BoODfwmf7oF zO/M42pW7VRpybM4rGGW+rGT8w6ur17ps2WOZLiSMofDGRvS3G//0HdlrR7J2VTUUI YeCIvdlSfpLzr05n+tnZVtl+roYBDzDhBCns7Ehb55p0stpC8epzcyF5egrDtm74pN M44H9LeTV6w2jNX7nAJsVF3pD/kpayom4yFxoIHfQC9BOJNGAyu+lZSaW0S2IaUSm5 BAgkmVcRKH3ooKiD4Bk8RMmRmeYE2zMBK9oker9AdVwX2J2qkrRzVvqbDS34u1Ic9W SQw208KNxOmRw== Date: Thu, 04 Jun 2026 20:35:21 -0700 From: "H. Peter Anvin" To: Arnd Bergmann , "Maciej W. Rozycki" CC: Sebastian Andrzej Siewior , linux-kernel@vger.kernel.org, x86@kernel.org, Borislav Petkov , Dave Hansen , Ingo Molnar , Jonathan Corbet , Thomas Gleixner Subject: Re: [PATCH] x86: Start removing X86_X32_ABI User-Agent: K-9 Mail for Android In-Reply-To: References: <20260523093734.A3AR7reJ@linutronix.de> <87e8bd0e-ddb6-4972-a99a-c0fb80faf1ec@app.fastmail.com> Message-ID: <00915BD2-851E-4A3E-BEE3-CF628979D841@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On June 2, 2026 9:36:54 AM PDT, Arnd Bergmann wrote: >On Tue, Jun 2, 2026, at 18:02, Maciej W=2E Rozycki wrote: >> On Mon, 1 Jun 2026, Arnd Bergmann wrote: >> >>> I think the main reason to remove x32 support is all the special >>> cases we have for it where it is different from normal 'compat' >>> syscall and ioctl handling, which leaks all the way into file >>> systems and device drivers (sound/core/pcm_compat=2Ec, >>> fs/fuse/ioctl=2Ec, fs/read_write, =2E=2E=2E) as well as user space >>> trying to handle 64-bit time_t in a portable way=2E >> >> FWIW it's no different from n32 MIPS ABI support, which we've had for= =20 >> even longer and isn't going away anytime soon=2E So there's undoubtedl= y=20 >> some x86-specific stuff there, but generic support for an ILP32 ABI is= =20 >> there to stay both in the kernel and on the user side=2E > >For the parts I'm interested in, it's a huge difference: MIPS o32 >and n32 have essentially the same types and syscalls aside from the >few structures that describe the actual registers (pt_regs, sigcontext) >and the syscall numbers=2E > >On x32, there are custom integer types (__kernel_ulong_t, >__kernel_old_time_t, __kernel_ipc_pid_t, __kernel_uid_t, =2E=2E=2E) >and alignment rules that were intended to match the native x86-64 >types for simplicity but end up doing the opposite by requiring >compat ioctl handling to be aware of the difference and implement >a third case when the x32 version is different from both the >i386 and the x86-64 one=2E > >Even for the cases where x32 ends up using the same syscall >as x86-64 because of these type choices (e=2Eg=2E gettimeofday), >this still needs a special case in the kernel because all other >compat architectures have a shared compat version=2E > > Arnd Yes, and that was the original intent for x86-x32 as well, with the idea b= eing to let the various 32-bit APIs catch up at their own pace=2E=20 Linus vetoed that=2E