From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8F95C282CE for ; Wed, 24 Apr 2019 14:39:52 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8826D21900 for ; Wed, 24 Apr 2019 14:39:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SCsiYXHr"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="2FcrqC6M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8826D21900 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VeTXx4OM+TFB+4FEWJ+ZxJPu7U0JT0Fymz2kZKQ/DMo=; b=SCsiYXHr7KMjkW 7PgjBci4dK5sxOSPsUyVLHNto0GiWk7Lf6+IIZDmzKt62mdez5uoXwE7cOi6S/KOKuIq77UVSHzMg kaEe5mSshlH3ky5jkzVMsehHVmbMYI4mpDBKbs9ihReJwN9zzHoL2zKhs1gRKtt5HKApL7zpgXtja 3OZd3X1211/kOCVRMgPB6RudlmsQ7kBTXnyONcGQXf5k1o8U+mjQoteVduGwomRQp0AEG45qzj8l4 3YORHm5zInrGzRFEHcWtYqo2A/AddDD9xd3+mH6r8r7LENW91bznKeYRah2B18phuysORiWDpNZx8 BL3woNN5zo1Gh8vWi5QQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJJ3r-0002uO-9Q; Wed, 24 Apr 2019 14:39:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJJ3o-0002sq-CU for linux-riscv@lists.infradead.org; Wed, 24 Apr 2019 14:39:45 +0000 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 55E5121902; Wed, 24 Apr 2019 14:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556116784; bh=ffuS2YlLGfWKuSDBqz0cTSvblLPLqxxwnPU2mc8t5+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2FcrqC6MdKcO/7hG8GHez7DCoyAbzlsd6u062MBTEDraD+2r7V7hJnZtwWUfHoVvz iYluZiXVzO0/BW68WjRCkvQZ8DMGSWhDxMEXnFZlUzZ61L9lplfhV1vqBI8Gyfvlpo 9aduns880N0iTXpZINKYJx3ARpN3+OBQjA9L4DfI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 14/52] riscv: fix accessing 8-byte variable from RV32 Date: Wed, 24 Apr 2019 10:38:32 -0400 Message-Id: <20190424143911.28890-14-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190424143911.28890-1-sashal@kernel.org> References: <20190424143911.28890-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190424_073944_443120_97AECEEC X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sasha Levin , Alan Kao , Greentime Hu , Palmer Dabbelt , linux-riscv@lists.infradead.org, Vincent Chen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org From: Alan Kao [ Upstream commit dbee9c9c45846f003ec2f819710c2f4835630a6a ] A memory save operation to 8-byte variable in RV32 is divided into two sw instructions in the put_user macro. The current fixup returns execution flow to the second sw instead of the one after it. This patch fixes this fixup code according to the load access part. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h index 8c3e3e3c8be1..f0ea3156192d 100644 --- a/arch/riscv/include/asm/uaccess.h +++ b/arch/riscv/include/asm/uaccess.h @@ -307,7 +307,7 @@ do { \ " .balign 4\n" \ "4:\n" \ " li %0, %6\n" \ - " jump 2b, %1\n" \ + " jump 3b, %1\n" \ " .previous\n" \ " .section __ex_table,\"a\"\n" \ " .balign " RISCV_SZPTR "\n" \ -- 2.19.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0906C282E1 for ; Wed, 24 Apr 2019 14:39:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7196421902 for ; Wed, 24 Apr 2019 14:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556116787; bh=ffuS2YlLGfWKuSDBqz0cTSvblLPLqxxwnPU2mc8t5+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Tb9RMazw8Uc56uD1WXGED4wjbO/Em4Kq77X+D+ILIicMeYfQJLS+Pn/ixNlI6RBV5 BirKaOnPMhp8Ocdc6Rs2vf0qSHoFLr6aNnLe9UP4yzVl9nPWvu4toVTcCEPB5Cbjkl yRW24pNydm37HoVUwHG3E3yGpi2JqrFI8osykDII= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731777AbfDXOjq (ORCPT ); Wed, 24 Apr 2019 10:39:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:42142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731076AbfDXOjo (ORCPT ); Wed, 24 Apr 2019 10:39:44 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 55E5121902; Wed, 24 Apr 2019 14:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556116784; bh=ffuS2YlLGfWKuSDBqz0cTSvblLPLqxxwnPU2mc8t5+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2FcrqC6MdKcO/7hG8GHez7DCoyAbzlsd6u062MBTEDraD+2r7V7hJnZtwWUfHoVvz iYluZiXVzO0/BW68WjRCkvQZ8DMGSWhDxMEXnFZlUzZ61L9lplfhV1vqBI8Gyfvlpo 9aduns880N0iTXpZINKYJx3ARpN3+OBQjA9L4DfI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alan Kao , Greentime Hu , Vincent Chen , Palmer Dabbelt , Sasha Levin , linux-riscv@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 14/52] riscv: fix accessing 8-byte variable from RV32 Date: Wed, 24 Apr 2019 10:38:32 -0400 Message-Id: <20190424143911.28890-14-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190424143911.28890-1-sashal@kernel.org> References: <20190424143911.28890-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alan Kao [ Upstream commit dbee9c9c45846f003ec2f819710c2f4835630a6a ] A memory save operation to 8-byte variable in RV32 is divided into two sw instructions in the put_user macro. The current fixup returns execution flow to the second sw instead of the one after it. This patch fixes this fixup code according to the load access part. Signed-off-by: Alan Kao Cc: Greentime Hu Cc: Vincent Chen Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h index 8c3e3e3c8be1..f0ea3156192d 100644 --- a/arch/riscv/include/asm/uaccess.h +++ b/arch/riscv/include/asm/uaccess.h @@ -307,7 +307,7 @@ do { \ " .balign 4\n" \ "4:\n" \ " li %0, %6\n" \ - " jump 2b, %1\n" \ + " jump 3b, %1\n" \ " .previous\n" \ " .section __ex_table,\"a\"\n" \ " .balign " RISCV_SZPTR "\n" \ -- 2.19.1