From patchwork Wed Sep 21 21:07:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 12984169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3107C32771 for ; Wed, 21 Sep 2022 21:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:CC:To: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+RMPXETnmcnrMzZ6XGnajYwYyzu0/CgkzaQ1YEwNP+Q=; b=VWbMWtOFvKFya8 KSF63MfhHFEm/3aSNUwoyLxWjjCEQQgogXSduT+7lt0L8zl0Q/I2aJgOTG3PGyaLPsr8d9doAPwN+ 4Ze6DB2+psa+9iVAodFrONQsAf5SHcLn97cVInkB5lQZwaGG7MCuEohHhMEYbV0fAKyglXLjNmZxb +lJKIVjsB/Mlj+kIzd1D3SHqWCIlwVbtP+NB/TWALPksH+LO2KZB1YQZukf+Vu1CSutLMV2oS8d3j B/60sIc7Idix/wrwuwyCAdWMYL8UxOYYi8lY0Z0YaoQ1lfkv52uCP98XFK5rCFN0jKgfeODS1LxdM 9/ROQ7xVgE9AN9ICSjkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ob6x3-00CfMf-2V; Wed, 21 Sep 2022 21:08:13 +0000 Received: from mx01.omp.ru ([90.154.21.10]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ob6x0-00CfJH-0m for linux-arm-kernel@lists.infradead.org; Wed, 21 Sep 2022 21:08:11 +0000 Received: from [192.168.1.103] (31.173.85.169) 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; Thu, 22 Sep 2022 00:07:52 +0300 From: Sergey Shtylyov Subject: [PATCH] arm: ptrace: user_regset_copyin_ignore() always returns 0 To: , Oleg Nesterov , Russell King CC: Organization: Open Mobile Platform Message-ID: <75b5a103-2548-7eef-dd2a-5f08057f3693@omp.ru> Date: Thu, 22 Sep 2022 00:07:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [31.173.85.169] 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: 09/21/2022 20:53:31 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 172833 [Sep 21 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: 499 499 6614d57ea7c6ac2e38ef0272e2cc77f73b9aae18 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.85.169 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.85.169 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: omp.ru:7.1.1;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1 X-KSE-AntiSpam-Info: ApMailHostAddress: 31.173.85.169 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 59 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: 09/21/2022 20:57:00 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 9/21/2022 5:26:00 PM X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220921_140810_107837_96999000 X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org user_regset_copyin_ignore() always returns 0, so checking its result seems pointless -- don't do this... Signed-off-by: Sergey Shtylyov --- This patch is against the 'for-next' branch of RMK's 'linux-arm.git' repo... arch/arm/kernel/ptrace.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) Index: linux-arm/arch/arm/kernel/ptrace.c =================================================================== --- linux-arm.orig/arch/arm/kernel/ptrace.c +++ linux-arm/arch/arm/kernel/ptrace.c @@ -651,11 +651,9 @@ static int vfp_set(struct task_struct *t if (ret) return ret; - ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, - user_fpregs_offset + sizeof(new_vfp.fpregs), - user_fpscr_offset); - if (ret) - return ret; + user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, + user_fpregs_offset + sizeof(new_vfp.fpregs), + user_fpscr_offset); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &new_vfp.fpscr,