Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1782166imm; Thu, 18 Oct 2018 04:15:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV61oqgT9YYqtxg3Hz0mm9C91Ea3Ef4lpy6Ixrbct+C8GX2QFec9JvhmLwPAtq6ipFfHUzT1u X-Received: by 2002:a17:902:4103:: with SMTP id e3-v6mr29425437pld.236.1539861328595; Thu, 18 Oct 2018 04:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539861328; cv=none; d=google.com; s=arc-20160816; b=ds8/DLnsQtUTckq8u8bHeFBSpiiEhfUCZwdFY++xJQYm+YWb94S7D1xMPre+WlYPUi +gfAxYy9QTaAI2glHyEJ2Gjaw67AE5bgObKnXQ26HQ1VlQ2RB3nnQekWA3FD1qBPRx+h P2GBoANKyTB4FbAEC2UawrtxOoKgA6LNoJvZS4bqY5IiGURdsc+0XiXm2sV1b2LrSD31 aG0WznHfrGhr7f+mgeT3gAZ4iEvCZEUBxfpyeeB3Vi+pmQ/AKx0xUrY3ZDX1ybf/9icA LtFp9abKL3hX0NqYfQ2IEvTNpwTzxBqk4P6yvt5rYw5tgmFRiFFMFEgezkAf6bjArg7N DInw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nHH0GPylJZjHU/ulkiZeT3FVgc9a61IB5OyaHNsB0dM=; b=Fox8hqpZR4BYfaW3IaXRNJP5+hiRJj4s39IxQeNzeKHQok3VKk167GjTlclSR31RL4 7U+6uK5zDrr+WnZ6UGhkdEfN+5il/t4HWXdd0NHm9GIMXa2y2eReQVJpFZ9vRCVbJYyl Abunk9CKiWQ3yEmImcPrp4SaE18LEOVV6Y9UWSSTmewDIgiV1KhsvMJRvZYjgFfGFkw+ fVT6rGJRhqIrb0VR7b8n3L9cbaPJnFqdU6XHNfQ81oPTaZg+vGrZXCO//SMxW7KMOThZ aORKVyA5AEtEMHbbuYXtvSpxlA1obv69Gnxbp1I11fAGmo4RIhlWRueWstZ2gthfmMpN SjJw== 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 s11-v6si21034776pgf.427.2018.10.18.04.15.12; Thu, 18 Oct 2018 04:15:28 -0700 (PDT) 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 S1728222AbeJRTPR (ORCPT + 99 others); Thu, 18 Oct 2018 15:15:17 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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