Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1000015ybt; Tue, 7 Jul 2020 05:36:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6oXz/H9i90fZUnkzCX95p8Vw+4LcSpy+oTnw52oc7RTokNOO/AbR6Mq/HvmrAIuRM0dV2 X-Received: by 2002:a05:6402:228d:: with SMTP id cw13mr61902933edb.343.1594125383335; Tue, 07 Jul 2020 05:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594125383; cv=none; d=google.com; s=arc-20160816; b=SDbV1IH+qflinJglzV/ETEhp2K4+iflqnqKQpgPJoeZUJmtVF76oxL1Vdso1Aay9cv htKE5CnjLcLnICi+Pvp5D+gzCWawU4s7GP2v1Ovlacccuc+mhwpewXMweUP7eNSkZEkA Bz8Zmt/6WWiQxkm1+9rfonXrPQP7A424IPGh0UIQK9q/Ajz1dE5oyk9fHHsfvORppcVH 5K7u/jTDHFkC997cm8jVnkIhsSBVqXRFQjQ0SDF2NqYnNGX90Yde+fwylG8pwKcTDiDs h5UbVzI4VLeFvw8BLYU7G8qTvvcscbPXEIBNpPAQpn5BAd29KdC0b+C1q6RedvozVSw2 c8sw== 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:message-id; bh=6KkyOtn9J1o7CrYlkHfn+tJ1QtgIByQiSGCnykgnsGI=; b=m/ofDO6jnhOHCYupJs2ehqWrqRvkXeEZcS4UMLMg9qEu2FXNyjDx+MHMWOtXsYFcM7 53NpEXelewRGCvLEdkmOjk4tKSTQMyQwQrgs5uYAr2OActnKY606ST8lJ2Q9ENrNLBYm wFB5QRaQZHuON1eaCex2DPZ9ZrcPdJDu1zFFxhp8SL0y+7TzFBfzvkM0zo4B57y1B7dd aDupQeE5HgLoqQO8betrOeGX9VArS1UPXgxXFuUi3GqZlmxUoOP/BcOl54l8WL8IeMmo +VUm9ehQN6q8Y3dHUCGCHUU7f8LJf8BOFiLR/WKgX/R4fW6M1OyfgjriGSduuyDBqluo a/PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si13722512ejb.579.2020.07.07.05.36.00; Tue, 07 Jul 2020 05:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727003AbgGGMdj (ORCPT + 99 others); Tue, 7 Jul 2020 08:33:39 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:49449 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726805AbgGGMdj (ORCPT ); Tue, 7 Jul 2020 08:33:39 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4B1ML61wP0z9tySt; Tue, 7 Jul 2020 14:33:34 +0200 (CEST) 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 bhDiDSnff4fv; Tue, 7 Jul 2020 14:33:34 +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 4B1ML60m90z9tySr; Tue, 7 Jul 2020 14:33:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BA3858B7E1; Tue, 7 Jul 2020 14:33:35 +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 JtV9cE63Lvdx; Tue, 7 Jul 2020 14:33:35 +0200 (CEST) Received: from po16052vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [10.25.210.22]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8CCE28B7D7; Tue, 7 Jul 2020 14:33:35 +0200 (CEST) Received: by po16052vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 77128658EB; Tue, 7 Jul 2020 12:33:35 +0000 (UTC) Message-Id: <173de3b659fa3a5f126a0eb170522cccd909950f.1594125164.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH 1/2] powerpc/signal_32: Remove !FULL_REGS() special handling in PPC64 save_general_regs() To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , npiggin@gmail.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 7 Jul 2020 12:33:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit ("1bd79336a426 powerpc: Fix various syscall/signal/swapcontext bugs"), getting save_general_regs() called without FULL_REGS() is very unlikely and generates a warning. The 32-bit version of save_general_regs() doesn't take care of it at all and copies all registers anyway since that commit. Moreover, commit 965dd3ad3076 ("powerpc/64/syscall: Remove non-volatile GPR save optimisation") is another reason why it would never happen. So the same with 64-bit, don't worry about FULL_REGS() and copy all registers all the time. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/signal_32.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 1415c16ab628..0fd59fbc6d49 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c @@ -109,8 +109,6 @@ static inline int save_general_regs(struct pt_regs *regs, WARN_ON(!FULL_REGS(regs)); for (i = 0; i <= PT_RESULT; i ++) { - if (i == 14 && !FULL_REGS(regs)) - i = 32; if ( i == PT_SOFTE) { if(__put_user((unsigned int)softe, &frame->mc_gregs[i])) return -EFAULT; -- 2.25.0