Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3016776imm; Sun, 1 Jul 2018 10:22:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfFywomNJbenly1Uw1KKD0PEQEEofPNKfNRaGhBi8ZOmIvQk0Lbcxj4v4m8UBq8CpYD7uET X-Received: by 2002:a62:9541:: with SMTP id p62-v6mr3050627pfd.152.1530465726977; Sun, 01 Jul 2018 10:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530465726; cv=none; d=google.com; s=arc-20160816; b=Z2ZByr29SPZFp4wgaRm17iPiR2Y6vEstU9XEeyeFFuxk91HEK5k8U6s2gqOannIFMc JoxofHXXpGTVJrXAZvwGbIfwqIEMw8ZyOa7pvgCqn1XT7w9f9Gp45RHwhoIflfbROA9J Nm69yDQG26Vp/3zr+ASFFaafebiTmaroLI8yzf8OrQfb+m+AtwRT9DEGcnclQv/UDZAY PUonlVN1iEzQJCuVbCc3g8eqFaZbWH55RMfQWu6/c6OrVVzBWKTVz27vEuKk1SxIKsFE 0dz8XXq6VadRZJkFPBMFI3xwuy160WmGPlMnks1iLwngYminbKgWBe6n8Cf2w04WIStR +Y6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=XZutXYCLS9i19dg+zEZOnfLUeYAc1GSlFp7mScLBr6Y=; b=hAUB9yJvGj5k3TLU729+o4N+h+NAnmr4Gnn1xk0w70P361/oU9UfexnV5Qhbdhwb7b 5S2DeV/aqoaoUOzJs9zyIdRdzyPsrrQFgyNjERjt3f1wU6ePJlf86P4sxBhJmPBxKE4U bHrESrE+PsPcUCt1vMxxmCivTDvy87kDMwfwJYwk1Hwq49RdjBlI52iyXAnryh2+YJlW T3gZwph+AAM2+LnI9NvkjhkvG+O+PyRPmunpC5rGE6GlV6dwYz2zLLQDnO6/zUAaxyND iAwTUCy3wW2Cn3ym1L+efOtGavb3s4DjRIJTvYuSClWsuNssQyLzKPofy1v3FkXxj7eX 4UAg== ARC-Authentication-Results: i=1; mx.google.com; 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 s126-v6si15012998pfc.222.2018.07.01.10.21.52; Sun, 01 Jul 2018 10:22:06 -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; 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 S965518AbeGARUC (ORCPT + 99 others); Sun, 1 Jul 2018 13:20:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36766 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031345AbeGAQim (ORCPT ); Sun, 1 Jul 2018 12:38:42 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9A97892B; Sun, 1 Jul 2018 16:38:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Haren Myneni , Michael Ellerman Subject: [PATCH 4.17 050/220] powerpc/powernv: copy/paste - Mask SO bit in CR Date: Sun, 1 Jul 2018 18:21:14 +0200 Message-Id: <20180701160910.418692598@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Haren Myneni commit 75743649064ec0cf5ddd69f240ef23af66dde16e upstream. NX can set the 3rd bit in CR register for XER[SO] (Summary overflow) which is not related to paste request. The current paste function returns failure for a successful request when this bit is set. So mask this bit and check the proper return status. Fixes: 2392c8c8c045 ("powerpc/powernv/vas: Define copy/paste interfaces") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/platforms/powernv/copy-paste.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/arch/powerpc/platforms/powernv/copy-paste.h +++ b/arch/powerpc/platforms/powernv/copy-paste.h @@ -42,5 +42,6 @@ static inline int vas_paste(void *paste_ : "b" (offset), "b" (paste_address) : "memory", "cr0"); - return (cr >> CR0_SHIFT) & CR0_MASK; + /* We mask with 0xE to ignore SO */ + return (cr >> CR0_SHIFT) & 0xE; }