From patchwork Wed Aug 17 11:46:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 101947 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2465925qga; Wed, 17 Aug 2016 04:49:28 -0700 (PDT) X-Received: by 10.66.43.164 with SMTP id x4mr72536725pal.11.1471434568456; Wed, 17 Aug 2016 04:49:28 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id i5si37471119pae.80.2016.08.17.04.49.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Aug 2016 04:49:28 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-72571-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-72571-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-72571-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=cdXLF 8QiDQPNOtarrV+jpKoDKf10Cpus5wANUeh7OSNQyME6glhVL8W2kZrsXnN5R1aXj HFtDZZ3/U9QBqnTRktK6sI0bxxNp8XbOvZ4P5G1x4lVb3zRYeUmqutGKha8rWMwI MrUaNNIURLnbt4hhAPKOaRnAJp04/fwXoPgk0w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=NlzIk8NlV/Q fhDcHEkFx+lXm8lM=; b=Dfr8JHf8t6WArtkdZqHSKykLrm4pq4nEDVtiL0TLTnn QzDxiOrU2bp0t+FndfFVkN1G54tVmAA8NmQes4kSBtKHnoFoUjbgO9aAVIKJMJvh eHz/VwZtkEy69Wq+06ymiHA9w1JpnpH+J4nDiTdX6azrJBzYk6obs59wOK93GnNo = Received: (qmail 113436 invoked by alias); 17 Aug 2016 11:49:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 113291 invoked by uid 89); 17 Aug 2016 11:49:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL, BAYES_50, KAM_MANYTO, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Exception, req, H*r:sk:mail-by, H*r:104.47.34 X-HELO: NAM01-BY2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , Andrew Pinski , Andrew Pinski Subject: [PATCH 12/18] arm64: ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it Date: Wed, 17 Aug 2016 14:46:37 +0300 Message-ID: <1471434403-25291-13-git-send-email-ynorov@caviumnetworks.com> 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-ClientProxiedBy: AM3PR03CA048.eurprd03.prod.outlook.com (10.141.191.176) To SN1PR07MB2254.namprd07.prod.outlook.com (10.164.47.148) X-MS-Office365-Filtering-Correlation-Id: ce7771f1-4a7c-4121-1d61-08d3c69472c6 X-Microsoft-Exchange-Diagnostics: 1; SN1PR07M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TwBwBJk=; 20:bHK30hn2qJwcttEZXy7OUePN1b43xvpAEdkBh0izSHOxSETemUqT5LL4UwBmRo9j5QJ8mj7I3l74JFu4uH2xknOjFHWM6tT2gY6bCMBoF4rNo2aZnXID2KmvFnCLn62tTpDrBAbHKBcwRKaFB775QdbFC7io157cqYf1CwdZF8yjJO5oJSzsIdz1nubOFRj43tQai+mFiLLhupiAdgWXGeWweUMh2VLiEp5YI7jBlakmY71vTfh9IbcXIoORWsp0Xw+/FzHTL57au8lck0uJekKaLznjYyYjFIqftD/uoqYIpGfiKFZwTjG4fl1u98Rov9qq943aO3HzUdtrRpLaDQAT/5P5mYQY6bvglhlTo1vcenfNC8066punPhkbt8AOTWETOzlkuV1kdONkaV11gRHMW4ICYq5EJM91E5gkh6mAMAh5cg5iRCpRgUkFwP3bhmWYXOI2j6PnaOwURt8H2EyvMO5o8Bm5kUcqIlWHQR4vUc8gIUnOG+/gpy8CQfBxeWxlpnegESkvD1W0fYDr8wsucCAECCk479J0I5zIfHaXrkT3SWcLfGp46YBO6XlvV/oeLCyO+XWyuD95lLIXd49qwQ3bsnmTJEZ2FOicDjs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:SN1PR07MB2254; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2254; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2254; 4:+roMAtZmxQPskPvB0KH5i/SUYlneNdTIcSmQ6IhPeXgb+cXaAh711gwqni+ZXvzP70WBWQwFled6KwQcCHwzClz1W+2I5p0dkftoGgrzNi2EKBcKU24qMjPTdm9Yck85kbI0MgLaOxNslkymJ1hNMNHDgrdieIlAp3ttWgqB5bp3hlivVIV2AMAQdfEzCb3EX98+UWPOW5pvYMGoBShQhNrtmfK+XmXrOySDNIX4PT4HSKwnKzJnijLczNdhXd/JW/8DxF0az7keygKqMr5pstyEpYjYh7OBeHVE4kL3cxrA4OsAXQCcK0PZ3YrUMDbJ+00p4UY3nC2uM08/bEKF8m7l1MjNk993SKjAOf/q4ibRaMgJxDjmJcb7vDqq178+/Bvt1gbAua0k9OR+reSTaLOlDChiECD1spuoskZCM+k473DuNOIjUXqL5wZ0iNa9tTL7mJye7wMUzp/YnbeWJw== X-Forefront-PRVS: 0037FD6480 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(2950100001)(76176999)(101416001)(8676002)(7846002)(229853001)(50986999)(36756003)(33646002)(305945005)(50466002)(4326007)(81166006)(42186005)(189998001)(586003)(4001430100002)(7736002)(50226002)(19580405001)(7416002)(81156014)(92566002)(47776003)(19580395003)(575784001)(2906002)(106356001)(97736004)(105586002)(5001770100001)(68736007)(15975445007)(77096005)(3846002)(6116002)(76506005)(48376002)(2201001)(107886002)(66066001)(5003940100001)(2004002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2254; 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: 1; SN1PR07MB2254; 23:kNUiru+an2owcGtsjgz4+cUMxd+7i1PaO2fxJwznuHWynFvPWYX49olOkdaYlEnt7yfkPsUrCBMzclRcWCTJQL2O1T6+990LVSREPmDnQQGzn7tVekCXyrsmdbIadcDxXMB9Mx2QkiV7uOF3h2SfYENX7POVuL1/wMVP3AkOSwJfKfeRj3twrhFZXS8mfR8F3L2eu9djY1FlnvQZlcjnSQM1xoDLTePcbki/ZGqp8urM29jA9Dv2/cznRPAmDqCLF+v0jkOBJvY/2Z/zn2SjyYmiTw6RyI4Xwyq0nfkTwfmgDzxgCUZqU+c3MPno3EERZdzLWMGYlbzQi7seEoF1dglZG1p4LLvxVGjDMqWTbz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MspyaHn72ovjDabzJYx/KPxk4IhUsbq1GYVz0QP5DCgIlNrD9TTysEU8yTvFjtIPI93H9cX/iwV26W+QsbNuBNbF7Y6OT0qR/FlCHCzDshiULV50HMDbRoT7tLDUhr8ff8EL1MjSnUw8UOE0pSDjGeIZUY0yS0k/1M7E=; 5:wd2ljao92KTllSa/D4I1J6r6SpQvQwiYv9YJKTy0k6ZDS6RmxV4lBPCKCwJs/k7Uks7dJBqo4Yo2/AOdf+bJesD3t5DhRKURC++xXSQ5MkRkhhDWxH+tx3eDQ7Nza+Peyfiuvg4ZarfAYTOj29uXIQ==; 24:NbRbWu4NzmbkBD9e1/T5VNSITbEZfgQOU8+x6XHFh0pwmSl/93kd5WnvVEUp+N0lu9MwPyDhXPL/5Ab2WGHIF80G9DoBLBoKiWsIsCCSHOg=; 7:tFQcR1FsWSLVtrQV+whfz4HQ6s5s1vQRboPwa3G1cZVac/d5idxiOCxDwJVE687hXnivHfU7xxq7Vz6uA3FNGbugUqy7M1WC0/+vdh8a1B6yRuPhEadRHUns0mFhAXbqe5iKP9vqyYZOb82/AGyrqIJ2zIQ8JNaM4QSQC0m8Kh8k8WS0BF6ZfhGq3d5tlBRNpTs2D7HwWnqymA1prnJzfP6YMRXK0d4UOPSg5midtzLDEDAn6TQRIulj1B96KZB7 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2016 11:48:46.8624 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2254 From: Andrew Pinski Add a separate syscall-table for ILP32, which dispatches either to native LP64 system call implementation or to compat-syscalls, as appropriate. Signed-off-by: Andrew Pinski Signed-off-by: Yury Norov --- arch/arm64/include/asm/unistd.h | 6 ++- arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/entry.S | 28 +++++++++++++- arch/arm64/kernel/sys_ilp32.c | 86 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 arch/arm64/kernel/sys_ilp32.c -- 2.7.4 diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index fe9d6c1..250654c 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h @@ -13,13 +13,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +#ifdef CONFIG_COMPAT +#define __ARCH_WANT_SYS_LLSEEK +#endif + #ifdef CONFIG_AARCH32_EL0 #define __ARCH_WANT_COMPAT_SYS_GETDENTS64 #define __ARCH_WANT_COMPAT_STAT64 #define __ARCH_WANT_SYS_GETHOSTNAME #define __ARCH_WANT_SYS_PAUSE #define __ARCH_WANT_SYS_GETPGRP -#define __ARCH_WANT_SYS_LLSEEK #define __ARCH_WANT_SYS_NICE #define __ARCH_WANT_SYS_SIGPENDING #define __ARCH_WANT_SYS_SIGPROCMASK diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 4a81d93..36257b7 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -27,7 +27,7 @@ $(obj)/%.stub.o: $(obj)/%.o FORCE arm64-obj-$(CONFIG_AARCH32_EL0) += sys32.o kuser32.o signal32.o \ sys_compat.o entry32.o binfmt_elf32.o -arm64-obj-$(CONFIG_ARM64_ILP32) += binfmt_ilp32.o +arm64-obj-$(CONFIG_ARM64_ILP32) += binfmt_ilp32.o sys_ilp32.o arm64-obj-$(CONFIG_COMPAT) += entry32_common.o arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 9e18747..4c44312 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -255,6 +255,23 @@ tsk .req x28 // current thread_info .text +#ifdef CONFIG_ARM64_ILP32 +/* + * AARCH64/ILP32. Zero top halves of x0-x7 + * registers as userspace may put garbage there. + */ + .macro delouse_input_regs + mov w0, w0 + mov w1, w1 + mov w2, w2 + mov w3, w3 + mov w4, w4 + mov w5, w5 + mov w6, w6 + mov w7, w7 + .endm +#endif + /* * Exception vectors. */ @@ -523,6 +540,7 @@ el0_svc_compat: * AArch32 syscall handling */ adrp stbl, compat_sys_call_table // load compat syscall table pointer + ldr x16, [tsk, #TI_FLAGS] uxtw scno, w7 // syscall number in w7 (r7) mov sc_nr, #__NR_compat_syscalls b el0_svc_naked @@ -749,15 +767,21 @@ ENDPROC(ret_from_fork) .align 6 el0_svc: adrp stbl, sys_call_table // load syscall table pointer + ldr x16, [tsk, #TI_FLAGS] uxtw scno, w8 // syscall number in w8 mov sc_nr, #__NR_syscalls +#ifdef CONFIG_ARM64_ILP32 + tst x16, #_TIF_32BIT_AARCH64 + b.eq el0_svc_naked // We are using LP64 syscall table + adrp stbl, sys_call_ilp32_table // load ilp32 syscall table pointer + delouse_input_regs +#endif el0_svc_naked: // compat entry point stp x0, scno, [sp, #S_ORIG_X0] // save the original x0 and syscall number enable_dbg_and_irq ct_user_exit 1 - ldr x16, [tsk, #TI_FLAGS] // check for syscall hooks - tst x16, #_TIF_SYSCALL_WORK + tst x16, #_TIF_SYSCALL_WORK // check for syscall hooks b.ne __sys_trace cmp scno, sc_nr // check upper syscall limit b.hs ni_sys diff --git a/arch/arm64/kernel/sys_ilp32.c b/arch/arm64/kernel/sys_ilp32.c new file mode 100644 index 0000000..10fc0ca --- /dev/null +++ b/arch/arm64/kernel/sys_ilp32.c @@ -0,0 +1,86 @@ +/* + * AArch64- ILP32 specific system calls implementation + * + * Copyright (C) 2016 Cavium Inc. + * Author: Andrew Pinski + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#define __SYSCALL_COMPAT + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Using aarch32 syscall handlerss where off_t is passed. + */ +#define compat_sys_fadvise64_64 compat_sys_fadvise64_64_wrapper +#define compat_sys_fallocate compat_sys_fallocate_wrapper +#define compat_sys_fcntl64 sys_fcntl +#define compat_sys_ftruncate64 compat_sys_ftruncate64_wrapper +#define compat_sys_pread64 compat_sys_pread64_wrapper +#define compat_sys_pwrite64 compat_sys_pwrite64_wrapper +#define compat_sys_readahead compat_sys_readahead_wrapper +#define compat_sys_shmat sys_shmat +#define compat_sys_sync_file_range compat_sys_sync_file_range2_wrapper +#define compat_sys_truncate64 compat_sys_truncate64_wrapper +#define sys_mmap2 compat_sys_mmap2_wrapper +#define sys_ptrace compat_sys_ptrace + +/* + * Use non-compat syscall handlers where rlimit, stat and statfs + * structure pointers are passed, as their layout is identical to LP64. + */ +#define compat_sys_fstatfs64 sys_fstatfs +#define compat_sys_statfs64 sys_statfs +#define sys_fstat64 sys_newfstat +#define sys_fstatat64 sys_newfstatat +#define compat_sys_getrlimit sys_getrlimit +#define compat_sys_setrlimit sys_setrlimit + +asmlinkage long compat_sys_fadvise64_64_wrapper(void); +asmlinkage long compat_sys_fallocate_wrapper(void); +asmlinkage long compat_sys_ftruncate64_wrapper(void); +asmlinkage long compat_sys_mmap2_wrapper(void); +asmlinkage long compat_sys_pread64_wrapper(void); +asmlinkage long compat_sys_pwrite64_wrapper(void); +asmlinkage long compat_sys_readahead_wrapper(void); +asmlinkage long compat_sys_sync_file_range2_wrapper(void); +asmlinkage long compat_sys_truncate64_wrapper(void); + +asmlinkage long ilp32_sys_rt_sigreturn_wrapper(void); +#define compat_sys_rt_sigreturn ilp32_sys_rt_sigreturn_wrapper + +#include + +#undef __SYSCALL +#define __SYSCALL(nr, sym) [nr] = sym, + +/* + * The sys_call_ilp32_table array must be 4K aligned to be accessible from + * kernel/entry.S. + */ +void *sys_call_ilp32_table[__NR_syscalls] __aligned(4096) = { + [0 ... __NR_syscalls - 1] = sys_ni_syscall, +#include +};