Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp979591imm; Wed, 10 Oct 2018 07:20:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Ipq+5u6orOY6ilB3IJRbE+ClNq8Nk0G0QWoah6vgCvbOMuLfCnz3beWNBnAGvQ2IibD7F X-Received: by 2002:a17:902:162:: with SMTP id 89-v6mr32792637plb.91.1539181214437; Wed, 10 Oct 2018 07:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539181214; cv=none; d=google.com; s=arc-20160816; b=oDDMhP2IPpmVud1VgeVtf/6eW8I7WBsy896GcwpEOmFqrmxQKdJyqNqJju68RU0968 5SA0SAcWOS6yho54b6UqHZSSJz7A3YUbD4Hq+1v4f0F7TDbsIFBYvpE/TKIRdKkYmnLD OhytO25P5S60BWgMsuXFTK0L2Vp9u4lDi8/lP0E2ase6sMMfbxK3N3HAdONCGCCx2dMm seI16Zf4MZWzU/ezAGbsDAR4wGh3a7JpTYkY9O3oVYF/NzIDH5HQiAzGG4ZObDIyvX/B tMcBi1cudP3VuJ50gGVUYqlmRTwKDRYwHKp1eUCyoa3yzgIQIz3JaTgl2RSmMaYIGZyz 87Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=o0T2TmV6crCtyVy6hBkmVctjbws1EKETNgH0JZEpJq8=; b=nxwBTXRPPC/p2dVAcjNAW7uiXrFAR/ZTe6bZ6EYVkN3dyB9V9xf9Uj/vStT3Rm9oEm OfsG1Di/9w9IQFRLxoHGK38avforpZVakCBhNakkgL3a2Z2UdiY202UIBQhd6sNZLClW S4VVKSynaytvl8FMvElebujPlZHVmECbwYmvUdtjRolJtfy5/XgheCCIgg2K6leseOZc ie462680JtTaS9TPSW76nR8xZR469ERCriZyEtWC1lsCZh+I0MSrSWFDPwS0x1S7FvG8 sxb3V9fqx2AkXPXY3R7U004kfs4LaVfuesy6RJWiDWyL/LQ3NELiLosRwtnitFMCWmDv Gxkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YyODl0fw; 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 v1-v6si18564712pfb.144.2018.10.10.07.19.59; Wed, 10 Oct 2018 07:20:14 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YyODl0fw; 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 S1727002AbeJJVk1 (ORCPT + 99 others); Wed, 10 Oct 2018 17:40:27 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:45595 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbeJJVk1 (ORCPT ); Wed, 10 Oct 2018 17:40:27 -0400 Received: by mail-qt1-f194.google.com with SMTP id e10-v6so5775430qtq.12; Wed, 10 Oct 2018 07:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=o0T2TmV6crCtyVy6hBkmVctjbws1EKETNgH0JZEpJq8=; b=YyODl0fwwIY1ceKhGqq8rGRi2g0o5SjRj6XWi3ONVggaPpZDvKdy/0ikDgyuyxbq8g NhpIQ4ajP9e+frJG4LZfZEpqPThuVfI2k0y6sCLWcdJpBLk/eQlbZiKEWKSP4FdOPaUo rX5FEwqVh/J4Lh6tXu39jgpQGieM/UaqYPcbOEmLGk1d2TGTACvPDjdmM72triY0wqgw obR0qFnUyScptYaTCEJ86WeC/ldQrtn/tWwCxkozBBfVLsAfGFF9O4O7rwt6Mw711xyc h+r4uYDC7uEHK4fp0OHNI6fyRogvcpDFzGjwTtUhti9K1aqKRVLEnNKJ/BSv5sjL+LqW eQkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=o0T2TmV6crCtyVy6hBkmVctjbws1EKETNgH0JZEpJq8=; b=t4uqS9Jd2M1+YKklkeqZyhQH3DCFl8P8WNQNrV7wfa6eX3vgcYmyIuYlsIDtdddeSY oJTX4rI4vjnh3+MT0W+GiG71vdKJhry/XxX/3+pLE29FH0dtkRjTD0DFzmdBDIYzkoUJ 5UwCcJKn/D0dP/f4YzpyfCo6mLDMhiOONUxDM4tGGshY1VDfeZT4iaShS2ISeyhVoLju eahp+XZuKia8JHfUUPOreoL1vYUi5VJe7fBqcXyJVOjui6BIbKCbwVJ/oyW22QZWlL1t qHyb/C0CwTzc2A9LN3JXquUQB0YtCYMihCr5XsohKNUEHPCvk896JL2FET+uWkntaDL6 6LCQ== X-Gm-Message-State: ABuFfohr9cfrpYnG0QbE72rYNTi7FKDCH7Et/VXnvGPGuQml3DmXiAn5 ryiFHsLEPif81TgtCboG8ECZ2ot9QD4fKqrz5+0= X-Received: by 2002:ac8:2bf0:: with SMTP id n45-v6mr28359765qtn.152.1539181083472; Wed, 10 Oct 2018 07:18:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ad4:524f:0:0:0:0:0 with HTTP; Wed, 10 Oct 2018 07:18:02 -0700 (PDT) In-Reply-To: <20181010141017.GA2881@asgard.redhat.com> References: <20180516081910.10067-1-ynorov@caviumnetworks.com> <20180724173957.GA22106@yury-thinkpad> <20181010141017.GA2881@asgard.redhat.com> From: Arnd Bergmann Date: Wed, 10 Oct 2018 16:18:02 +0200 X-Google-Sender-Auth: N9STCFFW8Mf7_bk3zldBY_o_r_8 Message-ID: Subject: Re: [PATCH v9 00/24] ILP32 for ARM64 To: Eugene Syromiatnikov Cc: Yury Norov , Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Adam Borowski , Alexander Graf , Alexey Klimov , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Christoph Muellner , Dave Martin , "David S . Miller" , Florian Weimer , Geert Uytterhoeven , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Lin Yongting , Manuel Montezelo , Mark Brown , Martin Schwidefsky , Maxim Kuvyrkov , Nathan_Lynch , Philipp Tomsich , Prasun Kapoor , Ramana Radhakrishnan , Steve Ellcey , Szabolcs Nagy , Pavel Machek , Palmer Dabbelt , Wookey Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/10/18, Eugene Syromiatnikov wrote: > On Tue, Jul 24, 2018 at 08:39:57PM +0300, Yury Norov wrote: >> Hi all, >> >> + Pavel Machek, Palmer Dabbelt, Wookey. >> >> On Wed, May 16, 2018 at 11:18:45AM +0300, 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. >> > >> > Based on kernel v4.16. Tested with LTP, glibc testsuite, trinity, >> > lmbench, >> > CPUSpec. > >> This is the update of the series based on 4.17 kernel >> https://github.com/norov/linux/tree/ilp32-4.17 > > Hello. > > I have some questions regarding AArch64 ILP32 implementation for which I > failed to find an answer myself: > * How ptrace() tracer is supposed to distinguish between ILP32 and LP64 > tracees? For MIPS N32 and x32 this is possible based on syscall > number, but for AArch64 ILP32 I do not see such a sign. There's also > ARM_ip is employed for signalling entering/exiting, I wonder whether > it's possible to employ it also for signalling tracee's personality. Don't know. > * What's the reasoning behind capping syscall arguments to 32 bit? x32 > and MIPS N32 do not have such a restriction (and do not need special > wrappers for syscalls that pass 64-bit values as a result, except > when they do, as it is the case for preadv2 on x32); moreover, that > would lead to insurmountable difficulties for AArch64 ILP32 tracers > that try to trace LP64 tracees, as it would be impossible to pass > 64-bit addresses to process_vm_{read,write} or ptrace PEEK/POKE. The idea is to keep the syscall entry points as similar as possible between arm (aarch32) emulation and aarch64-ilp32 mode when you have a kernel that supports both. Arnd