From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 00/24] ILP32 for ARM64
Date: Wed, 15 Apr 2015 11:01:54 +0100 [thread overview]
Message-ID: <20150415100153.GA11626@localhost> (raw)
In-Reply-To: <025BB233-8D14-457A-B3B2-C6BD6C3B32EF@theobroma-systems.com>
On Wed, Apr 15, 2015 at 11:18:06AM +0200, Dr. Philipp Tomsich wrote:
> On 15 Apr 2015, at 00:28, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tuesday 14 April 2015 16:00:34 Catalin Marinas wrote:
> >> On Tue, Apr 14, 2015 at 04:07:36PM +0200, Arnd Bergmann wrote:
> >>> For completeness, there is yet another option, which would be to use the
> >>> exact system call table from arm64 and do all the emulation in user space
> >>> rather than the kernel. This would however be the least compatible with
> >>> existing source code, so you probably don't want to do that.
> >>
> >> It would be great if this worked but I think we looked at it before and
> >> it seems nice until you hit the futex stuff and robust lists (I don't
> >> fully remember the details). Some of the structures (siginfo) would no
> >> longer be POSIX compliant and some of them aren't only accessed via libc
> >> to be able to create shadow copies.
> >
> > Well, that may or may not be acceptable. Aarch64-ilp32 mode is a hack to
> > enable a very special class of applications, it's not like anyone would
> > want to run a full system for this and need POSIX compliance.
>
> I strongly disagree on this: ILP32 is a first-class citizen of the ARMv8
> ecosystem as a ?data-model? for AArch64. Having a corresponding Linux
> syscall ABI is necessitated because not all data structures shared across
> the syscall-boundary are describted/defined in data-model agnostic types.
> ILP32 thus has the same importance as the LP64 ABI in ARMv8. It is thus
> neither a hack nor likely/expected to go away anytime soon.
That's the kind of feedback I've been trying to get from the software
ecosystem - whether AArch64-ILP32 is a temporary hack for legacy 32-bit
applications or a solid long term solution for those not needing 64-bit.
The benchmarks I've seen so far didn't show any significant improvement
of AArch64-ILP32 over LP64. The comparison with AArch32 may not be
entirely fair at the moment due to the maturity of AArch64-ILP32
toolchains but I don't think we'll see a big jump.
The messages I get are mixed, even from companies initially stating the
need for ILP32. So I can't make an informed decision but I think we
should go for the safer option: a first class citizen, long term ABI. It
costs more in (kernel) maintenance initially but if it happens to catch
on, it will cost us later. The alternative is not to bother with
AArch64-ILP32 at all, especially if it's going to be used only as a
marketing exercise for CPUs not supporting AArch32.
(if anyone has more feedback on commercial needs for ILP32, please let
us know, even if it is in private)
> We?ve run full systems (built from buildroot) consisting of ILP32 binaries
> only (ok? admittedly gdb was an exception, as we haven?t fixed the fact
> that someone has assumed sizeof(long) == 8 in some data-structure of
> the AArch64 backend there) in our verification runs. In fact, it will be very
> special classes of applications that will need a 64bit address-space.
If we are to merge AArch64-ILP32, I'd like to see a full software stack,
maybe a distro like Debian. Otherwise the kernel code will bit-rot (just
like it regularly happens with big endian).
> > We could definitely be pragmatic and do whatever helps get the job
> > done. That said, it diverges further from what legacy 32-bit applications
> > expect to see, so this approach will likely make an application port harder,
> > not easier.
>
> The key question at this point seems to be whether we want to support
> ?legacy 32-bit applications? (i.e. ones that make assumption that are
> not covered by the underlying type definitions or specifications) or whether
> we aim for ?well-formed 32-bit applications?.
>
> To stay with the 'struct timespec?-example, the difference between the
> former and the latter would (among others) be that the former might
> assume sizeof(long) == sizeof(time_t), whereas the latter is allowed to
> except that sizeof(long) == sizeof(ts.tv_nsec).
>
> I don?t believe in keeping compatibility for the former type of applications.
That was one of the initial reasons I heard for AArch64-ILP32. So more
mixed messages.
> Consequently, I don?t necessarily see the value in defining ILP32 for
> AArch64 with a 32bit time_t (even though it would be simpler at this
> moment), as I don?t see the benefit of adding a new ABI that propagates
> a well known problem (even if one could argue that there?s plenty of time
> to fix this by 2038).
We could look at this in a different way: time_t should be the same size
as any *new* 32-bit architecture supported by Linux. So if the kernel
community decides that from now on time_t is 64-bit across new 32 and
64-bit architecture ports (note new, not existing), we do the same with
ILP32. Otherwise, we stick to 32-bit time_t and wait to see how the 2038
problem is solved, possibly with extensions to POSIX and additional
syscalls.
--
Catalin
next prev parent reply other threads:[~2015-04-15 10:01 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 19:44 [PATCH v4 00/24] ILP32 for ARM64 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 01/24] arm64:ilp32: add documentation on the ILP32 ABI " Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 02/24] arm64: ensure the kernel is compiled for LP64 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 03/24] arm64: rename COMPAT to AARCH32_EL0 in Kconfig Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 04/24] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 05/24] arm64:ilp32: expose 'kernel_long' as 'long long' for ILP32 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 06/24] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 07/24] arm64:ilp32: share signal structures between ILP32 and LP64 ABIs Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 08/24] arm64:ilp32: use 64bit syscall-names for ILP32 when passing 64bit registers Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 09/24] arm64:ilp32: use non-compat syscall names for ILP32 as for LP64 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 10/24] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 11/24] arm64:ilp32: add is_ilp32_compat_{task, thread} and TIF_32BIT_AARCH64 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 12/24] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 13/24] arm64:ilp32: share HWCAP between LP64 and ILP32 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 14/24] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 15/24] arm64:ilp32: support core dump generation for ILP32 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 16/24] arm64: add support for starting ILP32 (ELFCLASS32) binaries Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 17/24] arm64:ilp32: add vdso-ilp32 and use for signal return Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 18/24] ptrace: Allow compat to use the native siginfo Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 19/24] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 20/24] arm64:ilp32: use compat-syscalls for msgsnd and msgrcv for ILP32 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 21/24] arm64:ilp32: use the native siginfo instead of the compat siginfo Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 22/24] arm64:ilp32: use compat for stack_t Philipp Tomsich
2015-05-05 0:03 ` Pinski, Andrew
2015-04-13 19:44 ` [PATCH v4 23/24] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32 Philipp Tomsich
2015-04-13 19:44 ` [PATCH v4 24/24] arm64:ilp32: add ARM64_ILP32 to Kconfig Philipp Tomsich
2015-04-13 21:01 ` [PATCH v4 00/24] ILP32 for ARM64 Arnd Bergmann
2015-04-13 22:58 ` Dr. Philipp Tomsich
2015-04-14 9:33 ` Dr. Philipp Tomsich
2015-04-14 10:08 ` Arnd Bergmann
2015-04-14 10:45 ` Pinski, Andrew
2015-04-14 11:14 ` Arnd Bergmann
2015-04-14 11:50 ` Dr. Philipp Tomsich
2015-04-14 14:07 ` Arnd Bergmann
2015-04-14 14:54 ` Dr. Philipp Tomsich
2015-04-15 12:25 ` Arnd Bergmann
2015-04-14 15:00 ` Catalin Marinas
2015-04-14 22:28 ` Arnd Bergmann
2015-04-15 9:18 ` Dr. Philipp Tomsich
2015-04-15 10:01 ` Catalin Marinas [this message]
2015-04-15 15:15 ` Arnd Bergmann
2015-04-15 15:38 ` Catalin Marinas
2015-04-15 17:01 ` Dr. Philipp Tomsich
2015-04-15 17:22 ` Catalin Marinas
2015-04-15 22:25 ` Alexander Graf
2015-04-16 11:03 ` Catalin Marinas
2015-04-16 11:19 ` Dr. Philipp Tomsich
2015-04-16 11:33 ` Pinski, Andrew
2015-04-16 13:31 ` Catalin Marinas
2015-04-16 15:21 ` Arnd Bergmann
2015-04-17 9:01 ` Catalin Marinas
2015-04-17 13:17 ` Arnd Bergmann
2015-04-17 14:06 ` Alexander Graf
2015-04-17 14:46 ` Catalin Marinas
2015-04-17 15:15 ` Dr. Philipp Tomsich
2015-04-18 19:24 ` Arnd Bergmann
2015-05-04 10:29 ` Arnd Bergmann
2015-05-04 10:32 ` Dr. Philipp Tomsich
2015-05-04 14:43 ` Arnd Bergmann
2015-05-05 13:11 ` Arnd Bergmann
2015-04-17 15:49 ` Arnd Bergmann
2015-04-20 15:56 ` Catalin Marinas
2015-04-20 17:40 ` Arnd Bergmann
2015-04-20 14:37 ` Zhangjian (Bamvor)
2015-04-16 14:27 ` Catalin Marinas
2015-04-14 11:51 ` Pinski, Andrew
2015-04-14 14:56 ` Catalin Marinas
2015-04-14 13:38 ` Catalin Marinas
2015-04-14 14:47 ` Catalin Marinas
2015-04-14 15:29 ` Dr. Philipp Tomsich
2015-04-14 16:55 ` Catalin Marinas
2015-04-15 10:31 ` Dr. Philipp Tomsich
2015-04-15 12:47 ` Arnd Bergmann
2015-04-15 12:42 ` Arnd Bergmann
2015-04-14 15:44 ` Arnd Bergmann
2015-04-15 11:22 ` Catalin Marinas
2015-04-15 11:50 ` Dr. Philipp Tomsich
2015-04-15 15:49 ` Catalin Marinas
2015-04-14 9:40 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150415100153.GA11626@localhost \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).