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: 9796561 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 357B760381 for ; Mon, 19 Jun 2017 15:55:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 213DB26E56 for ; Mon, 19 Jun 2017 15:55:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15674271CB; Mon, 19 Jun 2017 15:55:21 +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=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable 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 5978626E56 for ; Mon, 19 Jun 2017 15:55:20 +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=2SJn0TsHIt/F5h8vn2zeudi0KN83xarzo75phq6jrW8=; b=PjxDzYws3aUd+c q1Mi2Hbj+aaWqdD5HvhghySJp6Ub4UK+jEvGqncamj+dx7O2LHkQ5rxgrjtwJBnSw6O3PVJIFTmRJ 1Urj1BLmcGSr5j/UAnwRzaW0LnBYn/Difvdj/PMLcTQ0sdTyn/n3fHUf27G/wwZ9CuOyGovhanhp0 8eYO8IHSScLjiqnhrhXJptt5/TMv7u0osO59doCZwdXELsCML08rk44ID3mPPCZFDxIMej2CBOgRL FvTe003Ge71kCd2oEO13dnTIgnbdz6jtF7JMAmw7gX4Mh4cB3wNzliSsyzl5l4gTrZzkg284C1XKa zP/zGJaU+t9cIS5vkL+Q==; 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 1dMz1K-00028h-Dl; Mon, 19 Jun 2017 15:55:18 +0000 Received: from mail-cys01nam02on0055.outbound.protection.outlook.com ([104.47.37.55] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dMyzt-0007Yy-EZ for linux-arm-kernel@lists.infradead.org; Mon, 19 Jun 2017 15:54:03 +0000 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 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/LMSsFIAqPWipT7BBB57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a78SG8/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: =?us-ascii?Q?1; CY1PR0701MB1866; 4:h6aU4QiTuse5Nxyd0obmUtaoy3GLJXY9F3IgQbdF?= =?us-ascii?Q?AHaV0eEeWidA7z/nfl21zXMxGbhQcsef9JZH/xTgkHcAb0ciTMgKnlRKL0+d?= =?us-ascii?Q?JO1huMelO526eW9YjJqmYtvGFHjOkwpUFQsjxZpMo+fXT5WPpeE92lBXCUit?= =?us-ascii?Q?2hIqIDXT65luoDCh8hg8TfatZSCPcAFrNKgUTbVfzs3ssJ+KJXDWEuxe9zTM?= =?us-ascii?Q?6FpluA07v4im98mAvcg1eGTAPIM95SQ8sZ9S5UG6km/OW1MswRaMmg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ppgapUY0LhAL7ia+rCY0FHLHTCjSGDbgXYs7vkrKKik?= =?us-ascii?Q?uN9KyDnmB29s9TDtuCe8JUrxBE+gWutUcVX84rtYaGsLlvAJY/XU0Yg6J3b2?= =?us-ascii?Q?lkCp6aUh6Lmtx9+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: =?us-ascii?Q?1; CY1PR0701MB1866; 23:5+ZN6+51b7Up1DfGzvAL0hsMEybT82hg+LMs3ir?= =?us-ascii?Q?de3XrMo/HYmh3xR+HQQtYmoRs1a8wToZGsLggBJOPCsfAxnGqSe90903nsHm?= =?us-ascii?Q?mmwfz1QoqJgHWz4vcR8g1vrtvvHeiaoSbp7qCxbppwTbyLCIB94c8T45b9OX?= =?us-ascii?Q?IXOz/10PuolfOAKwwFzvm8MKhvf8a0deqfEbK3e943kYoITBViiLhxyY8QBd?= =?us-ascii?Q?C0IWFfF58zvJKuMAwhZPvizIuKiisiRy+6gNsK9RDApwwuQ+b67YeETwX+PT?= =?us-ascii?Q?lJFCcbEQ1cT//xcKKv2Fov8phGVWLRhyZnt5XllRFP4GrjFYQJHIG5j7kjzt?= =?us-ascii?Q?VTVktHW99tkiLw+st+pvppvuaDTGLh4telH3CWL2WRMyXbBCzYAEn3bYpm+u?= =?us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EIaw5iXLo6Jovr4bSZtVXlI41f4m7sKveQTJHeWvZwMer8R87rlgfn7C?= =?us-ascii?Q?d9s=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 5:TcLCEn494AdGouoyArPzSNd9KFnN643UE2Ymf+otPLeX1yHsDlvcz7l9LkgUWqsV9XZPi2sQANUJbuuWHsvqzpP+aDjxKVzN2rGu4KnE/Qg8r8fE6WyBykEUXwB+xJihjNOX/GIEnIXpFPIxxi/O3RyBZPcUBtGwrzG3c9JuSED1Au7osr/AWRZo7ItO95j+xr7PVTuZsDmmX+YZF2eiJekB9MhkyUNHsw1wstw8ealk8XZP+mpwYbN3BhKdcsOfcx05Vx+EV+T7YWtlo3VjrEhW3eVU3p1JScDeDMGhhZVLnxGs3V9p1nWFMwqX0VvLaPIqQLFVGieslLP4smeNZt+u7wX+J+hXLO4lOYxAXTXpW6IylMoc3ltNktZ89f1I8Ae6cMQsKnyxE2UYmWbgRNvDlJUFYARP96yFvWhk0o+NVUxQiHznyqP9zGZU0J1oLPBwPtpafFSsJ34dinZXtXIetkKUq7KZ8DnwBMPP9o30u5xScwU3ElBk+TNA4zR6; 24:1KOm+V87RmAqsW6Zk50MzrL4OU6/U4/ta4PcrdKdYq5fPpOez9gTOsZWsZFMnYU72CFRIP7+CpZ6/5GRetQVHC+56W88+O040cbE8qqGBKI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 7:3oq/b1iOVZlcgeIAOY47G2TajdBuYo3ZQ01vjjMI8Hn8+a6FCtVrArItQrXLbcRSQAF7rkhpAPbJIm7QCVizXFVKw8ZD1QiOl7m4w1rZdrZm+aDu9n8/Ow57ej0QB1Yr+5uVnQYQiOuYvlcKIlvxtTiOzyyYosP7Do3vFDVKzZjk71aNjJD9ZOhN2snAIqG8ymJwsTAcZT+KcbiH9jg/aR01///5X20k9Oj7NCX5Ptsd9qY4BPvsBkcYiQkP4dpLqY35lXht2vb2HJSTMDluJLyTDCZruwEYBt7FOi/GR7ssPxGuJEX3QXc0iR02dSg/yTXomhsnhD0HIAkbdvsR944tH2+fbpDevd2pncT0Pmxj0cupY7sRpLjfmbLZ3uiXh8bgCJ0qemhleU4KdYBFbQJ5vMRb99YXimutOAUO2pQ+kbxmvbEh88ttg5djmE0UXUN9pAzn4noZUOu2vjTTCC6WQSu6/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170619_085350_234439_D7F4FA32 X-CRM114-Status: GOOD ( 11.40 ) 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: szabolcs.nagy@arm.com, Heiko Carstens , Chris Metcalf , Yury Norov , philipp.tomsich@theobroma-systems.com, Joseph Myers , zhouchengming1@huawei.com, Steve Ellcey , Prasun.Kapoor@caviumnetworks.com, Andreas Schwab , Alexander Graf , Geert Uytterhoeven , Adam Borowski , manuel.montezelo@gmail.com, James Hogan , Chris Metcalf , Andrew Pinski , linyongting@huawei.com, Alexey Klimov , Mark Brown , Bamvor Zhangjian , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch@mentor.com, James Morse , 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 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 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; +}