From patchwork Mon Jun 19 15:49:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 105877 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp941189qgd; Mon, 19 Jun 2017 08:53:41 -0700 (PDT) X-Received: by 10.84.209.238 with SMTP id y101mr30123264plh.290.1497887621155; 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=HfBsh0OhfG6OA1QdcxiqC3iVo2sJlc0d0vDk4ToVX0+j1gcNKEpCxBSbcI+Agj4S/1 x4rgrd+XYfYX2G1nmv32vbL9aho2HZLsX9dRnjxtaG8FeJstQGeVEVrY0kdQuBH0TVoy G9eFIzQ/lfwBZWio1i6cPPtKCe1f0NazIJHbCC0MRDASW126+1X6LBrN6HhBUySTlT0b kP4z8iX1yru2It6SYUjNW8llygeT6+UY0aMeXs1mwjveYFt4VUiuINXcHza6rZG/EctT OoHuGfhax8AbjsGRmPyFOoClnoMF8LqLfs9KuzFQAkRfqrZt36kwxZyL6lGGWZSBYeET xryg== 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=eePZQHj5I8nXaLVus+kylbnJDbphmAT5zvcXveICkeU=; b=HgObDc5Dkay+HUM415NfuzRhELjgxjLg7zlX8wkxAifo3MZHF4sYKbNmogpah3hj1f c/CCLitY2HzmKCVD6kJoRDqdO4gnHIFprJkGnzuuvA3DvspF3aja/xBVG29Y7IF0Jkjr Lv8RpUkQK5XdO7thBQK2Uoi4yKbVNh+AqOx+1cyrFtQ3ZyNT1A4QLS9lB3a7Tr+8RAom QYoKx20rpMDkvej84/wf8IbYG6m0pMfeEEQEIH123lKNPUMTgcNx1m0GuuCmQYoafqxu EVN+xT50fajZhy4YsATPSndlX5T/4f3vsxLGbc9YISLHSLDcpBQs9kaUWc19XAvvFtvn 0g9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=CEOUcZ26; 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.40; 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=CEOUcZ26; 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 S1753894AbdFSPx2 (ORCPT + 25 others); Mon, 19 Jun 2017 11:53:28 -0400 Received: from mail-by2nam03on0057.outbound.protection.outlook.com ([104.47.42.57]:52789 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752081AbdFSPxX (ORCPT ); Mon, 19 Jun 2017 11:53:23 -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=eePZQHj5I8nXaLVus+kylbnJDbphmAT5zvcXveICkeU=; b=CEOUcZ26sTh70YJO66ata5zAoUdcpvZ7C/uj36Rd/cM+ufYyM/YXatyRYSpzL6pQ5Yd2naFu6eaX1+tbN8mZg+nsYrA2131jmGdyyq5yghfXm2Nnhg7Wem2A638eeiIFDvD9H4mPkJMIipPr6nPcIAH7hHD9jLiH+zjCiaWMj2U= 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 BY1PR0701MB1864.namprd07.prod.outlook.com (10.162.143.146) 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:14 +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, Bamvor Jian Zhang Subject: [PATCH 15/20] arm64: signal: share lp64 signal routines to ilp32 Date: Mon, 19 Jun 2017 18:49:58 +0300 Message-Id: <20170619155003.13218-16-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: VI1P190CA0010.EURP190.PROD.OUTLOOK.COM (10.165.188.151) To BY1PR0701MB1864.namprd07.prod.outlook.com (10.162.143.146) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fe91329d-8fda-41b1-0302-08d4b72b4b98 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1864; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1864; 3:cj99uXT/TJAB0kP9D6NwBYvHJtIsSBImcshDkNf6cCssJdxsV4gQtt0WiPDuFVvxaDu2aRKw/M01otnSr3WVyQ2aPJbrCOPgZmgaQHkz9I3aD7MeXrbOU9KtEmzwJdrt8EVooZfGlzYwjBCD6em/kvNOskJch2M2TqFu3NhXtr3jU/s4kVTkOVTFRgybJ7pzjgIFXKPeFUWz0UJ82Eqvp/GbBY/gk/0x/nBKheSOIlTTBay9Tz8fJt340KPpYqTelOG4ifWiwWq1MIA0hTv+HDxiJANm7TQ+wVKqc31W/jG+HPM7sdexBpLxGTuIi+LdyMkwJMXtiD3MCmKk7wez6A==; 25:XBUfKADKe+LinggnNtczCOxrM1/6vjB76TWYreqfnPX7IuirbhIQh7oYkAv7LNB9AVbTVRo/tar9oznH6N5ug4LO0aE9ap8z1AFH+WIYaqnD3dcGd3ge3Gxrlxc3mKLcGXBAonhCYlO770OTVrW9XMmblfvGlyC/Ds8FCQdokTOsxIy4/9m4fcjGZWOgmTb9xYHHZ5H1mENIyIyRpSpuWVTiPQykNAxuSuP++4ciEoWClyecfgNfprSl4GemFrtb9fSh0yVQKTFAApPE7m9PzfmNCb5eoIsGeryTH96/bW7/alnj7TZFTqM8lr2Ib7QURD+u9V8M6rvmyJLr1vSOCAjb1LqNYJDXb2qg1UF5s6qqnK2QiIkDXXSqsQRp0m8lPnz11N71Zx3bAYOpR5pQa1JofEGEIF8yk0rU4yn026C8GhdR/eiXSzNMn/qgW7c3rPUSYv0xjEvmrGMDI0zCVUsmWK7cin7+0Xcaiw7EME4= X-MS-TrafficTypeDiagnostic: BY1PR0701MB1864: X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1864; 31:+lo8VVo8svE6LIIjj0m6mjztGs6p9s0e/MV088wtIWeOqb2AIAui2rKcPZ8Uqh4vIv6rbWjLTSeEL7KngHQcs/2aJxpwBZU7onkaJIT+Thz26SbbAqJMq/jODdVsRJEZP8aAH19RW6SNDaTzMw+SLjPl1pCAkL3efQRug3U26/hiqB+mDh3VMrNsOH8oMn4BcyNk+oxBkZFz0eJCV6ygJie5LC/TYFPjudKTwNo2FuA=; 20:MGsi9IPYfkN6dhmiIPuAY4efdK/KQAKHNXm1pl7R6pit73oP2N4gWQ/JIIlcSzW7LmApcFKaxFgT7KitpC3N0kVKt0l0PxacMgSh33aIjLiZkb6dW9CsduQRu50jQTwE5RowOSJEBtkm1cMi3P1uFKnoKSTqqaYtFRChSDcLt0RVv7b/4Bq+pCwX9DW9G551++9bCFaYvLoQfxBpwEa56f5Z3KvgxEjDOhd9m40doy1fut0/nUnHu827fN7FB9YOVpOcwlZGo69EIpVXveiDUt7i2BSbTz6iRQzq2n3Y6GMLbbn8sHMT87oFAPGYTOO0Hsj649XJFqDmcHAPpxU4KHe1uS9GFcKEo1F0GAmoqSIviUa3MxY+XO5UaYCayvX1HGsb3df640Q6JosXfEHhAvb/ghvLu4eP+zFYwhkJ/81DtAugPxYhlRCAMhgKukGRaGOFhPi86HBB0BxxAsMeOkrTody8ndD/mT+efxLxI/+4Xi+WqmgPF8WYOGMHifmHQfp4MzAalQNj9S0KN5pbkg6lzh6kJofP0ahpgZyyOz3ZeVowbO4MAQaVmYtexZ59/8pTBrclY+OkuvsYGH98nU29GgAlrgjsqS/BuHSEa34= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR0701MB1864; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR0701MB1864; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1864; 4:/mF6U6TrjaqC1mhwBxrKbFjPbaP0sGgQtKbMEycnVw+dxfw2UHk03x1wLhJEDlBH7GwSJHV82Nu9oh/646vqzn1oR7MrL64T3BDYi5YeD1jfqmfcbKM93O/f9TrpgW3eTO66V1osE+TuA4EQnM2JIK3XHMbz/7yJmcnFU1mPHZ4YB1Xf23kixhepGyeaQ1Xo1KzAsjj6PnDwBcqaKxVWbSMHlQGkYyQVFEnPAkR6n0VxH0QzdvvcKKVqawlw77jivbOkZJyQkh7sY8ob7TIKL3dp18Oy9ux4nr7x6sSFRKfWCD6a/JuzSRmQEDchGBDBFGY4pd2Mzxx38sRcrzUGdb9Mpkh+BULdEe2ttFuOI0gJJPCDM0MG4iV7P34JkKxCJooAnp0WPKxU1YE0SWLlodZ0QRcTNDYZrrumd61mWzTbzMp/jh8vw0QJih2FP5bTNgdTk8qDJ//uMQTZQeaq60wfbPKR96h1kMQ4LgI0Bgi0bgWkTCjbGMntUD2Nb+vmQcfMNEve64tFYePHqfSswBc0SvYTBqBJIS9BBY+LOHMXqzia6iKnKR6kcTEaYZsdNNATX6+pgQaWjvRvZi/lae0shp85tCWFQZ2cUG6JVFPd41Y8TwCbJlAko01mPOEs/wMchSPJfhoAaJleoRUeU+rdvf/nYN3tdmncMKGybqOlBsrTWlsw9Z3xnsuMs2bNg0BvvzYLr06NhT5SpRA5cXt9eieemVTqT6FWVFgIKhyHqY09t0YhkZ8UYKuinDTRQ6wUiY6t9VIUcoNNH97HOnfJRz2vTV/cwVkqWCuMRJWRl4x3RlfwLR7en1jLwuwz4fmHUnzryqvnqeuVri+A02Uvz5orVcqGdDX4R1Pd3vxyM1xchmlaWIiKLvtiMmzHnoGI9BifrR8zWqKZonnBznLrgbIdbixmAR3EGt89boXzxQHFBDrzem+Lq2L1GAGRAswanLKkOmXAqONB0sNeyxV+DEX4gC05OspalxB9qZ8nGwPAmlDo3B2v7O04ad6qcXnK6a/VFqylNwVpF0aIUy/pqiBQNX3O7s3y+eUpzdWUSx4soaw7xoDdl5bs0SWfo6msO5eOLfU6ierj74g2c+umqSWKTZK1HgCn1fH20DKLJleYg21oevyj2swHMJwz58J2o859aMY2bFkjdf00x9ITZlNl9B9ZNykw7g8wVQyZaQ6p58+31cFZv9TPLXEq X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39840400002)(39450400003)(39850400002)(39410400002)(39400400002)(50226002)(33646002)(7416002)(7406005)(6666003)(5003940100001)(76176999)(305945005)(42882006)(2950100002)(6486002)(8676002)(50986999)(42186005)(7736002)(76506005)(50466002)(5660300001)(81166006)(48376002)(6306002)(25786009)(54906002)(478600001)(189998001)(66066001)(1076002)(47776003)(72206003)(3846002)(6116002)(36756003)(38730400002)(53936002)(2906002)(6496005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1864; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1864; 23:G+eLLrglzV0sA7ohbayqVXutcMNugurGmGKebZax/ab6fxWLMjbWzc0LfWi4EA7XngzsAj5e4skT18JNwTF98hdPeX1dNuEtohJL6sfqU0nUhg/4HEkpT9qgtLkYikZrId/8LCyQbDPLg+daoBmNTj0FHXH8hLHcPu7zmmqAugrM01OQvgbywl8G7++LOMH+TK7Q5/xQdO/gZvLxbCUKbSCqd6cz6bNG+/FDdXEtXAkPGdBQllKfuIg4u85b0vvLb0YXrmtbHqMcs5fPljGcuYw1gkT9snCb087fIeSvn+L5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Y9/OykQ3aETkyeSROT/gSs5/8L0Z/KL7CYeFiv98ku/P9viTPJ21JIecN2t1GPnPwVa7ZYwXgvu5bNYupRGloMJC4dvd2HGI0Ta/Yz49mloSDDbjTf5/06556CzusKXh4ekhC3E8aAcFiCNcn8Y6CIRFv2oITt5q5YTVv0= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:53:14.0656 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1864 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After that, it will be possible to reuse it in ilp32. Signed-off-by: Yury Norov Signed-off-by: Bamvor Jian Zhang --- arch/arm64/include/asm/signal_common.h | 33 ++++++++++++ arch/arm64/kernel/signal.c | 93 +++++++++++++++++++++------------- 2 files changed, 92 insertions(+), 34 deletions(-) create mode 100644 arch/arm64/include/asm/signal_common.h -- 2.11.0 diff --git a/arch/arm64/include/asm/signal_common.h b/arch/arm64/include/asm/signal_common.h new file mode 100644 index 000000000000..f68238160940 --- /dev/null +++ b/arch/arm64/include/asm/signal_common.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 1995-2009 Russell King + * Copyright (C) 2012 ARM Ltd. + * Copyright (C) 2017 Cavium Networks. + * + * 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_SIGNAL_COMMON_H +#define __ASM_SIGNAL_COMMON_H + +#include +#include +#include + +int preserve_fpsimd_context(struct fpsimd_context __user *ctx); +int restore_fpsimd_context(struct fpsimd_context __user *ctx); +int setup_sigcontext(struct sigcontext __user *uc_mcontext, struct pt_regs *regs); +int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sf); +void setup_return(struct pt_regs *regs, struct k_sigaction *ka, + void __user *frame, off_t sigframe_off, int usig); + +#endif /* __ASM_SIGNAL_COMMON_H */ diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 5fa1b401c5d6..9f2ea60b9fac 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -34,18 +34,26 @@ #include #include #include +#include + +#define RT_SIGFRAME_FP_POS (offsetof(struct rt_sigframe, sig) \ + + offsetof(struct sigframe, fp)) + +struct sigframe { + struct ucontext uc; + u64 fp; + u64 lr; +}; /* * Do a signal return; undo the signal stack. These are aligned to 128-bit. */ struct rt_sigframe { struct siginfo info; - struct ucontext uc; - u64 fp; - u64 lr; + struct sigframe sig; }; -static int preserve_fpsimd_context(struct fpsimd_context __user *ctx) +int preserve_fpsimd_context(struct fpsimd_context __user *ctx) { struct fpsimd_state *fpsimd = ¤t->thread.fpsimd_state; int err; @@ -65,7 +73,7 @@ static int preserve_fpsimd_context(struct fpsimd_context __user *ctx) return err ? -EFAULT : 0; } -static int restore_fpsimd_context(struct fpsimd_context __user *ctx) +int restore_fpsimd_context(struct fpsimd_context __user *ctx) { struct fpsimd_state fpsimd; __u32 magic, size; @@ -93,22 +101,30 @@ static int restore_fpsimd_context(struct fpsimd_context __user *ctx) } static int restore_sigframe(struct pt_regs *regs, - struct rt_sigframe __user *sf) + struct sigframe __user *sf) { sigset_t set; - int i, err; - void *aux = sf->uc.uc_mcontext.__reserved; - + int err; err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set)); if (err == 0) set_current_blocked(&set); + err |= restore_sigcontext(regs, &sf->uc.uc_mcontext); + return err; +} + + +int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *uc_mcontext) +{ + int i, err = 0; + void *aux = uc_mcontext->__reserved; + for (i = 0; i < 31; i++) - __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], + __get_user_error(regs->regs[i], &uc_mcontext->regs[i], err); - __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); - __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); - __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); + __get_user_error(regs->sp, &uc_mcontext->sp, err); + __get_user_error(regs->pc, &uc_mcontext->pc, err); + __get_user_error(regs->pstate, &uc_mcontext->pstate, err); /* * Avoid sys_rt_sigreturn() restarting. @@ -145,10 +161,10 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) if (!access_ok(VERIFY_READ, frame, sizeof (*frame))) goto badframe; - if (restore_sigframe(regs, frame)) + if (restore_sigframe(regs, &frame->sig)) goto badframe; - if (restore_altstack(&frame->uc.uc_stack)) + if (restore_altstack(&frame->sig.uc.uc_stack)) goto badframe; return regs->regs[0]; @@ -162,27 +178,36 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) return 0; } -static int setup_sigframe(struct rt_sigframe __user *sf, +static int setup_sigframe(struct sigframe __user *sf, struct pt_regs *regs, sigset_t *set) { - int i, err = 0; - void *aux = sf->uc.uc_mcontext.__reserved; - struct _aarch64_ctx *end; + int err = 0; /* set up the stack frame for unwinding */ __put_user_error(regs->regs[29], &sf->fp, err); __put_user_error(regs->regs[30], &sf->lr, err); + err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(*set)); + err |= setup_sigcontext(&sf->uc.uc_mcontext, regs); + + return err; +} + +int setup_sigcontext(struct sigcontext __user *uc_mcontext, + struct pt_regs *regs) +{ + void *aux = uc_mcontext->__reserved; + struct _aarch64_ctx *end; + int i, err = 0; for (i = 0; i < 31; i++) - __put_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], + __put_user_error(regs->regs[i], &uc_mcontext->regs[i], err); - __put_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); - __put_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); - __put_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); - __put_user_error(current->thread.fault_address, &sf->uc.uc_mcontext.fault_address, err); + __put_user_error(regs->sp, &uc_mcontext->sp, err); + __put_user_error(regs->pc, &uc_mcontext->pc, err); + __put_user_error(regs->pstate, &uc_mcontext->pstate, err); - err |= __copy_to_user(&sf->uc.uc_sigmask, set, sizeof(*set)); + __put_user_error(current->thread.fault_address, &uc_mcontext->fault_address, err); if (err == 0) { struct fpsimd_context *fpsimd_ctx = @@ -229,14 +254,14 @@ static struct rt_sigframe __user *get_sigframe(struct ksignal *ksig, return frame; } -static void setup_return(struct pt_regs *regs, struct k_sigaction *ka, - void __user *frame, int usig) +void setup_return(struct pt_regs *regs, struct k_sigaction *ka, + void __user *frame, off_t fp_pos, int usig) { __sigrestore_t sigtramp; regs->regs[0] = usig; regs->sp = (unsigned long)frame; - regs->regs[29] = regs->sp + offsetof(struct rt_sigframe, fp); + regs->regs[29] = regs->sp + fp_pos; regs->pc = (unsigned long)ka->sa.sa_handler; if (ka->sa.sa_flags & SA_RESTORER) @@ -257,17 +282,17 @@ static int setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set, if (!frame) return 1; - __put_user_error(0, &frame->uc.uc_flags, err); - __put_user_error(NULL, &frame->uc.uc_link, err); + __put_user_error(0, &frame->sig.uc.uc_flags, err); + __put_user_error(NULL, &frame->sig.uc.uc_link, err); - err |= __save_altstack(&frame->uc.uc_stack, regs->sp); - err |= setup_sigframe(frame, regs, set); + err |= __save_altstack(&frame->sig.uc.uc_stack, regs->sp); + err |= setup_sigframe(&frame->sig, regs, set); if (err == 0) { - setup_return(regs, &ksig->ka, frame, usig); + setup_return(regs, &ksig->ka, frame, RT_SIGFRAME_FP_POS, usig); if (ksig->ka.sa.sa_flags & SA_SIGINFO) { err |= copy_siginfo_to_user(&frame->info, &ksig->info); regs->regs[1] = (unsigned long)&frame->info; - regs->regs[2] = (unsigned long)&frame->uc; + regs->regs[2] = (unsigned long)&frame->sig.uc; } }