From patchwork Fri Jun 17 23:54:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9185195 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F10F5601C0 for ; Fri, 17 Jun 2016 23:57:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBB71208C2 for ; Fri, 17 Jun 2016 23:57:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD779280B0; Fri, 17 Jun 2016 23:57:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84379208C2 for ; Fri, 17 Jun 2016 23:57:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bE3bu-0001jT-8T; Fri, 17 Jun 2016 23:55:38 +0000 Received: from mail-bn1bon0084.outbound.protection.outlook.com ([157.56.111.84] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bE3bT-0000HS-3N for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2016 23:55:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bsQhOwVO2CVADi6ty6IUZ452rAnmud9xhI/IGVm3zp0=; b=gJmOO3vPYAZaeA+lPiuQ07HkSoOW7Zm1ExM2iWq8YqpquPySWsFOnTB6IrKHkHtMgVcZK71ENX6WZ3NE4LzcmcV8hLAOABZKxvrxuNBApWUFjjHtgo+8gF9wDdKB8o3EZlhVML6H/ki4butucokjgSLDkz/cpblkDsNtHNmOHrc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (50.233.148.158) by DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) with Microsoft SMTP Server (TLS) id 15.1.523.12; Fri, 17 Jun 2016 23:54:48 +0000 From: Yury Norov To: , , , , , , Subject: [PATCH 03/19] arm64: ilp32: add documentation on the ILP32 ABI for ARM64 Date: Sat, 18 Jun 2016 02:54:12 +0300 Message-ID: <1466207668-10549-4-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466207668-10549-1-git-send-email-ynorov@caviumnetworks.com> References: <1466207668-10549-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: CY1PR15CA0027.namprd15.prod.outlook.com (10.163.14.37) To DM3PR07MB2249.namprd07.prod.outlook.com (10.164.33.147) X-MS-Office365-Filtering-Correlation-Id: 4aa2602d-aea3-48a3-b512-08d3970ac40f X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 2:CsmWEIMVTqSZwUB1ppb3NYpIHztzvG3706QMWQeOYjdXm5Zj452fg+iOhPJdCTzCZD7S1NUGrpAPQrm3wlCdOoesIdRs4h4GuDWA2Jgle/yKjfEpac2cOReCVVdHDMqUs/37x9E0Du7dhEtkkohjOcWQI6zl3Y+ttirOYPk6kKl0aKbLRFNK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ywKkxAf9o/XLiabgU6dLphAfokVezXyqOQt5oswTLBwYLPh9sTTVIsmUcbWAO1xh9MPUyXILjsfAFPs0nxDD8U3uFFcTxTzXybNvXtqHI20ZZjvEGrB2KEqiRtnszj3pYcXoF3nJU3Cvw5NoTHYIrvsPQwCgOIZfriJTNQdYvCAJetpaJ1H2kiUdjNB2eHsH+KrXVtXRVQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:DM3PR07MB2249; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2249; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2249; 4:uTU+UhwaweqAQ9G/5m3PeKVr1Gv46Hwt0PaVtXCzjqk5TRvNL89AhsjdP0Wbh2GenfuG2ZGsOkV2Y+ag6XH10m2r9boTIqmHgaBpYiwcR/3s+LO3vJnJZkK4r8W+qqFv+ALh6i4le0UZzZxFgC1H2Q6SuIzjjnKmRt3cOJbOV77nETztUKg2c9YbXeM43KHaCdonps1xoCwV+irGsFAUB/ubPujViOv+++3RIJtA/OXd4cyP1aox8xvqxmIBJZQiBTDi9MuP8+X3smvUSF88lUuU7WahCWv68AHZcHjCmY5i+X0PbEt8H4tIT40zsqzuW+s3LvOUy9huvBo5GOjWXLEgfNGNnoiIZolBO6ffJunMxQd4OQAk66OAWYmv09oH X-Forefront-PRVS: 09760A0505 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(76176999)(50986999)(3846002)(6116002)(66066001)(586003)(47776003)(97736004)(105586002)(5001770100001)(50226002)(189998001)(2201001)(2950100001)(229853001)(81166006)(77096005)(81156014)(8676002)(106356001)(68736007)(42186005)(36756003)(2906002)(76506005)(19580395003)(4326007)(19580405001)(101416001)(50466002)(48376002)(7846002)(92566002)(5004730100002)(5003940100001)(33646002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2249; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR07MB2249; 23:Y86hY4np3tLBUs/zhylVLwQw+JKVx9pdLSMap30AI?= =?us-ascii?Q?myeWvD0d1x0NNK5cHlQ9vbD+uBCnJw9vnhsACqirU24QfKGjO88TjwIpItPe?= =?us-ascii?Q?O0RYe7fr3P3uBYtC88vjeL+MLmSd+E4xBmwmISyaMR3xoe+vzltILLON8LEG?= =?us-ascii?Q?OSUTN7vAsz7JqoRTpw72cijaGX5cwGwpMcDbKRom0SPZXKAA02EzYl5HRK97?= =?us-ascii?Q?aWIG7jOd6I/xnXti9li4nAT2vsn7Ith0GwAThFHDtRVBK1d+Dvyle3CD5bY4?= =?us-ascii?Q?hS5Jg7o0oy47SNy3LifSm77xjdEorQWlJ4nGedePQo/jbSZ2TBFAmQSCDWOQ?= =?us-ascii?Q?0leVyt8uBt0dcnUvhCjFth6qVKzfkJeo5ZF1a1um/F7fXuc3IKvYs57OZJZO?= =?us-ascii?Q?57hn4hPaornmtccmLQ3VzLuXIkUxTdH6JJcbB/hBtczaK9aZIG5od+Fh88BZ?= =?us-ascii?Q?zJfxrJULrZks7/qBNs5u3/gY1dNpFv+rF6qSnZBVaCH2etksYjn/5XsnPt7k?= =?us-ascii?Q?Qb5pd/GQa664LjD2jLexo3MhOGUzMWiqDXls7P2z7QGydzNXCtCHAUl7kZeu?= =?us-ascii?Q?rFokjy3/V7XQxhG4LdIPCISTa2GHmuknWme+60sEZsdfnYd3n5v+PHHE1op6?= =?us-ascii?Q?VjEgf3yTnEBZBNGtC4Nqd/P8oqqBc9NAk8Wr390yW2bd0zterE/UhONvck38?= =?us-ascii?Q?U9Ddcy7zc/QE+iEPg8h5A7VYETRslJlKLHmmj4KE8F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MZ7tR6SkZg=; 7:PQPkq5LRSv/OcbKnSAyUWWzHFRpr/v6ucn8xwzUOGu9lMew+JC8VnXbEq3W1MQSFmnUMWxPgItatQYJK5sj2Krb6F3pTfCJ5fl+T1FDDybb8iEwLsAcVJ1N6Pa5UBOfyRTgNxPX3Ix2DfeQaNk71KpWK4i84t7JgEG8D1ZcYb5tNzOZGQvx2yODb8VLNLQ9t/iIrrSzT6psDwX3lN5+Diyzw61go1xsIMBiBWDvsr5zwTWOtE6KKBI8tHLVB4vAk SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2016 23:54:48.2581 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2249 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160617_165511_363951_AC7D2F1F X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kilobyte@angband.pl, manuel.montezelo@gmail.com, pinskia@gmail.com, szabolcs.nagy@arm.com, Nathan_Lynch@mentor.com, heiko.carstens@de.ibm.com, agraf@suse.de, geert@linux-m68k.org, Prasun.Kapoor@caviumnetworks.com, klimov.linux@gmail.com, broonie@kernel.org, ynorov@caviumnetworks.com, maxim.kuvyrkov@linaro.org, schwidefsky@de.ibm.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, linyongting@huawei.com, davem@davemloft.net, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov --- Documentation/arm64/ilp32.txt | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 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 0000000..d5faa31 --- /dev/null +++ b/Documentation/arm64/ilp32.txt @@ -0,0 +1,54 @@ +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 potentially access top halves of registers that +are passed as syscall arguments, so such registers (w0-w7) are deloused. + +AARCH64/ILP32 provides next types turned to 64-bit (comparing to AARCH32): +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. + +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 64bit values are handled by the code shared from +AARCH32 and pass that value as a pair. Next syscalls are affected: +fadvise64_64() +fallocate() +ftruncate64() +pread64 () +pwrite64() +readahead() +sync_file_range() +truncate64() +sys_mmap() + +ptrace() syscall is handled by compat version. + +fcntl64() syscall is handled by non-compat handler as struct flock for ilp32 +is the same as for lp64 + +shmat() syscall is handled by non-compat handler as aarch64/ilp32 has no +limitation on 4-pages alignement for shared memory. + +Syscalls which take a pointer to stat, stat64, statfs, statfs64 +structures are now routed to native handlers directly, as aarch64/ilp32 +defines userspace ino_t, off_t, blkcnt_t, fsblkcnt_t, fsfilcnt_t types +as 64-bit and it makes that structures have same layout as lp64. +Next syscalls are affected: +fstatat64() +fstat64() +statfs64() +fstatfs64() + +struct rt_sigframe is redefined and contains struct compat_siginfo, +as compat syscalls expects, and struct ilp32_sigframe, to handle +AARCH64 register set and 32-bit userspace register representation.h + +elf_gregset_t is taken from lp64 to handle registers properly.