From patchwork Mon Jun 19 15:49:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 105878 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp941194qgd; Mon, 19 Jun 2017 08:53:41 -0700 (PDT) X-Received: by 10.84.133.15 with SMTP id 15mr9542572plf.291.1497887621551; Mon, 19 Jun 2017 08:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497887621; cv=none; d=google.com; s=arc-20160816; b=CNCbfeQ25OUER5/TpZk/OBt+CpPB5BhuT3Yt4VjwFFyV2rCuwLyZ3V9PD53Dh2sbVw fp5rl40UB6fqC5r5XBhZ6K45F6gvDaj89VYRREnK2sUYLgWSDPIXmlbtU3Iu01OtWibS +TMyJ/FRiOOg37OUc6Kt42sDcMN5sH0omTz5wfGF50WeZOG9PyvatGd0AVQHm7C/z1uu yLzdu94OGUBFuC+tC/uPHOcmTqWzzAeCTGHeZpTFz8cv0O+a10322bPj1SPKuzlV1D5Y q0NB+2IvJ0oEp9Rlpu9Bm/cMQoi+uIVeoXisQBRFMt2uYn0E1Q4GHGV+5PuTB8MSLB1g R6aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=XWdJ/S0ZDwWMyVIAH+lHGwodsMgEea+R/MkbArRdB94=; b=F5wHQ4oaoX7+ZPSWwEXPN/jeDaguxNs/53wCQEM89Ykz55QVdW5ytyA5GOnVtPpiFi CyHKWymGAblf3bJ55PKYQUTyy37UxqEw9t+xh1RCHoM1Bi6aKQZE1jnNhTH6JFRFywsO K2EfIQFaR3nbh2W7p0Z7GH4jfFPHpoYJIN/e51N3aik0q1RrS7BarptQ+v7In13h8wjX 7kY2OPvStvzbIU/64cNmXgXp6DTdRqD3HppTXfz7789lt0vdks+9ReLHp8dk1HIc4rWz uMaj+yOphEXbA2wMhx2x0i7LMyBpqJFD+zPL8MoURgyXbSUhOkrUNnKWQzpGvHDMlZ4z ApAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=TZ5/8j0/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q74si8198422pfa.461.2017.06.19.08.53.41; Mon, 19 Jun 2017 08:53:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=TZ5/8j0/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753915AbdFSPxg (ORCPT + 25 others); Mon, 19 Jun 2017 11:53:36 -0400 Received: from mail-cys01nam02on0051.outbound.protection.outlook.com ([104.47.37.51]:57575 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752081AbdFSPx3 (ORCPT ); Mon, 19 Jun 2017 11:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XWdJ/S0ZDwWMyVIAH+lHGwodsMgEea+R/MkbArRdB94=; b=TZ5/8j0/KmT7bf3sRn/wvLtSHfGJXptEPwtFUAV07FcOro59F4aHWjiqUVFQVrDHr4hikbOJ/99ymcJiC3I2vc7CcfqUt+hVskiBJK7Lq/5xed/9ozZn6D8R3nSIkjsaLR6hjBa/Hqsds0gHEyLm4nF8fM+5RCLGtG5wMfa+sl8= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (85.253.137.34) by CY1PR0701MB1866.namprd07.prod.outlook.com (10.163.42.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Mon, 19 Jun 2017 15:53:25 +0000 From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Yury Norov , Adam Borowski , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Chris Metcalf , Florian Weimer , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Maxim Kuvyrkov , Nathan_Lynch@mentor.com, Prasun.Kapoor@caviumnetworks.com, Ramana Radhakrishnan , Steve Ellcey , Alexander Graf , Mark Brown , christoph.muellner@theobroma-systems.com, davem@davemloft.net, Geert Uytterhoeven , Alexey Klimov , linyongting@huawei.com, manuel.montezelo@gmail.com, philipp.tomsich@theobroma-systems.com, schwidefsky@de.ibm.com, szabolcs.nagy@arm.com, zhouchengming1@huawei.com Subject: [PATCH 16/20] arm64: signal32: move ilp32 and aarch32 common code to separated file Date: Mon, 19 Jun 2017 18:49:59 +0300 Message-Id: <20170619155003.13218-17-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: VI1P190CA0032.EURP190.PROD.OUTLOOK.COM (10.165.188.173) To CY1PR0701MB1866.namprd07.prod.outlook.com (10.163.42.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 419e8042-8873-4bab-295a-08d4b72b523a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1866; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 3:MahkvQEA2pj9YRNtOjAt/IKq0C7cd+Z9Agvp4d+cHdZh/esV8DA1NZ0nY3eQOuYDEwkNi35Se0ihZmBIUec9ETGpZza3yJkRHsdojC6Qi5k6yT9UsN5ipyMa4VScy0IUuAdlOdsylVc8BRyaVGXmnaDlmiXvAnrZXE4Gaj+pxFx0ye66IXxt6qChktlg+FiLpLKrDC5Feav1kVN92nqaqn4AR9v3HjoSORZZErl3/DQLzaVRvd6lqcvsvw+h+VkOmT/eijB+N1rGkb2j3xCh061dhjpPUwfTv+suPmuaWWQOQB9JBN3+vIXikdaU+7w67Ql9XInmwtCEvkNdPYse+A==; 25:jKeD2rq+OvH7Skvr+N1FbJKhmSbSS4NHQ8XAMt0NQoRfmDePAUw+KbfTVmrvWBsUzC/LMSsFIAqPWipT7BBB57YxRkE2VhVyHyZpVl67gJCvcJ+OJYtVq/II0QIOGrLVHkeQs+Fu52GkXllSpkilpp2letpF/mkiUm2ENrrJrBYXTQ6OKj18o7KyuBoRH7JtmzCXqM3D07y2IgHgQ16RqfzTuGGY2sZmj8Nw9wgR0uT/QKspu5YOJmrhHH3fXmB4vaL9UBCFgWB7UxVS9Rvcd9tZ9BZeOmOjmkMeBheSdqR3wDifl9nFFcZh/hUjZM4v/8c00xg2qsBlIQfK74V56cT9WddqlgUVsF6CzQFSyCf5NbrAJkfQty/AYphIALHJILtSkSJOS58cqiRcSTRxDy/hqbEbk9OakV1cyL3D4jV51u4TdUHqpiFBHdRYCvF/C/22KhFqjdJLh1vKK13twuq9dW3hCfhHU4/syzeCcj0= X-MS-TrafficTypeDiagnostic: CY1PR0701MB1866: X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 31:Z7MUSF0l3iUvUcJ0Z9pkm9rrONs6hraoaSYwEYKD++rd1lDDCPXB3uFUvhCeZzZfN+Fre4Y2dCFxRTYxHEttavGbeFf8cIXTgpx17GZN5LdQuv3Pdnvpzyw5wNHhPnmvpjz7KmrIkA8tu5+x5wVuNaHhhJVNzHmYInb7aUUpU8qoss37oc36fO5cyc3t+eVv4BLTLVKzdHkrCSuIaBGux4kqiUaecyNxvzRIrMXmRs0=; 20:1YD1JJjYG3VJdI73LGmKbgpTbASs9OHr08uu/0bwg+/WDBAkJwyekr4b3KR4SXvZ3mlQYJFvV+5EgMMIY94lVgqccAWLHvemMhhyRNfrvYpwByUKZVjBppeu7kifWXPJwjpGdAYs2uy5jp3VPUwjQRds1beYOKme6RFSnLeM/Vl3NhhGeSrI5mrc+IAKedad+q9cerWiWlS2d8bI4LlJ0rJgEjUf/fXWN35kmpbyOxOlpC1ckbTQ/HfFsBAN/HaB5FyeE2wsU3B1MPrTWhke/zkzWUYX2Cmms0IUmFO1USss3ql7Wzo+4UZnCuWOx7vYbNu7GFvfQd/s8eNXFG+NcLidemS+mjKwbYa78SG8/d0UVWPi0AWyWQ1zQ5jsoVU5ILcECINGfw0qiyZwYQgmII/59viSbHTZd1NK9BRJb9h2qHNoNkm3grLJ9plDF00S4F1zhZirkd+d0R1tLFB+5Ri/BvL0inrRG4JG7RUKKchpLHE57fJrxU6HVaEdaHnvw/pyMMQcEePMDxtVZmSAG+J1/qlrY3hfsi4OunuJFMFAFyt65ipVLUGOlCP/AASi9eF2FnY0ybKijAHBCCogBZbFfgYBnQk44RwNtKM1ciM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(180628864354917)(22074186197030)(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0701MB1866; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0701MB1866; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 4:h6aU4QiTuse5Nxyd0obmUtaoy3GLJXY9F3IgQbdFAHaV0eEeWidA7z/nfl21zXMxGbhQcsef9JZH/xTgkHcAb0ciTMgKnlRKL0+dJO1huMelO526eW9YjJqmYtvGFHjOkwpUFQsjxZpMo+fXT5WPpeE92lBXCUit2hIqIDXT65luoDCh8hg8TfatZSCPcAFrNKgUTbVfzs3ssJ+KJXDWEuxe9zTM6FpluA07v4im98mAvcg1eGTAPIM95SQ8sZ9S5UG6km/OW1MswRaMmgKdj6BV//YCbquunZhylrh0Kiwd73N6uYPYu06zI7ORHqRqhPoawO9DYDLdcUtKfv+SHXPfgjYac++V46jrXeR0hZ4cc98czMC6BlmtJ9hfoeyxXNF/C6ff31LsbpVmQ/CHkAIDV9JoOpcm8bn12o72ZXoSLRg+wxcR/o41UDfgAhWetZoYKvjCMgmFQsjUDAKLEwFQOK0l2Ja6rDj7LAKOM4QHXnkxooni7mmU5zIFqUyI5EkXq2n7J0rVVYgu7IG2nCYBCzxemt3tnDvT2tCEPpyhu2S4uY+pHi3T0lB94egIyrmnpmb79XXNQBUh5WJjrbX3KA4K7qgHjX/JAhHgQC1zWC4o+iNwA3kMuJ8sOI5gB+pp4JRCvxQlOKql3bX1F7Oi8Q4K9RZi8uBOHJvdZgK2d+7ZuGBlW8tT9BdQ4zraCarg7hnAh/S/TFlrHAORsMDA2ajh5/VjrwM2BAdgdFGLQ3Fe/h0wYZT+O09VXgSDCwiLFgRCSSWdBY7kdTq5jDvUBlHVsZ3KajUxxV34UTUWS5GUZg6ygeX9KLEy47Wq4g2SmyOEHdM0BURLR3VkB7e1twc1pCPTejRrN9286BX1cnIGRq2ajOSYpBWFIwjrruLPWW/Vp44e0NLvsOkRkfxZiyp6INrGuTS7rk82pafCL7vixIXpD1Pdy1IgyeTN+HTEwO7xTBMKW3Ind0NU+qAS/KWZSs023haOo7/jt/WnwmkEMcEnj6elG1sbWcAmpSL9uLxd6S8xnuE6Mv2bgrxymDZ2U5fY74KPw8H6BXw8hSpe4YENy3yGuIqx/zSbAeSitfDc4LStaavRFtbduL/MYXeqPTPB7Qdp12TjQbBN8sYvWppgapUY0LhAL7ia+rCY0FHLHTCjSGDbgXYs7vkrKKikuN9KyDnmB29s9TDtuCe8JUrxBE+gWutUcVX84rtYaGsLlvAJY/XU0Yg6J3b2lkCp6aUh6Lmtx9+0QZjOwU86FbUNRA9tMfSL96Vd X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39840400002)(39410400002)(39400400002)(39850400002)(39450400003)(6666003)(305945005)(47776003)(42186005)(38730400002)(2950100002)(42882006)(1076002)(76506005)(6486002)(81166006)(25786009)(8676002)(7416002)(7406005)(5003940100001)(36756003)(50986999)(76176999)(6496005)(53936002)(54906002)(6306002)(48376002)(7736002)(189998001)(50466002)(5660300001)(2906002)(3846002)(575784001)(6116002)(66066001)(33646002)(50226002)(478600001)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1866; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 23:5+ZN6+51b7Up1DfGzvAL0hsMEybT82hg+LMs3irde3XrMo/HYmh3xR+HQQtYmoRs1a8wToZGsLggBJOPCsfAxnGqSe90903nsHmmmwfz1QoqJgHWz4vcR8g1vrtvvHeiaoSbp7qCxbppwTbyLCIB94c8T45b9OXIXOz/10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UOu2vjTTCC6WQSu6/2bFxwWv99ymVgd75akKb8rVC/P0Lc7IAaEBns/oJHnWNvYKjuLmc2yKqBFeozUpTCT0vLBKXeWOVQ/OFJHh56vUbjGVQ9McdLKbX06uJZ/JdL72SXNw9SlZpr7Az9HvZ1Nvtg+ohZgV2H9CpQWKszVrmcZHgzQ5M03h2Xm1JZmnCmMlmyUL16dkZMKyW+mopMzoDxQ1DIhXsC4lBDCd9ntRVJluMU9gbMwfPswKPK7TO7UWIzecDwNy4cy4Y/0m/ancAozZaBY64BDLyq/hiWYVKBnwu/vR/pw/K2pi0fBMWjJwakfKg9cahclTxZGog7lOLZNz92vy/Gc= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:53:25.2571 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1866 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Yury Norov --- arch/arm64/include/asm/signal32.h | 3 + arch/arm64/include/asm/signal32_common.h | 27 +++++++ arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/signal32.c | 107 ------------------------ arch/arm64/kernel/signal32_common.c | 135 +++++++++++++++++++++++++++++++ 5 files changed, 166 insertions(+), 108 deletions(-) create mode 100644 arch/arm64/include/asm/signal32_common.h create mode 100644 arch/arm64/kernel/signal32_common.c -- 2.11.0 diff --git a/arch/arm64/include/asm/signal32.h b/arch/arm64/include/asm/signal32.h index e68fcce538e1..1c4ede717bd2 100644 --- a/arch/arm64/include/asm/signal32.h +++ b/arch/arm64/include/asm/signal32.h @@ -13,6 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +#include + #ifndef __ASM_SIGNAL32_H #define __ASM_SIGNAL32_H diff --git a/arch/arm64/include/asm/signal32_common.h b/arch/arm64/include/asm/signal32_common.h new file mode 100644 index 000000000000..36c1ebc07a97 --- /dev/null +++ b/arch/arm64/include/asm/signal32_common.h @@ -0,0 +1,27 @@ +/* + * 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 . + */ +#ifndef __ASM_SIGNAL32_COMMON_H +#define __ASM_SIGNAL32_COMMON_H + +#ifdef CONFIG_COMPAT + +int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from); +int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from); + +int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set); +int get_sigset_t(sigset_t *set, const compat_sigset_t __user *uset); + +#endif /* CONFIG_COMPAT*/ + +#endif /* __ASM_SIGNAL32_COMMON_H */ diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index c329a4e28a92..9c7912936049 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -30,7 +30,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 sys_ilp32.o -arm64-obj-$(CONFIG_COMPAT) += entry32_common.o +arm64-obj-$(CONFIG_COMPAT) += entry32_common.o signal32_common.o arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o arm64-obj-$(CONFIG_ARM64_MODULE_PLTS) += module-plts.o diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c index c747a0fc5d7d..181cc3012bda 100644 --- a/arch/arm64/kernel/signal32.c +++ b/arch/arm64/kernel/signal32.c @@ -103,113 +103,6 @@ struct compat_rt_sigframe { #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) -static inline int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set) -{ - compat_sigset_t cset; - - cset.sig[0] = set->sig[0] & 0xffffffffull; - cset.sig[1] = set->sig[0] >> 32; - - return copy_to_user(uset, &cset, sizeof(*uset)); -} - -static inline int get_sigset_t(sigset_t *set, - const compat_sigset_t __user *uset) -{ - compat_sigset_t s32; - - if (copy_from_user(&s32, uset, sizeof(*uset))) - return -EFAULT; - - set->sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32); - return 0; -} - -int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from) -{ - int err; - - if (!access_ok(VERIFY_WRITE, to, sizeof(*to))) - return -EFAULT; - - /* If you change siginfo_t structure, please be sure - * this code is fixed accordingly. - * It should never copy any pad contained in the structure - * to avoid security leaks, but must copy the generic - * 3 ints plus the relevant union member. - * This routine must convert siginfo from 64bit to 32bit as well - * at the same time. - */ - err = __put_user(from->si_signo, &to->si_signo); - err |= __put_user(from->si_errno, &to->si_errno); - err |= __put_user((short)from->si_code, &to->si_code); - if (from->si_code < 0) - err |= __copy_to_user(&to->_sifields._pad, &from->_sifields._pad, - SI_PAD_SIZE); - else switch (from->si_code & __SI_MASK) { - case __SI_KILL: - err |= __put_user(from->si_pid, &to->si_pid); - err |= __put_user(from->si_uid, &to->si_uid); - break; - case __SI_TIMER: - err |= __put_user(from->si_tid, &to->si_tid); - err |= __put_user(from->si_overrun, &to->si_overrun); - err |= __put_user(from->si_int, &to->si_int); - break; - case __SI_POLL: - err |= __put_user(from->si_band, &to->si_band); - err |= __put_user(from->si_fd, &to->si_fd); - break; - case __SI_FAULT: - err |= __put_user((compat_uptr_t)(unsigned long)from->si_addr, - &to->si_addr); -#ifdef BUS_MCEERR_AO - /* - * Other callers might not initialize the si_lsb field, - * so check explicitly for the right codes here. - */ - if (from->si_signo == SIGBUS && - (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO)) - err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb); -#endif - break; - case __SI_CHLD: - err |= __put_user(from->si_pid, &to->si_pid); - err |= __put_user(from->si_uid, &to->si_uid); - err |= __put_user(from->si_status, &to->si_status); - err |= __put_user(from->si_utime, &to->si_utime); - err |= __put_user(from->si_stime, &to->si_stime); - break; - case __SI_RT: /* This is not generated by the kernel as of now. */ - case __SI_MESGQ: /* But this is */ - err |= __put_user(from->si_pid, &to->si_pid); - err |= __put_user(from->si_uid, &to->si_uid); - err |= __put_user(from->si_int, &to->si_int); - break; - case __SI_SYS: - err |= __put_user((compat_uptr_t)(unsigned long) - from->si_call_addr, &to->si_call_addr); - err |= __put_user(from->si_syscall, &to->si_syscall); - err |= __put_user(from->si_arch, &to->si_arch); - break; - default: /* this is just in case for now ... */ - err |= __put_user(from->si_pid, &to->si_pid); - err |= __put_user(from->si_uid, &to->si_uid); - break; - } - return err; -} - -int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) -{ - if (copy_from_user(to, from, __ARCH_SI_PREAMBLE_SIZE) || - copy_from_user(to->_sifields._pad, - from->_sifields._pad, SI_PAD_SIZE)) - return -EFAULT; - - return 0; -} - /* * VFP save/restore code. * diff --git a/arch/arm64/kernel/signal32_common.c b/arch/arm64/kernel/signal32_common.c new file mode 100644 index 000000000000..5bddc25dca12 --- /dev/null +++ b/arch/arm64/kernel/signal32_common.c @@ -0,0 +1,135 @@ +/* + * Based on arch/arm/kernel/signal.c + * + * Copyright (C) 1995-2009 Russell King + * Copyright (C) 2012 ARM Ltd. + * Modified by Will Deacon + * + * 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 . + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +int put_sigset_t(compat_sigset_t __user *uset, sigset_t *set) +{ + compat_sigset_t cset; + + cset.sig[0] = set->sig[0] & 0xffffffffull; + cset.sig[1] = set->sig[0] >> 32; + + return copy_to_user(uset, &cset, sizeof(*uset)); +} + +int get_sigset_t(sigset_t *set, const compat_sigset_t __user *uset) +{ + compat_sigset_t s32; + + if (copy_from_user(&s32, uset, sizeof(*uset))) + return -EFAULT; + + set->sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32); + return 0; +} + +int copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from) +{ + int err; + + if (!access_ok(VERIFY_WRITE, to, sizeof(*to))) + return -EFAULT; + + /* If you change siginfo_t structure, please be sure + * this code is fixed accordingly. + * It should never copy any pad contained in the structure + * to avoid security leaks, but must copy the generic + * 3 ints plus the relevant union member. + * This routine must convert siginfo from 64bit to 32bit as well + * at the same time. + */ + err = __put_user(from->si_signo, &to->si_signo); + err |= __put_user(from->si_errno, &to->si_errno); + err |= __put_user((short)from->si_code, &to->si_code); + if (from->si_code < 0) + err |= __copy_to_user(&to->_sifields._pad, &from->_sifields._pad, + SI_PAD_SIZE); + else switch (from->si_code & __SI_MASK) { + case __SI_KILL: + err |= __put_user(from->si_pid, &to->si_pid); + err |= __put_user(from->si_uid, &to->si_uid); + break; + case __SI_TIMER: + err |= __put_user(from->si_tid, &to->si_tid); + err |= __put_user(from->si_overrun, &to->si_overrun); + err |= __put_user(from->si_int, &to->si_int); + break; + case __SI_POLL: + err |= __put_user(from->si_band, &to->si_band); + err |= __put_user(from->si_fd, &to->si_fd); + break; + case __SI_FAULT: + err |= __put_user((compat_uptr_t)(unsigned long)from->si_addr, + &to->si_addr); +#ifdef BUS_MCEERR_AO + /* + * Other callers might not initialize the si_lsb field, + * so check explicitly for the right codes here. + */ + if (from->si_signo == SIGBUS && + (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO)) + err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb); +#endif + break; + case __SI_CHLD: + err |= __put_user(from->si_pid, &to->si_pid); + err |= __put_user(from->si_uid, &to->si_uid); + err |= __put_user(from->si_status, &to->si_status); + err |= __put_user(from->si_utime, &to->si_utime); + err |= __put_user(from->si_stime, &to->si_stime); + break; + case __SI_RT: /* This is not generated by the kernel as of now. */ + case __SI_MESGQ: /* But this is */ + err |= __put_user(from->si_pid, &to->si_pid); + err |= __put_user(from->si_uid, &to->si_uid); + err |= __put_user(from->si_int, &to->si_int); + break; + case __SI_SYS: + err |= __put_user((compat_uptr_t)(unsigned long) + from->si_call_addr, &to->si_call_addr); + err |= __put_user(from->si_syscall, &to->si_syscall); + err |= __put_user(from->si_arch, &to->si_arch); + break; + default: /* this is just in case for now ... */ + err |= __put_user(from->si_pid, &to->si_pid); + err |= __put_user(from->si_uid, &to->si_uid); + break; + } + return err; +} + +int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) +{ + if (copy_from_user(to, from, __ARCH_SI_PREAMBLE_SIZE) || + copy_from_user(to->_sifields._pad, + from->_sifields._pad, SI_PAD_SIZE)) + return -EFAULT; + + return 0; +}