Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1696823imm; Wed, 16 May 2018 01:30:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrKi8Wwcu9x1ft+Ytowf+s9vijzCkQIpHsgpqJ9ND/jme0OvPJbzRJH7J3hYiIJySIvh0lf X-Received: by 2002:a65:5d0f:: with SMTP id e15-v6mr15516697pgr.119.1526459426549; Wed, 16 May 2018 01:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526459426; cv=none; d=google.com; s=arc-20160816; b=nlyzuWZwsLc2G7ElSSEKTPaJpXm7ZiaCY4xw/pgiDiY8dCfYoa9OspS4W0a3D6pvAk 9FFamB0JDse1gugzhVohJPtjlix4MtrESkN413nQ6J1ShiadDK8TTPzVUqZYXjCVFRj8 C7tEj5DxYO8Q49d9uRuLpiMnCnMEzAMkmGLKrwgOHVPdDfS3th4eWPeXOqfxT637s4N1 ZpKLtWZ08FwB3EfSZZ+nodYHq9OASpDpi0SIP8NZjBvuAiecNR4UjzfCF9i6GhbIb9cZ 0/vrnmk0OwIivkPNjaXgd5vy6Elm5pu5JRXIE4gnl0fXbvzc8hoHjqcCf0+sXxYe9qAa 0eZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=kZOgkSOIBPGJPLUPbvxw7kRDYeUeGFpYRIDmWhJ7Tj4=; b=Ty/yNqtbZdPfqaXoTC4JN2aOAXAKDXUOvDNmy/Bg/55Mgdi30h/NnRTxQYENitu/62 wT0Ytj7BA/uYrO7txXlnhmSUeuYphE8pWsva4ShBTeFrxDaxUAvsefDrdPfxThjWTUjN 3QddFG3PUZ5cbVbApk38naorUeex3N0lC6tvagO9T/KXTnYyzhIwwvvlvTCjmn7xo3/Z TtU31gamiVfyDkEO2/DI1l1jWBvl96ZrgBwRGSnL7DoQ4Gag3BIR4JWO2PsxzuIDghAZ 0M+q4y7DguzOsT+xinM1Y3eLw40IVYTLNkxkOLB27zE8jwO5YBlJpUDlcznVYFwfwui+ drkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=C/BrVnxA; 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 i12-v6si1977721plt.183.2018.05.16.01.30.12; Wed, 16 May 2018 01:30:26 -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=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=C/BrVnxA; 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 S1752882AbeEPIVK (ORCPT + 99 others); Wed, 16 May 2018 04:21:10 -0400 Received: from mail-cys01nam02on0081.outbound.protection.outlook.com ([104.47.37.81]:12349 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752245AbeEPIVC (ORCPT ); Wed, 16 May 2018 04:21:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kZOgkSOIBPGJPLUPbvxw7kRDYeUeGFpYRIDmWhJ7Tj4=; b=C/BrVnxASSG82m+l8AmoVfPrwvkwLOLviWnjbCbT/e/vvATr4JBCzNWeSynE7Jd0e7F1jpc53B0rRNKYk7uHHeOk8QoSrPnpq7OvdEkrKeJMRhGxePRkhFZfgeZ37ODGSVicAJ41DreLyzvny4cE8wxhkl79sZPK1BCB23Im1GU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (176.59.36.13) by BYAPR07MB4374.namprd07.prod.outlook.com (2603:10b6:a02:c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Wed, 16 May 2018 08:20:57 +0000 From: Yury Norov To: Catalin Marinas , Arnd Bergmann , 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 Cc: Yury Norov , 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 Subject: [PATCH 07/24] arm64: ilp32: add documentation on the ILP32 ABI for ARM64 Date: Wed, 16 May 2018 11:18:52 +0300 Message-Id: <20180516081910.10067-8-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516081910.10067-1-ynorov@caviumnetworks.com> References: <20180516081910.10067-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [176.59.36.13] X-ClientProxiedBy: VI1PR08CA0115.eurprd08.prod.outlook.com (2603:10a6:800:d4::17) To BYAPR07MB4374.namprd07.prod.outlook.com (2603:10b6:a02:c0::17) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BYAPR07MB4374; X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4374;3:fkrIjfvGcZKkBOen97Lcm140az6nuLuB6TUc4RNo6/xh6my7az2KK8NDrExAGNdK+N4A2CCjxfmxm+CYluvUZkXL/WKi5gQe4jhuA0IZxjZTI7IEfdTsVgHT/LOkZKCw1Q1DZGlrkIyArPU7VseO46bAILIdtkbzOb/aBQ3wy7/3TVAWWFz5T3urKyFZ+0cExOWnt/Mav/cxoKCyO9+HlRQQ5x5k1vKPisvtkqTjdU/u3n/s1zliXdpnefS31tPC;25:xgnbaVj2Emy2PFoiAk7hUy9J/bPBhIwIrWj15i4o0lOKinqkhXBGAvctApDhkJExy/rLOrUXRgSHq1RvNEbpRW6IREA36cZFoPj9oSbdTFa8QKAw6XGXWJYMfW3X77Hy15ItvieK5TUJ7REtpEePPM0GmNJx4mqC9wFnzZ2+EbeNTpBEv+vTvt49PCbAJTNoCG1rEl2hpkf239cpAlFVJEmS6AT7Ge5BoqRhYAYTfke9kc4TXOfjjIplVg3w5nZB7QP92KiJVQ7EvxozV6A5xmzMucazARQObTB8RdpXFHUfmeTmGnIAQqLNNPoU8WPDCSVO4qdfH7zMqbB7oZV+cA==;31:D4csiEOSpQSNjbmVMSIZm0J/nvl4z39uKdjt157U9Nf+MDHMNLg2u7fl6s/XZoqINZv0LXXxLXgPixaWKB8+Dr4ODO3E+mzGTuIWzu8jo6PqZ61+TNteOKKb7hzTvhGcMThSw4WahINkoyNkOcDflocN+b8/4kYPLTHd6Fp+C7y0UJSVlMmnPNeolE16t+gtswftOXcpRN+q/u/Nurq49h5q7jvQKYkDpI5MXisIhBQ= X-MS-TrafficTypeDiagnostic: BYAPR07MB4374: X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4374;20:EvZcgkK+C6j4vovft78OUlTFXkiq9bZmlBLt5XdbuIci8bphDjazMaoW5XakvYrffIU2x+gcx96til9JUy4Qt+r/qOwkXSmjI1qWVuV3F6+jk28iDza2FwUW1Ps7ZWQHn5eJa8vvc1vS+9Q5pPWlokQKgOmGbOW9cDNg1ptiVe6gpji6TrYnZHGhHriK0l04V2y6aBqrA/FRC0Km5ElNiiWDhbF37UZaOQkGu3VVeXpBgfG1i9zMBaVJbLRHy+FdpTOTC4HeUvFKWZSZzKmjKNTTfK8sgiCTgc9GTH1T+JosdPgZ+JQKVKZ1EzRkWvK17YMqKJgSZoTzIug6NLeZyO9MNFP9FTZyMj7C4toaaPHxKHoJbn7qa4F6HWX0CSK2hVVvc0YlrmWPweQOZ0p+ku9lNwhGLe9Q6zm0ZGO1aKYg4fHJYow4la4hxHbDcntA6qozaTixi9kFxwAH5aE0Gge5idcjNN+dz4vZjLlf56yoLhAYa4dL3NwymYN8+UB8QZOc7jEZkTU9rOiJwbuXwAtGmAXtOR+JQHGVgv78VZsR11xxeTsRG9LSEOE7lHn1yPQAiMxsmiyPd+LVNHb8fEiOB+6PH9OCeWKGRvT4cAg=;4:6p/0na0d6qFzUiq9NqjfcmJIceYrX0cNrflJ8e7ZJzDy8DYX2jqqp133rDxtENEdHJ4BUXrHFlUthpsHp7tguWmiVDxIZiDN3zr2PNeDaFi9qfpxtlYRQz4bHFixzSHmykyUSbQzYkSZoANDVqooXJztoyWtV9khk/Mt5G0t8qQ80Djj8tf4fzorVgDK/m61fY/XSsf5YjbRsBKJ8PKG/hVf1VxNnqDsVRpe77U4BIb/iel9SEZgKjgrxtpxMh+FQGD2GDiLIGc6yhIsZ8DWew== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(10201501046)(93006095)(3002001)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:BYAPR07MB4374;BCL:0;PCL:0;RULEID:;SRVR:BYAPR07MB4374; X-Forefront-PRVS: 0674DC6DD3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(376002)(366004)(346002)(396003)(39860400002)(39380400002)(199004)(189003)(25786009)(478600001)(68736007)(42882007)(16526019)(36756003)(305945005)(4326008)(386003)(81156014)(7406005)(7416002)(50226002)(6666003)(2906002)(81166006)(53936002)(8676002)(575784001)(5660300001)(39060400002)(8936002)(110136005)(3846002)(6116002)(6496006)(54906003)(51416003)(6486002)(52116002)(1076002)(47776003)(72206003)(7736002)(97736004)(66066001)(16586007)(486006)(186003)(2616005)(26005)(476003)(956004)(48376002)(446003)(11346002)(76176011)(105586002)(106356001)(50466002)(316002)(76506005);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB4374;H:localhost;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BYAPR07MB4374;23:mHsSiaSMMpecEk/lrCl70OdnYpJdnkpWCurLbrNWf?= =?us-ascii?Q?i6fFT0ICh7XCzmQrcaFGEvWlK3DY9UmvTrfdsboMwfR/nRPV8ZQprtIV6GGM?= =?us-ascii?Q?CgnQa+BhgSZrBeSjp70REFWLdb4cgsSun80AbnTfDhaBsSz38cgx7K97k3g3?= =?us-ascii?Q?Oe6YKMRQRg5uKPIltl1qxggjE6c76DV/7jlFRuAljp2RwEx2FQA3PzSh4/sL?= =?us-ascii?Q?ADnE5SNPz5u56yiQ3kzF09VGRHIU2GysatBEl5gQ0n3z4FWb0K+UT/wKErZq?= =?us-ascii?Q?Mm1p+ScQlIVN0L89O7sFAe+iyfTZo9EdjUnoVUkj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mNjLCyoU6W/SVmfyxTkwdiN/s4QqgFi9iGkORzkk=;24:sYm//1VdCxjX4WsLuVeo4e3Sc3rx6JEERnOfCHrsRCGU8kY5nK9tSaWsWlYaLzgm8T1943hg5V4Seoyj5Qo9pzmtbCXo0vEQ6TNheUEZH+4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4374;7:pH1eI/mHF6qW/kKO8d5RtHUMiwJBNQGjv6nL3y4xGIsuVyM1Vq5nkWEt9u0vLHMq5x+KvylwT322zAbeXDVze73oLz1NxG/QF4iW0X2UDu0MJTAipKptpNEPJnoAlfeiqi8SPhrBj8IjpK49GGjP/su2PFQfznduWaQzqeUn0JxKlcuN1jxGBPsrvqgoH8gZTZNVxNYHsak/BDgnOianTZMPNTqxenDFVIAo7kQV6SFzJiugRboGfIChA340srqJ X-MS-Office365-Filtering-Correlation-Id: 8ae0c413-6526-4513-676a-08d5bb05f39e X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2018 08:20:57.1768 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ae0c413-6526-4513-676a-08d5bb05f39e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4374 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov --- Documentation/arm64/ilp32.txt | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/arm64/ilp32.txt diff --git a/Documentation/arm64/ilp32.txt b/Documentation/arm64/ilp32.txt new file mode 100644 index 000000000000..d0fd5109c4b2 --- /dev/null +++ b/Documentation/arm64/ilp32.txt @@ -0,0 +1,45 @@ +ILP32 AARCH64 SYSCALL ABI +========================= + +This document describes the ILP32 syscall ABI and where it differs +from the generic compat linux syscall interface. + +AARCH64/ILP32 userspace can pass garbage in the top halve of w0-w7 registers +(syscall arguments). So top 32 bits are zeroed for them. + +Comparing to AARCH32, AARCH64/ILP32 has 64-bit length of following types: +ino_t is u64 type. +off_t is s64 type. +blkcnt_t is s64 type. +fsblkcnt_t is u64 type. +fsfilcnt_t is u64 type. +rlim_t is u64 type. + +AARCH64/ILP32 ABI uses standard syscall table which can be found at +include/uapi/asm-generic/unistd.h, with the exceptions listed below. + +Syscalls which pass 64-bit values are handled by the code shared from +AARCH32 and pass that value as a pair. Following syscalls are affected: +fadvise64_64() +fallocate() +ftruncate64() +pread64() +pwrite64() +readahead() +sync_file_range() +truncate64() + +ptrace() syscall is handled by compat version. + +shmat() syscall is handled by non-compat handler as aarch64/ilp32 has no +limitation on 4-pages alignment for shared memory. + +statfs() and fstatfs() take the size of struct statfs as an argument. +It is calculated differently in kernel and user spaces. So AARCH32 handlers +are taken to handle it. + +struct rt_sigframe is redefined and contains struct compat_siginfo, +as compat syscalls expect, and struct ilp32_ucontext, to handle +AARCH64 register set and 32-bit userspace register representation. + +elf_gregset_t is taken from lp64 to handle registers properly. -- 2.17.0