From patchwork Wed Aug 17 11:46:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9285675 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 6EDBB60459 for ; Wed, 17 Aug 2016 11:50:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 642AD27FB7 for ; Wed, 17 Aug 2016 11:50:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57C67280B0; Wed, 17 Aug 2016 11:50:23 +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=ham 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 EF70C27FB7 for ; Wed, 17 Aug 2016 11:50:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZzKD-0000Ra-Be; Wed, 17 Aug 2016 11:48:01 +0000 Received: from mail-dm3nam03on0045.outbound.protection.outlook.com ([104.47.41.45] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZzJp-0000IZ-HK for linux-arm-kernel@lists.infradead.org; Wed, 17 Aug 2016 11:47:39 +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=gT5gwauEwvr4QnouRgm8odH7UKhleQC1eqRPrmYF0PM=; b=qKLhmgJGwvchdMybMj69VSrVqreU8Pv4sfY+LSbOYv4oX4rg97tnegXpBkrOh5spRuA3Hw49BVDizuJjNTZg8oi5aA1YUr3gidSH7eGMl/J/G5cxxf5dYTwUpAJtXuLUMucs+19AhZ4Zoj7Vpp6h2iMaEqTEQzICIroOvbDbEXU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.121) by CY1PR07MB2248.namprd07.prod.outlook.com (10.164.112.150) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.549.15; Wed, 17 Aug 2016 11:47:13 +0000 From: Yury Norov To: , , , , , , Subject: [PATCH 02/18] arm64: ilp32: add documentation on the ILP32 ABI for ARM64 Date: Wed, 17 Aug 2016 14:46:27 +0300 Message-ID: <1471434403-25291-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471434403-25291-1-git-send-email-ynorov@caviumnetworks.com> References: <1471434403-25291-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: AM4PR02CA0031.eurprd02.prod.outlook.com (10.165.239.169) To CY1PR07MB2248.namprd07.prod.outlook.com (10.164.112.150) X-MS-Office365-Filtering-Correlation-Id: 7aa4374d-0f88-4ac9-4138-08d3c6943b28 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2248; 2:DXfekZ+tLAAms1w9SY/YLWJGPVi0Njzpnz5lok6XAu6eUtwjSNJ9dfBxJ5YwSSVii3g2uFh+zqc0ZxcudbC12JEglXs9mhw/89JxJqnhANcMUDQFAG8DKysQtKF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bCaD9S4mqUIcB/EIS5Lb7/pePSqWlw9zedIfFzAMHXALYugxVeuFM8rgxDfoQgOFcXCS+mmpDC5Ve6VCoA85gSSG5STVEvx4dgd/HgWNvM/ccTTeoiWzhYBoUvlmbBjHH3dIOS7WRGTyufDYsCanPfCcnXAZZwmjUzCAko0rD2JJWZ4mVkTSiUD7NUEVjOPeccXDrRpazwuUFR8iVaV/IaN5QRRUeb9o9ticS9x65OZW0omDmvFWa8KoEUcX+57kvFRt/103eUsqsAzDTF5h8VmtmFngjq7Xf+AOJWrHGFCTD3BuWxHF5s+zslLhkpWtOCLM+o8T21ZY98jaqa14kSoQnI+at6Jiefxu0sPmthzJqZxomEaOLqBc9rxOrIRKuch9f2aQtSxxjKl2mUnNOoEqk5TrtpKmdeg6CyQf/5NvbM/ZnyqWKSOJfnqOPx30ettAofXBmhVVZjZem5mpgOjs4oKJ0ZOSRBc/g4k2CrDXV2lTyHWEqHNITHab+2gfIOuBSY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:CY1PR07MB2248; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2248; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2248; 4:47kT3s7Lh3Xcc4q67/tEgujbYk23BQcN49gSk8zo6/RyuWIkYY2+XkBXBI7bdNCdjraL1DoLjf5yXPbAv3v1yf0YJbLEb8MPrtmBfkQca3KbvrVn5/gRzULspY5rRNh72xAzC9iCRy0Qo9kGzFG6r9XHlBn2qQI4zoRAVCgbZJm3JWFqwNZghhniimuzTMAfOSZ0WYLo1fPoxihE34M+uWNdynn0n50tV9s+sT/bZ9nQK7MD0tYyH2w5E8/jaXVJpjZI3zpDbqgduMSFjBATJGBrPtf/Xw5e9cIEZxue6G7yYLD30AJ5EqFlK3+f+xi7vQJNIXxZwodko9Dl5xqpXm3QyPPEsicayEN2pRSRsSjNCQD1Z0vzxToJ1S/i87tj X-Forefront-PRVS: 0037FD6480 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(97736004)(106356001)(92566002)(68736007)(76506005)(42186005)(2950100001)(2906002)(7416002)(4326007)(2201001)(105586002)(6116002)(5001770100001)(7846002)(48376002)(586003)(50226002)(50986999)(101416001)(47776003)(76176999)(5003940100001)(50466002)(36756003)(229853001)(305945005)(3846002)(66066001)(81166006)(19580395003)(7736002)(33646002)(19580405001)(77096005)(189998001)(8676002)(81156014)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2248; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; CY1PR07MB2248; 23:z6A5Lcg0ImKFNzrmK7xMDaYbnw9oP11ZqhDWvjwI3?= =?us-ascii?Q?CUbagsXXJd7ot4Ut8NeCZClZIJOdjLOdZJP3CJpOWPgf4dAd53iydqFm3EFP?= =?us-ascii?Q?pFT0YaF7tgU+KtMn8Oh60/7Aq5wZg+jLJiap+/olzDlPT6qWHdABwtUl8edZ?= =?us-ascii?Q?76z4+puHiv38KH3zPNtjkz33V8gRCOj5Q7m+TD89OXaMzHqOCG9yrj+RE0EI?= =?us-ascii?Q?2kHZA7wFxoKf7jCv8/3/fq7UqAKdYXuYkfkgrzOVtgcDF54s9otitRVQxl6n?= =?us-ascii?Q?9g/jkjmqEdVFTUqb203tT8dK37C7uEDCRtOmzAW+l1i1h380BTX0ujqw1TCi?= =?us-ascii?Q?77gkyBCG6xoA7ZI6OZJCzn9SbbEWT4E/TNvdNKBx9M9Puuvh/nXmmwPLxpbu?= =?us-ascii?Q?COjpb/cLMyr2O0ZdrWaBxzgt+gt9HqY0IUEpGxbHBz+6sgZsTnoscC9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ESLuy6TjJNdXeu+1b1gSlJiHuGNF0mlUXWQLZ70kZ2Rus+IQT4A6Gvg4IlPbJ9N5QjxrcYG3s8UM3KmN2hNMNK9ah5bpMbfmST3LqKOmqXcNUWs3JQAJjq7zapaS2iKLoB0o=; 5:IhL5W+HGByg2RnzRQqGpv03fEDY1+DnYxFR8zMVH7XsEslT2NTmUm+hl1MEhAl6VDkY92+XPhxScJe7aiB03L7VitxIHTnFAHuWR2V+IyJmYTnyKCElnc8XUu3zWgEJEG3b62/zgPxe+DNeaKL3Ilg==; 24:TBmaNlFzlkKIPYq0VsLJj061A34ctMzYyP8tn3HWFSEkdF48TFItOZCsfYlqP0p0qBMDalOTDSJHLqBlCQEtMgh0HH9jKna7WlorCqvbm4U=; 7:CLMltCc+rHzzM7i7V4ku1e98ZCWw2QZgQgPKVQWn8IGZCOGjixT/CK5ScEP70ND5eiw4cVJtsKPY+EXuxrebYDAj6LoPtLsGiZu1sJ17mlTIHQNFY2trAbgUnq+Xczd1whPEt1EOL1ohrTk7OobVzuRowWbEa6YlL0ERqlsGdbPRE+CsrhiqKgXKh9N8tGwKHS3//92dJ/4pBadG8xtInbzcVilgr7NfugOlEAieKvwcP/Ton7Wa6145vCnA4DJC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2016 11:47:13.5351 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2248 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160817_044737_833202_56B58F0E X-CRM114-Status: UNSURE ( 9.46 ) 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: szabolcs.nagy@arm.com, heiko.carstens@de.ibm.com, cmetcalf@ezchip.com, ynorov@caviumnetworks.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, zhouchengming1@huawei.com, Prasun.Kapoor@caviumnetworks.com, agraf@suse.de, geert@linux-m68k.org, kilobyte@angband.pl, manuel.montezelo@gmail.com, pinskia@gmail.com, linyongting@huawei.com, klimov.linux@gmail.com, broonie@kernel.org, bamvor.zhangjian@huawei.com, maxim.kuvyrkov@linaro.org, Nathan_Lynch@mentor.com, 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 | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 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..d575ef9 --- /dev/null +++ b/Documentation/arm64/ilp32.txt @@ -0,0 +1,57 @@ +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. +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 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, rlimit +structures are now routed to native handlers directly, as aarch64/ilp32 +defines userspace ino_t, off_t, blkcnt_t, fsblkcnt_t, fsfilcnt_t rlim_t +types as 64-bit and it makes that structures have same layout as lp64. +Next syscalls are affected: +fstatat64() +fstat64() +statfs64() +fstatfs64() +setrlimit() +getrlimit() + +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.