Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp48878imu; Thu, 8 Nov 2018 14:33:20 -0800 (PST) X-Google-Smtp-Source: AJdET5eK4a0yBTFOm2ozrUWHJ7E9IMnYQugL5azGWt9JxO1qC5HBp5dO17lUWq6wRwkM40V7UuuU X-Received: by 2002:a17:902:2867:: with SMTP id e94-v6mr6318640plb.317.1541716400489; Thu, 08 Nov 2018 14:33:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716400; cv=none; d=google.com; s=arc-20160816; b=mVk9Q+4+eEm8QDyb2HYkRdrPJvwo8+US55PNpzT3HIstCBFvsCFMQY36jTk4A62SSh vJFRoqhh5joNjbeDF1y6kQ1tWuqbqY8bThyBo7l3o5lAn7gLgX0SkEgKBwiiGCmOeG9C YtARwjtjutNOQzA68bZC7rP2/Pbep5cP3i6Hhcbc2viJPciqjLg16NgXcGbm8skVTFeB 3aPIwa9JTijiehlxNcLD3OPhpZ8k/nA+zbYCCyvXuv66KPgPfI7sg/2FWtID4bf+Yisu mRvyUxsqH3qyN46sJZnPnDLE9srr3rZFKOabnHe51qq53G8y2PpnaXICDSvPYCIXRIII cYxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UChRqnGkc24fX4IJRsHQ/TRq7vxWjzvIxdjF5SEx2Mk=; b=B83GaqaphW35ZBGq4MW2hJhYH2o+2M3VXRqUTVDzFTRFKtoLCPDuCmAFaVwp+xQjwp Wb8Pf6x/18MDrikCIyZgvCKvD/yZ1CR3Ld27ICPUBB1vF4Ie0JGmmDRQ2LRQbi4/A1lQ PAuP5BNhHhD+1c+zHvMk0CqL2uJVJoIRHVQcqXwzGbnqt7C0bJw/OToPXwySkclqAqfb sRGu2ewzZz++Mzs259LDC18WAWvFyRcwBCGUaLgRnpudWI9fIqAlAhMhRrc8/BBtg0eS qCYLF4RlybSdILO5ZOEkBP7HYFGEb0K4yNrX5R1Qi4vrGG9PCbGFbwO2a/f06Peem2Pl kKWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hYHym9iO; 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 m9-v6si4438543pgi.580.2018.11.08.14.32.42; Thu, 08 Nov 2018 14:33:20 -0800 (PST) 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=@kernel.org header.s=default header.b=hYHym9iO; 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 S1730378AbeKIHhk (ORCPT + 99 others); Fri, 9 Nov 2018 02:37:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:56262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730355AbeKIHhj (ORCPT ); Fri, 9 Nov 2018 02:37:39 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8A94C21019; Thu, 8 Nov 2018 22:00:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714410; bh=ZbbFDmERkOV7ECm/qeUtql0NE9WKa+uBclNyFssZzgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hYHym9iOeZI9K3vYZMbQsfikuY3ydiPYS6qmDFPd5nij7/umVqQ0X9zSrIkZLt++t +wr0S67adGLzoa2Lc72kq8C5yW89Kx0ovrY0eGqZKOCknGSwomk59IfZ1CxHGuuPIR njVhVZ4gjgmPSBrUpE4CQo50w3Ug1bWAsrqNM4II= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikael Pettersson , Sam Ravnborg , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 068/114] sparc64: Fix exception handling in UltraSPARC-III memcpy. Date: Thu, 8 Nov 2018 13:51:23 -0800 Message-Id: <20181108215107.197539654@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 0ede1c401332173ab0693121dc6cde04a4dbf131 ] Mikael Pettersson reported that some test programs in the strace-4.18 testsuite cause an OOPS. After some debugging it turns out that garbage values are returned when an exception occurs, causing the fixup memset() to be run with bogus arguments. The problem is that two of the exception handler stubs write the successfully copied length into the wrong register. Fixes: ee841d0aff64 ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.") Reported-by: Mikael Pettersson Tested-by: Mikael Pettersson Reviewed-by: Sam Ravnborg Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- arch/sparc/lib/U3memcpy.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/lib/U3memcpy.S b/arch/sparc/lib/U3memcpy.S index 54f98706b03b..5a8cb37f0a3b 100644 --- a/arch/sparc/lib/U3memcpy.S +++ b/arch/sparc/lib/U3memcpy.S @@ -145,13 +145,13 @@ ENDPROC(U3_retl_o2_plus_GS_plus_0x08) ENTRY(U3_retl_o2_and_7_plus_GS) and %o2, 7, %o2 retl - add %o2, GLOBAL_SPARE, %o2 + add %o2, GLOBAL_SPARE, %o0 ENDPROC(U3_retl_o2_and_7_plus_GS) ENTRY(U3_retl_o2_and_7_plus_GS_plus_8) add GLOBAL_SPARE, 8, GLOBAL_SPARE and %o2, 7, %o2 retl - add %o2, GLOBAL_SPARE, %o2 + add %o2, GLOBAL_SPARE, %o0 ENDPROC(U3_retl_o2_and_7_plus_GS_plus_8) #endif -- 2.17.1