From patchwork Tue May 24 00:04:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 9132575 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 A74BA607D3 for ; Tue, 24 May 2016 00:20:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BB3A28237 for ; Tue, 24 May 2016 00:20:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FC4E28252; Tue, 24 May 2016 00:20:15 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E872628237 for ; Tue, 24 May 2016 00:20:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b504B-00024o-Rc; Tue, 24 May 2016 00:19:23 +0000 Received: from mail-bl2on0095.outbound.protection.outlook.com ([65.55.169.95] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4zry-0005hC-Hj for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 00:06:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=V6hQv7+SqRMlE9+gejajJDLdPiRcYKQf4Qs1oOE3uOM=; b=uZny7CXtEDyb5Cbja4LUdWkKkIdvcNtwjdUF0Ti4+Skz14Uty8lh4TOFJM2tSdRKgGtnGBhaEx/z3JkX25Et/t2t4t+ZWoPrrpbVh7bkM2/jVYDrqfuaIa6mNpdy4lsyv1xfFJZ96h7Ekq8WNOSUo8VDVzkOpJ1SEXyFeSIbRBw= Authentication-Results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (50.233.148.158) by CY1PR07MB2230.namprd07.prod.outlook.com (10.164.112.144) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 24 May 2016 00:06:16 +0000 From: Yury Norov To: , , , , , , , Subject: [PATCH 19/23] arm64: signal: share lp64 signal routines to ilp32 Date: Tue, 24 May 2016 03:04:48 +0300 Message-ID: <1464048292-30136-20-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: CY1PR1201CA0037.namprd12.prod.outlook.com (10.169.17.175) To CY1PR07MB2230.namprd07.prod.outlook.com (10.164.112.144) X-MS-Office365-Filtering-Correlation-Id: 122ca0c9-996a-4556-3248-08d3836739b8 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 2:NwcIHZG0JoCLyG3gB2uLLySYsCo+fg1oMwds4zPtCzlLFZuzH6tMFXTMb8hgkPe3/vKSl5zzj3oS3YtlOjpc/vkwqNceFcDvgDnoo8n51vX87wk66AFki1M1e9Ku1uKMuP3I1xokHgXyvsAvKmszB+m9u1Bea/rDqIfG4qC1U8h4LpojaC2S23xwL2xHh41B; 3:rCOVQ0avRDnvGyScPp3N52C6NOcIJ2sxOuv0zaQ5XA3LzglAlHSpGNgjvErNWsZn31b/BXKW4EOsJGyMLuGWT56A71DMWzu0prEDgWZ90ZYmPJscHk4mjiEe+GmsPRCW X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2230; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 25:CRoety3ASxJFlvISsdJcXq4DsZ7LN2NY0S5GzhRYIa45X69qMYqG+DIVZW5PeJ59A7yJvobmEXLTOeR7YxZ4e628QHuTLuSNJ2rhX6IORb2juQNUmuXBdEVuuhOaUeohdstQdUh2wZTyp6bJ3OgTEZ2KlpW6y7fhd/PMzBHD759pLipXqX/egWfhUglhWMm074POVHM4yJut25EhtXMxNfB5477Pg8j8CcE4i9nbjgUwCKf7pNzMTGD8POmj57nZT9bh42GT1l51uTh9uHKYzSNn14/gZ2NUhFklbA2v465h1sTg1qCYkk+xcon3lMUXQCSTEJ2CPiokriFBiHhhLa3ev+HfmZ+FXe5ZbCfRPJX80ZIc3FamFtH9pujf1xNCu5pzVsFzZ4gdWgv9WYFOKSbXVxZIhagk+KlcQnfHgk8nTD5D8mo/hKGwEt3mODd5/cfix7LsN1w8FlHUWxT8ZQT52C/G9Y2Ap79eb30ZGNj9CJF91zA8VfSHG+ZACXCtJksjE37vbflM+XPrbQbG2OJhUBCYlZAn60A9PVI9IOfwCOsjseQiF7uAu6uILje58JEsFxP7aCIV1FMHPk+FPKyN0EDLlm3SO8NjcHQUGjlrTKOTmXsD5QuoNJlXQC6UrIC8ZkFCQ645VG583escBPqWvho1G3im8FcEUYt19MH89xQN7qpygXzylf2Y89J1bOpWzS30syZ9OA6Xa8TYrqDVD8ovmf+tORF2ReU0+JHZ6cQs1DBWVCxX56UVipHsfHU2NjTt1TfLs17wMmjmHSRy+XgcUTg3B/lCOjESgJv5U4fnx/FO2VFdfxoQM2nomHGaGgN+d3u11Jogxsd/2rnDfzmr7I2ivKk89Mdnbsqn4QHtSnFbnGYHaRzOvE0c X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 20:N2s+Msewdw9wlGN3KkSipOM51ebfi7corEQbQ4JK17Pe9wgAClraPlxSgEcIqCYKJzTDd22rujlbBrVRq+LW9m2sYnD/netCLZRZ5qHjlUg0eSR1VttsccRFC9HOJiHacJZTKfUdRg/7HANoLQPdP9AompMazPvEX4sMKrjJe+2Od2qlijW6DTaoYlgponL0SCxVetMsu87oboUeaMHREvarqmFBGpcrBq6JGoYXeHaaoL6xLoUUM+TM7lAQ4ndmRZbCngqZBcdziFFGCRCoyWnQpMMthlZPiUB1fS55IqTv1Lox4BOw4nqZEMdjY9JKwi5ykEZpZZFXw341aTZbijlf8KtAWx5gln2FnBl/npabWYdwOgf51R8H/J0ptVDayFU+mMxWkEKthv3ZHKshdbtQiExmwUgyDTQVV3uDehKswB/iAoOcsW8HNBvl8W6fDnUliYyjaMAclefEbM2OQ7Xt+0tJ9qr5Ua5X1SeRrdRSAQ1nr7KKUpR/ZvCFiigmKV7BrGsdh3WcVIWD9IR+NTXKRNRmHryzei/r+waPm1Bsd59Z0rxmmS/RbvE/UhBKn/uyhHUIL4hAbIYB1ygz9MkrK2V5T6v83AVRPABX9C4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR07MB2230; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2230; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 4:PFk+b0Cc+xjyRFxBsOl3UM+WRs4WiilTmpZhokw0rfgn1tOhEoDNFx5TqiH++XFSTMdcl51LPJZvnT0YL8ueyw/yG+fl3mgNrXHrt+60IF+WJlb/SJm/S578wwqQi5C1pTippbLmZklZRcA4tWRHyKQ10CUs9N2cLhzW2gGy8mkFrdvPG6UXXxV7WL3hIxECwBy3ajo5RirjVH5YDzPb9pfFAlbEde6/v5FqpaErq5TxshD3XDIm8ALQJyEmTbZYQIa1UyfjivC9EBFEHITD62dQfoipFwYMecIt81iL8141SwkUqsvjgc8jIPrLjqMx/ew54YGtL2/lWHLQVHep686La/Y/G64fWkZF2BbuJaRHLL2Nxa5Iu/9/rmnFSqi8 X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(19580395003)(36756003)(5004730100002)(19580405001)(5008740100001)(2906002)(229853001)(2201001)(586003)(47776003)(33646002)(4326007)(66066001)(6116002)(76506005)(42186005)(92566002)(15975445007)(77096005)(2950100001)(189998001)(5001770100001)(81166006)(5003940100001)(76176999)(50986999)(50226002)(50466002)(48376002)(8676002)(2004002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2230; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 23:IuCFgy4ixUqgieWd0xUmO73ueo/s4l/uu1HJTO8F1q2hPPG2ECbi0R752CTARmaC+rvzX5gqjK03wjBYWXJY0ssMZ7OFpTKi61MF742EDPOIH5NkTl0LFWrfFVE/SiGcHB5RHyU34HqU+93uAkG8hE6wFh4J9ZR1wPhuUAAWzuD/w4qHETEbwWynaa1nONN+L1/ovr8LMeuz8HEeM4Kmw4yHx2k1erPh+mw5TdLN0NkcZANEO/LatvbBlasi7mls3lldbOn3taHeMXPPCJUeVTIAPmyCV6aut/11trwmLIBlM1Ayq4ZHBb0s19kDX7fXYn728KZuX4AMcPY9+O6BpJsYUct+OXLvyAfUcCB4H9aKiduq9lOdcHBnb0qUFw2n0nOCj4zaA8NgwFmrDA3z9f4Vf4fLg4eRUp9KVqjERoQVxDK/GIO4uMSnAW4nAS6ZVcTt48BCL9qEDMGVEuVm8Yc9ObXTJaRDYH37WeKAykNKjN0KZCL9ijCZfBFHP/9bHHYI/4onVid7SMp38l9l85xbErNOzEVod/MeOpsQ2UEk8Yf75Rk7S/y7YBQ0dl+dDKEGWCZhx76GSXE5DSzi6hJAIGMKxSzA30bkVoeUMP7SyXLelHdKJJUr1Q4LaETadKitSVGYVphLRjuvBG/LFuzYjxFiRxB1nPLwxEsPFfqgP6lQ/1GP4dKiCRicuHYlgS7Wy1aJ4hrIKxXM7b8ez6D31JzpDTqMsK3sUFRo9lGlRY6bvfXVFLw3JrziHug1yugJDAL4Mk3Sut7KMdIPoTJq+429Ewj1b+ji9wlidRJVmE8o0TaNeRScTTgg6ksuA1rWRXH5pM2gu83pUZLPmzXM3wm/xzX1pZiYrP3+dDYCX3RjizAuZNXCFFemeHFt8rQoW7jO4T091lfwYs6/9OTq7l5YagiiC3fajqv5ONyQX0YcYVdQtacD+kBcVSzD X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2230; 5:wQISaUlEKcsupZOgbPov3FCSm99Y0o0vfBzbsV5IcXyrsihtRMVAFbJ7aqhcchNcKSEj9u9yP+TiuyqI/sVpNyUIKvbB7/BP/379+Iqnip0xjoY6YlzjcRaUttyeurwPCwWCi6VdND4bq62Vk//BFQ==; 24:ggMKEkoboVBkj/MtqlEtzyJQQghXbBlu0wuhGHfSztkic4JyImG0Sa9aJDUWv6AV3A6YYeoLQ+iY9ixCbvndqviI94z+VJWH2HwzTkiTfMA=; 7:PY86Uy7hEDCJf3W5U4FjZC7HeOFmTCa+qUXwYcbHfWMoanONK3NkD79Hfbaj6EQFEisWHEpmTyVCNPofTWZ2Bzm9Q9isXCswkk4HNA1EMccSyLJAJHM1SQ1UXBVN1JGeXnuzctiuZTz65TJnXDHvJLJ2btKWbLPxSebMLf9lyfgE7WurKqX41kwESix6bek+ SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 00:06:16.1052 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2230 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160523_170647_145313_22CA8EB4 X-CRM114-Status: GOOD ( 18.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kilobyte@angband.pl, pinskia@gmail.com, szabolcs.nagy@arm.com, Nathan_Lynch@mentor.com, heiko.carstens@de.ibm.com, agraf@suse.de, geert@linux-m68k.org, Prasun.Kapoor@caviumnetworks.com, klimov.linux@gmail.com, broonie@kernel.org, ynorov@caviumnetworks.com, schwidefsky@de.ibm.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, joseph@codesourcery.com, 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 After that, it will be possible to reuse it in ilp32. Signed-off-by: Yury Norov --- arch/arm64/include/asm/signal_common.h | 33 ++++++++++++ arch/arm64/kernel/signal.c | 91 +++++++++++++++++++++------------- 2 files changed, 90 insertions(+), 34 deletions(-) create mode 100644 arch/arm64/include/asm/signal_common.h diff --git a/arch/arm64/include/asm/signal_common.h b/arch/arm64/include/asm/signal_common.h new file mode 100644 index 0000000..756ed2c --- /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) 2016 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 be02f65..f9fbf8a 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -34,18 +34,23 @@ #include #include #include +#include + +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 +70,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 +98,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 +158,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 +175,36 @@ badframe: 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 +251,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 sigframe_off, 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 + sigframe_off + offsetof(struct sigframe, fp); regs->pc = (unsigned long)ka->sa.sa_handler; if (ka->sa.sa_flags & SA_RESTORER) @@ -257,17 +279,18 @@ 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, + offsetof(struct rt_sigframe, sig), 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; } }