Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1202283rwi; Fri, 14 Oct 2022 14:42:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6N1l2RbRBVHSXnCGLGNFtkgJ8UCMcKmrnjB3fUFQEdNRiyripDVbOW0NMwMS71yLIl3cCj X-Received: by 2002:a17:906:ee8e:b0:730:4a24:f311 with SMTP id wt14-20020a170906ee8e00b007304a24f311mr6037ejb.420.1665783729240; Fri, 14 Oct 2022 14:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665783729; cv=none; d=google.com; s=arc-20160816; b=qYXDatbmouxGmYAwSfqnHYZu5Lpu1eKdLe3KnxlfOlVMpgSBocg6yIGEfmmJIkurbO o9WzFny68hL+R0XYyqxDOjT/DKTMjl/pxlrst8fipn8n5rub17FR8jOWXl/6/rgOlp7+ D8M+/iFPNfeLs0Gf5JLQwzP4ClH8L58XYL4FHSIxGXcY0TAvfmxVz2RVvN2Sp+EnLLnV r7m9VFdl0f3Z1LY0+EGIe/ppNT9kVG3zS2rShw1aSAI04Y2Dpybfe6cB27PZjeethO4i 523fh7CIoSG+feR0UqRhv5+gCWcO/4+nkt9sEWrDA+rkBJxNtMGpsnq6DWyoZDA1xPlQ TxLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZtyUIi+6avwM7c8X31O2RMuS2EtCUpJ9STMvLNMiuE8=; b=Zm4JrqRX/HcKpHnaBREFMo/0I3Hngf8ZyqDA+FHK09gsujdxBtQjJWvT/axkTkXwtK 67a0AP7TkloJkmoPM0jfTwWEOKHXYB4KO9pBAep+k977Doh9hTiQ5WuJ6bxDZ0zgwbrZ RgTE0CnBAQcQle2My3F/26jG/qa65GGNGRziPyH1d0KFs0fkV+RaTNkfnCS497gPTtSy QuKTdFTah9F55A5jO1CSnabiESv91s7TxwQWhIUt+8doV2imP6i/TgMSFHxAIsHDgVn3 kS3b5iN4QrRwU5GxMCej/UBgpGMnKVUyZ+6gdDlxRtqX2c/vQ/kWlBwB2I5qoBB4IDNo Lfiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a056402348a00b0045901aa2468si3896696edc.333.2022.10.14.14.41.42; Fri, 14 Oct 2022 14:42:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229832AbiJNVYY (ORCPT + 99 others); Fri, 14 Oct 2022 17:24:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbiJNVYG (ORCPT ); Fri, 14 Oct 2022 17:24:06 -0400 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BDB11DDDC1 for ; Fri, 14 Oct 2022 14:24:03 -0700 (PDT) Received: from localhost.localdomain (178.176.75.138) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.14; Sat, 15 Oct 2022 00:23:09 +0300 From: Sergey Shtylyov To: Oleg Nesterov , Michael Ellerman , Nicholas Piggin , Christophe Leroy , , CC: Andrew Morton Subject: [PATCH 10/13] powerpc: ptrace: user_regset_copyin_ignore() always returns 0 Date: Sat, 15 Oct 2022 00:22:32 +0300 Message-ID: <20221014212235.10770-11-s.shtylyov@omp.ru> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20221014212235.10770-1-s.shtylyov@omp.ru> References: <20221014212235.10770-1-s.shtylyov@omp.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [178.176.75.138] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 10/14/2022 21:00:39 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 173137 [Oct 14 2022] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 500 500 6cc86d8f5638d79810308830d98d6b6279998c49 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: omp.ru:7.1.1;127.0.0.199:7.1.2;178.176.75.138:7.7.3;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1 X-KSE-AntiSpam-Info: ApMailHostAddress: 178.176.75.138 X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 10/14/2022 21:03:00 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 10/14/2022 3:23:00 PM X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this anymore... Signed-off-by: Sergey Shtylyov --- arch/powerpc/kernel/ptrace/ptrace-tm.c | 10 +++++----- arch/powerpc/kernel/ptrace/ptrace-view.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace-tm.c b/arch/powerpc/kernel/ptrace/ptrace-tm.c index 44045363a903..210ea834e603 100644 --- a/arch/powerpc/kernel/ptrace/ptrace-tm.c +++ b/arch/powerpc/kernel/ptrace/ptrace-tm.c @@ -170,9 +170,9 @@ int tm_cgpr_set(struct task_struct *target, const struct user_regset *regset, (PT_MAX_PUT_REG + 1) * sizeof(reg)); if (PT_MAX_PUT_REG + 1 < PT_TRAP && !ret) - ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, - (PT_MAX_PUT_REG + 1) * sizeof(reg), - PT_TRAP * sizeof(reg)); + user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, + (PT_MAX_PUT_REG + 1) * sizeof(reg), + PT_TRAP * sizeof(reg)); if (!ret && count > 0) { ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, @@ -183,8 +183,8 @@ int tm_cgpr_set(struct task_struct *target, const struct user_regset *regset, } if (!ret) - ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, - (PT_TRAP + 1) * sizeof(reg), -1); + user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, + (PT_TRAP + 1) * sizeof(reg), -1); return ret; } diff --git a/arch/powerpc/kernel/ptrace/ptrace-view.c b/arch/powerpc/kernel/ptrace/ptrace-view.c index 076d867412c7..ca0bf8da48fd 100644 --- a/arch/powerpc/kernel/ptrace/ptrace-view.c +++ b/arch/powerpc/kernel/ptrace/ptrace-view.c @@ -267,9 +267,9 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset, (PT_MAX_PUT_REG + 1) * sizeof(reg)); if (PT_MAX_PUT_REG + 1 < PT_TRAP && !ret) - ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, - (PT_MAX_PUT_REG + 1) * sizeof(reg), - PT_TRAP * sizeof(reg)); + user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, + (PT_MAX_PUT_REG + 1) * sizeof(reg), + PT_TRAP * sizeof(reg)); if (!ret && count > 0) { ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®, @@ -280,8 +280,8 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset, } if (!ret) - ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, - (PT_TRAP + 1) * sizeof(reg), -1); + user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, + (PT_TRAP + 1) * sizeof(reg), -1); return ret; } -- 2.26.3