From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 957B17D982 for ; Thu, 18 Oct 2018 11:15:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728207AbeJRTPQ (ORCPT ); Thu, 18 Oct 2018 15:15:16 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728171AbeJRTPP (ORCPT ); Thu, 18 Oct 2018 15:15:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 74137A78; Thu, 18 Oct 2018 04:14:44 -0700 (PDT) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.80]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1213B3F5D3; Thu, 18 Oct 2018 04:14:38 -0700 (PDT) Date: Thu, 18 Oct 2018 12:14:36 +0100 From: Catalin Marinas To: Arnd Bergmann Cc: Andy Lutomirski , "open list:DOCUMENTATION" , Szabolcs Nagy , Heiko Carstens , Yury Norov , Philipp Tomsich , Joseph Myers , linux-arch , Steve Ellcey , Prasun Kapoor , Andreas Schwab , Alexander Graf , Geert Uytterhoeven , Bamvor Zhangjian , Dave Martin , Adam Borowski , "Manuel A. Fernandez Montecelo" , James Hogan , Chris Metcalf , Andrew Pinski , Lin Yongting , Alexey Klimov , Mark Brown , Linux ARM , Maxim Kuvyrkov , Florian Weimer , Linux API , Nathan Lynch , Linux Kernel Mailing List , James Morse , Ramana Radhakrishnan , Martin Schwidefsky , David Miller , Christoph Muellner Subject: Re: [PATCH v9 00/24] ILP32 for ARM64 Message-ID: <20181018111435.GA237391@arrakis.emea.arm.com> References: <20180516081910.10067-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Sun, Oct 14, 2018 at 09:49:01PM +0200, Arnd Bergmann wrote: > On Sat, Oct 13, 2018 at 9:36 PM Andy Lutomirski wrote: > > > > On Wed, May 16, 2018 at 1:19 AM Yury Norov wrote: > > > > > > This series enables AARCH64 with ILP32 mode. > > > > > > As supporting work, it introduces ARCH_32BIT_OFF_T configuration > > > option that is enabled for existing 32-bit architectures but disabled > > > for new arches (so 64-bit off_t userspace type is used by new userspace). > > > Also it deprecates getrlimit and setrlimit syscalls prior to prlimit64. > > > > Second, ILP32 user code is highly unlikely > > to end up with the same struct layout as ILP64 code. The latter seems > > like it should be solved entirely in userspace by adding a way to > > annotate a structure as being a kernel ABI structure and getting the > > toolchain to lay it out as if it were ILP64 even though the target is > > ILP32. > > The syscall ABI could be almost completely abstracted in glibc, the > main issue is ioctl and a couple of related interfaces that pass data > structures (read() on /dev/input/*, mmap on /dev/snd/* > or raw sockets, fcntl). There is another case on struct siginfo which has some pointers and it wouldn't look like an LP64 structure at all (and glibc doesn't normally intercept the sighandler call to rewrite the structure). We could add padding around void * members as the kernel zeros them, I don't recall the kernel reading these pointers from user. Anyway, using something that resembles compat_siginfo looked the simplest for ILP32. -- Catalin