Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3575334ybb; Mon, 6 Apr 2020 11:18:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKRhzArKb+5DLjMVAFppCUX7+ZEv0md/X7kdaWtSXEZuNgfYL9UL97eB+oit5cSDnUlE7G2 X-Received: by 2002:aca:b245:: with SMTP id b66mr419905oif.170.1586197111357; Mon, 06 Apr 2020 11:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586197111; cv=none; d=google.com; s=arc-20160816; b=Ttcl4K8d36sn+FAEvziv+fMQEZK21elLvSSYBxItg5J+rhIcsppx6DyjLCzWh+YPgE CIV+1qnPcrHTtOBd7Gh1TCBg0IxqM3OPH/i9c8QYU91E3p4CkIWRiimjxLXqMgQanQxj blQHIAuaS+pc5IpwnYRpBm4WVCuh/WM8cODnJ6mWxmX2kU3wOVlVjwM7vRTGa6wTjWmk YpAkKVOi3kJVx19eLdd2VH1YVGahx8O7t1jBjhmGZpWR1vVwaCKKb2My8JmvVgQGrIaW vZlfM9/Ox811iSIT0fqp/6ePwAzahSlmAxyv+KR4MjkGrlSIqhFBpmOItxCPbJkFU8x8 lB5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=stu09CrU2mn4pu91S8qHPEGE3iMjq1lNwJ59R5Er1jA=; b=myw42JXghgjX9J/P0Hl0+XF0uywUPf0PIXLDJqCXZguWsYd6lxbv0aCctNe+TIfC99 XULPZ5mqSrQ8qqtSXqq9RreLmsiY2QI6C0fnuBqWR3WBTTXfirXxVFTpQxfKCljDqOis Di0L4MtDc+xH7gGADQZa1DYcezIZnWUMlwem+FrRPceDQoXWqYFAF07Z5sgkpikYc1lJ zjfxrpoMV1gplV7Oka8a1UKZL//evLM2nXeMYyHEyfg7my/3mdNeQPhEVsEAGpt9Zx+K hvrje11mRPsPsgoaymgWEnhkC13OMJXXlwA3iv26c8AjLCXxmEpDo4JT3fohTE4NzZMJ XIDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=D2shqFan; 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 q2si164050otg.211.2020.04.06.11.18.11; Mon, 06 Apr 2020 11:18:31 -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=@c-s.fr header.s=mail header.b=D2shqFan; 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 S1727199AbgDFSQu (ORCPT + 99 others); Mon, 6 Apr 2020 14:16:50 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:3974 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727162AbgDFSQt (ORCPT ); Mon, 6 Apr 2020 14:16:49 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48wzJc2djQz9v09G; Mon, 6 Apr 2020 20:16:48 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=D2shqFan; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id fxS0gBU9cqes; Mon, 6 Apr 2020 20:16:48 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48wzJc1YWwz9v016; Mon, 6 Apr 2020 20:16:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1586197008; bh=stu09CrU2mn4pu91S8qHPEGE3iMjq1lNwJ59R5Er1jA=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=D2shqFanYO3jeQCNd9F05YYrZvMIoUWebmPaVR8JSNvO64GH35WBrf02totANfcAA oIQocUF8whPNmg99bmVdPvH9olf+e4xcV8PvyTt16yHfBqlY39Pl7rb/4l4JP2lx5Z 1CA2L1ewfKanaEwJWrqy9+V2dxCsEBvUsGAGPIAM= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1ADD38B784; Mon, 6 Apr 2020 20:16:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id RzjwhyypyaS7; Mon, 6 Apr 2020 20:16:48 +0200 (CEST) Received: from pc16570vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 91C7A8B775; Mon, 6 Apr 2020 20:16:47 +0200 (CEST) Received: by pc16570vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 633ED656E9; Mon, 6 Apr 2020 18:16:47 +0000 (UTC) Message-Id: <6f5cb16636ee153a43e0ca77a7b1cdfaa2d98355.1586196948.git.christophe.leroy@c-s.fr> In-Reply-To: <5aeaa33383e833f6eca30893fbd188b88e019eaa.1586196948.git.christophe.leroy@c-s.fr> References: <5aeaa33383e833f6eca30893fbd188b88e019eaa.1586196948.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [RFC PATCH v3 11/15] powerpc/syscall: Save r3 in regs->orig_r3 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , npiggin@gmail.com, msuchanek@suse.de Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 6 Apr 2020 18:16:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Save r3 in regs->orig_r3 in system_call_exception() Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_64.S | 1 - arch/powerpc/kernel/syscall.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 63f0a4414618..5ccb65f75712 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -114,7 +114,6 @@ END_BTB_FLUSH_SECTION std r10,_LINK(r1) std r11,_TRAP(r1) std r12,_CCR(r1) - std r3,ORIG_GPR3(r1) addi r10,r1,STACK_FRAME_OVERHEAD ld r11,exception_marker@toc(r2) std r11,-16(r10) /* "regshere" marker */ diff --git a/arch/powerpc/kernel/syscall.c b/arch/powerpc/kernel/syscall.c index 0ad4250d2ce8..dfd7b28239b8 100644 --- a/arch/powerpc/kernel/syscall.c +++ b/arch/powerpc/kernel/syscall.c @@ -27,6 +27,8 @@ notrace long system_call_exception(long r3, long r4, long r5, unsigned long ti_flags; syscall_fn f; + regs->orig_gpr3 = r3; + if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG)) BUG_ON(irq_soft_mask_return() != IRQS_ALL_DISABLED); -- 2.25.0