From patchwork Wed Mar 1 19:19:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9598999 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 883AF60429 for ; Wed, 1 Mar 2017 19:21:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7129128558 for ; Wed, 1 Mar 2017 19:21:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6567A28563; Wed, 1 Mar 2017 19:21:57 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DCD4C28558 for ; Wed, 1 Mar 2017 19:21:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D0giv3RNAlMspYNlr5gkhp8d6i077qPUYWPgkRR8YL0=; b=B+gQJDsoEOLoR/ h4kP7w/ylIv8epAivmIzUHAPnP77D3idqTxYakUpcbHocfkF0zntHpLDEkpgK4iIh8+fdyup6Q7P+ +OnkMzy8zPBHiJqR2Y+mK3FFnxoTC/XUEFP6FD06OVMh5ngsd/eRiTFgtrPi76PfWnKyD4cfvmUZJ KlaLQOpnvNv+6SOqe/CdlGuysEIte7wAzIIqTl8/uWW1RntVxkCtXK1CPP3rIED8ljf2HdMStZhuA okYtTb3fy2SB9FYi+5FEOfcZmJNHcRnx7MC0v2dgCJtRAptjCzYdgyKCZnaTGZC7h4NY7+NyiApVb yzZ0SW4iM4PxhnXHp5dA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cj9oy-00022O-7e; Wed, 01 Mar 2017 19:21:56 +0000 Received: from mail-sn1nam02on0062.outbound.protection.outlook.com ([104.47.36.62] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cj9nv-0000L8-HZ for linux-arm-kernel@lists.infradead.org; Wed, 01 Mar 2017 19:20:55 +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=zwGTS0MN7zngzmuxfrn5ZPOr1gCd2XFmvRIjvKjJQqg=; b=KlK1RRO/IE1lMRyjQueNMIsTh0m4aXpGG6GeeovOYZZUG84ccMyB2MuJh22cDSOJzR6X5SmfPPomYpIt8X2DKJeadiRVXHuiyn+OBz++nvBXxGiKKWgoypGDYT9F+pfQ5r5M4OXgF353kVwytq9BDWJRqeNBl1YKsOabzlqbgd0= Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none; lists.infradead.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (27.97.135.110) by CY1PR07MB2247.namprd07.prod.outlook.com (10.164.112.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Wed, 1 Mar 2017 19:20:28 +0000 From: Yury Norov To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Arnd Bergmann , Catalin Marinas Subject: [PATCH 04/20] arm64: ilp32: add documentation on the ILP32 ABI for ARM64 Date: Thu, 2 Mar 2017 00:49:12 +0530 Message-Id: <1488395968-14313-5-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> References: <1488395968-14313-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [27.97.135.110] X-ClientProxiedBy: AM4PR0701CA0031.eurprd07.prod.outlook.com (10.165.102.41) To CY1PR07MB2247.namprd07.prod.outlook.com (10.164.112.149) X-MS-Office365-Filtering-Correlation-Id: a0ad8f82-71eb-4f29-4f67-08d460d805e8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR07MB2247; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2247; 3:CLseu6ibl8FHOKIAaZ0UfxXgNupxX4huEgfOC9gpjhN3pR6gj7Mr0oKP+kd6MF2ZGxf8tOSNmGI1MSFWMa0iWE3LWtQ43o9ub9lMQY5Eszy/65+M30dnFTgLfiW8k7n5VT5ArKwaqan2kJm4USHdb2cABAdXBgGZ7C6vsFgQ3uqXgpKR1Csq/+3X8GvibnAmC1tn0/WH/TnyEQzqz6/XfIGWCOigkwMQIjprFtTAYqFa43BEV9Q15Wl3rFmGXMmnfTp3mhio7JEnPjj0cLzPQQ==; 25:JPYn1vF2sTNc/GILrtf7nV2U1kESwymIxTYAprMbcvyKMMbNrkSmHvlTqzUobCynEhXzHKW70ofPkPwCykZaQIb4XbVHvPNbXIXQdj3Wa8UklkxrtBXal2T6VVo2iQJ8i3qWkJXRrdAs+ECGT840+MbeXIzQ2v7O6Fg3Ex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mzHUt9W0eDTAxK5SPyjHffQZPTV1wcnwz/yMRRHIRQseu79kIhYpOSQzNtnIXzm9UFCmAUaCULa/W9KGAlzLKJzlVojETtoUhwQJmNEQoZoz5LeQYN3+v41z2g= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558025)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(6072148); SRVR:CY1PR07MB2247; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2247; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2247; 4:um7UdqNncDElTL2H7aYnXmiYCYTZ3KilO9SZKFHwqrUYq0DPQaHdMEeI6b9RwwQJbxAErj/luqIqfIeWON8KF4HCzTEtImgqT4PkzvqM+MHCSrRZLFoXK5NyRdR14H9wCoCzQOdX/tT2HTjoSqGsmjWxYHNFx4UB7zgJ/fzT+zYoq46EVIj4G3Brog6NsvEig1oJiiF/hJWKSKFUlrfrYTO+JNfIskWnpUgf8TNeX3vDM+l11jsycywkJkYDVvujAW5h5oJlb56vHD0THS0q7r2VP1uqzHiodqGBlVwohI6nSJlR9GuZkHgVGTrDWQ+z4D0mPj2mIRWaz6a6cPO1OhWI+/YzTjPEmTk6QnvhE0/FgQSjBCUgOGPA3zxFf14k8GZ78prBQyaWpcN8MncZDtrYJC9fSRZsWwq0SZNd14uSYPvciLs1jjKgV5TNSbWYQwJQyQrvVdvySSdyFlrVg1OKFyOXq263jlnB0k3YIZxBOKljf/MbezKfDEHxnxHPuAZtsARKd1TW3xtIizEajvyPD6lMrvux3Fcj3fomWoYyppP9JXePl9xwzPJuDBYulcwHnPc0ZcBzjjhoPBDeOx5jB2+ILUIgz96EektRwu0= X-Forefront-PRVS: 0233768B38 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(5009440100003)(3846002)(2950100002)(53936002)(92566002)(81166006)(25786008)(33646002)(50226002)(8676002)(4326008)(50466002)(48376002)(54906002)(7736002)(6486002)(305945005)(6666003)(5003940100001)(7416002)(5660300001)(2906002)(6116002)(76176999)(50986999)(6496005)(38730400002)(36756003)(66066001)(42186005)(76506005)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2247; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2247; 23:LSg3R58W4v4r5gaHKDgIzSZ2Muva7K7cSNbuSOfCzOBRnNlrhZT0mObTRqACd0j1gaZKKYSXu4CgVn1JDV1UbOxp5aJ5xzpSw78rKtMfVRjmz6NRgguDpQislsLy2HTkXS/KNoZ/g9Lwzbo+dMcXaYKnqdfSJ6oUQvNBO+h9DFeLmh1XAHMTmhDnRGOMa+6x+FQbF8AhMjxHMy0p59f0YnFAR7V+uEA9IMFe8CD3co8y8RM9W1FWERkjQ9va81Y+3ZnyQYSzJuFeqwSgDdAf0VIPuMih/BXIUKM/bHUhD4EaHYgB2dun8TEwLQCzlaR/FH88MuJvItLxx8lCfvfdc1kKlBlXu+5HRgpFdNszSX/aW/1lnshyLYL15XmkKk1+BOk/jR3AckeVF0DgXUET2cq5Cyrrdb/Em4hVwUa8UEVkpujwP5230Eiei9ICQpRAxQAwAMCPRWwPeXq9dBXqXT9VMuVorGYS71l42R2nDD6qRGUsqgqLifqWf8IL7gcntDaIEMEbj+a/a06TDCZrPMhS3KLYzrxatfzpbiVDyVwsXRyfKDhzFQhW5duCBbkR+G7wrDSL7kLEysvg1kPTKc1p+bCCOk2+WYzIDln0c7YJy811tzIx8/I2EbOqW2GWE480FROlVwpzzqBEEHPtlO6+QvDHlUC7skWYhP32fLJyZI0GVRnXCqlTP2EacJ1y+AZgNZD/7WJ0bj7zirSUqUmGCqBCREbxfQrQU+RXc/LTsngZypqoXSyGjzltdXiFdSqg8trUFggFFzWMj5sA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5XEju7wLwgQpnGHAtLt8fcgaEsRdfV3q069xUai8LTtpPBSOY9I1ntgh9gIH4jQ+EBw7RQZFcnzRezI1wE0mSB6/POj9SfnrmCbBep5g2sQqWq+X6GIn+IdulSDVMSPBqW6+mo7LXm8UcLa6ZyUYTzrJp/qQlkvrnN4VgqPEmqJjjtbLHnu6E0gE3jub9doG6MwjaqxgLZrbwV/1BPv6jTSkdWk6cHP1ymbZ4SRAXty3iAFK1qSdTzFW6Uwcpuc1SQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 19:20:28.6114 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2247 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170301_112052_277502_710EFC37 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Pinski , Heiko Carstens , Chris Metcalf , Yury Norov , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , agraf@suse.de, szabolcs.nagy@arm.com, geert@linux-m68k.org, Adam Borowski , manuel.montezelo@gmail.com, Chris Metcalf , Andrew Pinski , linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, Bamvor Zhangjian , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, Ramana Radhakrishnan , schwidefsky@de.ibm.com, davem@davemloft.net, 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 | 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 0000000..08935a3 --- /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. Next 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 alignement 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 expects, and struct ilp32_sigframe, to handle +AARCH64 register set and 32-bit userspace register representation. + +elf_gregset_t is taken from lp64 to handle registers properly.