Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934149AbcJUUsM (ORCPT ); Fri, 21 Oct 2016 16:48:12 -0400 Received: from mail-bn3nam01on0058.outbound.protection.outlook.com ([104.47.33.58]:59558 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932542AbcJUUsJ (ORCPT ); Fri, 21 Oct 2016 16:48:09 -0400 X-Greylist: delayed 867 seconds by postgrey-1.27 at vger.kernel.org; Fri, 21 Oct 2016 16:48:09 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , , , CC: , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH 02/18] arm64: ilp32: add documentation on the ILP32 ABI for ARM64 Date: Fri, 21 Oct 2016 23:33:01 +0300 Message-ID: <1477081997-4770-3-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> References: <1477081997-4770-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: HE1PR02CA0075.eurprd02.prod.outlook.com (10.163.170.43) To DM3PR07MB2250.namprd07.prod.outlook.com (10.164.33.148) X-MS-Office365-Filtering-Correlation-Id: 417e9f48-551e-458d-3f48-08d3f9f1913e X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2250;2:2P1GF8HoA8l4NKAg/xy9dhbEqM6ojcIKaeToHKADPezxPyZtpX2P3UUs302XrGi8mvBu1hsTQhdYmrHcJH7tN/hcktMEv1wlifDdSrUgC/akKzw12WXT0xAul3Na6uwMs6wp+jXAj7bBmcum0GjkvJTvuB5z2sVV4MzFBG++vanTfw9psLIQErVYVjRvxQNAm+hIyjQChEc6Y0jwMcQz9g==;3:3TvzTFf2z3i23pA84hDd16/vje8WaxHwRaaR4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2AJKEenX6gc4752Yw0uDS1k7JOV6DXnf+S8hcIwfntLkXqX6lZuMD835Po4RvVdIeL8UaBgu5FGfBJAvwi195992ytRaT3Gi9ouFDx/nsC7R3vs6klQrcLqGVtndbismJ2yeYJufkzERQ3tnfC65Jjffz0EZj5LSU447G3x0RRjOZa1Fky+9TxUJopIFCe2JxkoLt0y9Oi8/JOPCfjdikFfNvJQsunDFJpj43VDE0Xc88w==;20:Tqu2ORSUlWTOBlZ1EF4gAIlGhIXKUyHrhQOph8QJ5BiH4GGkZkf8DFEGweuiTswv7JVkvvGWmutzyl+qu/18S9baKzTy1jTd6nmJ37CfETh91PhdG1o+DvoVTtXrQv/21wUpxfQG8o8DGzPl8eapiEoO0EUxU0EVRM6RJImUIjCsS8LT0kfG1fg9mjc5YH31NfTDPCM+57Y35g6GgEW+ml4MnwWIjhDXdYl6HorAEpTg3lfI6gMY1aUHea8f2PTuPg6vC/C6f0ZZY/L/kOVzwzGDDH9QUXC+y7UMM4BmQM7yKTVecv+qzulr+SviT5NwC+UREA4zNSO1vCRqSGY2qXYrA0qE1utH57ShW3+lx64+l4ECKonN0EFhxUCyg3XJikC/5onW0kVJFlC3RrRoCTu5AxlBdI3cMN6hBagXqHp1Bs2YK88GZ68uUAedkcRAtRQVuVGlkaofzqizvQ7SkU1sN290g4NGq4j74Vr5B98+uZ7Z6tig4cCxMduBnFpzlAu4NAqF0WLw+6Ga2PbmyBFNTQT9ZkNuHDt9DmmFylSBTlcjP1s461G6YeqLDZhd3tKbJ1RaoB/b4oH9na2qXZ6y26xRV/DTuMCksUW4Sxc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:DM3PR07MB2250;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2250; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2250;4:YrxJ3An817LbB8NubJCz6EW0Opty9CKOHOdpSPAtH9pu01WZAyYvaeUxC64ox7KJJJcK4QNncYeDuhyX43bXA8RMlANW0NJ5GUU64+n4tfFjC0f/tpLWvsMFJgWrn54DMlUP7CyvsFOzWN4slNrAgKiBX31Pal2LR7hbPhtMGzYd2BSj/Fv4fmhfRZ4XQpMjrsVpqSPzSCVJ/Vya+o5VN28G2un4G566OyGcx0Ovx65shONMaYn3LSE6e04M0u9FV9zw/gejNCiGlQWXK50pfFVHun4cedwlr9EZhOQmPpFDo+J5t4X8g5OtBneXAiX3c0dLnOzqHASi3fEgtfAhBYfvHSLFF2luRUtOjlf/Ft8PGpCx+92tb11mdjPZxKiFxcyb0WMW+BSRvS97ysPJ9A== X-Forefront-PRVS: 01026E1310 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(979002)(6009001)(6069001)(7916002)(189002)(199003)(76176999)(50986999)(7416002)(8676002)(81166006)(81156014)(586003)(5001770100001)(97736004)(77096005)(68736007)(33646002)(36756003)(76506005)(42186005)(105586002)(2906002)(4326007)(106356001)(3846002)(6116002)(229853001)(5660300001)(50466002)(48376002)(5003940100001)(7846002)(305945005)(50226002)(7736002)(101416001)(66066001)(19580395003)(19580405001)(2950100002)(47776003)(92566002)(6666003)(189998001)(2201001)(2101003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR07MB2250;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM3PR07MB2250;23:JaR5S9hmZynR5w0ZIm/v7nWrjzq1AM3/Xh+VdW/w2?= =?us-ascii?Q?gdflia+LMOxAMJdhrqDIB9YcBYAG5zSKsjWXzEWe/2+WlgQzdL52TC5cKArg?= =?us-ascii?Q?wYbYyKvprOrpEXOs65iQXTUaBZ39wPkgN0YXF/MD65RMqPWEYpVJm5lpsx08?= =?us-ascii?Q?rkqVm03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XKdDYiyQUPm3By4PL4EuBIY79t8e/YHZiF0bPaJQJIvvYQqc9PGBkqHsoV07vtndWdQLvqcNFePGWuEfzkKejwDJMoY0jJbDTCtA1DpHDKi7TGc0AQIu/k+BQEY3GF0q2Omo3eo7mDj6OY8e1T/oJMRmTXNIwog2tLNbsIVpNI8oRG0eJchrG5O7/jY3W99ac0J6WZYv5Dsjkwz2qUKd1ZNCaMW/7FhbDVnCqXk35C3US5Uk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2016 20:33:50.3788 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2250 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2050 Lines: 62 Based on Andrew Pinski's patch-series. Signed-off-by: Yury Norov --- Documentation/arm64/ilp32.txt | 46 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 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..b96c18f --- /dev/null +++ b/Documentation/arm64/ilp32.txt @@ -0,0 +1,46 @@ +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. + +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 sfruct 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. -- 2.7.4