Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2534165yba; Mon, 6 May 2019 07:37:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGXZIY7ERBtVsCT4CdQhid11zgXweWiOKdZxqGfiMz5nhQe3Y6pdfXXTAwzDTlH13w8bki X-Received: by 2002:a63:1d02:: with SMTP id d2mr5773251pgd.26.1557153453608; Mon, 06 May 2019 07:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557153453; cv=none; d=google.com; s=arc-20160816; b=keMn9IGvqatQj3CkLHEeIRGTg24AlRL6jnbfVmP80lujEJ5OR87HOml4b29TO4ZzXc g0O4fP9eQbxBKuuNQZTD92ZzFTO66CXHsADZQcB0xtkyU87I2Dn9Nc5/UqOD7yQkBqh2 bS4SrSrd9e9JoObMbZ0WeuvdO+U/zFtvwFxqGc5ZcHWwa7H/VrxyMYM9yxSQKgfjrA+t VQc3b+wdtKaAdz7UlwRy1XY1j9FCDBXXPzQLGACDVzE1Z2e1evdWNH4ddT8Mp5rYFyXz 0xhzBJ2nMeJXQ89lkGrDobaIt2efO3bkxZ/3daol0KKnXfmCUuW6V2YBO2DkjOe+eKzb LAQA== 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=tDwNxQQ1/wWlRoIecjiU+mitrwsUCRvaM+gEzDpPNus=; b=0/07Ro0IPlWqJ7s+cSLpJsznSeHUl1aiSs/MzZ50iDEVPC5NssBQqzEQrVtcOV9ay6 yu9TQpox40yO4yO39y9xaqQnvPzmif1ZYCDnJAhncXuAWWzsk4Jys/5nj0q5VwF1vUN/ 8rIkJiQXrHLk9jL6YCLTL0QN+iBNV1OEYye51vmZz985oZBjnbSq5zOiFeL+M4oKRiV+ z/RD3IJblGQ8ku2u1mDuGkbVHICADGyVomjbNDzzKFgeJTi8F5z6wwk8oBbP3OFVFyMV 1yjCXt1KnX4KCEJY/dBdbBFzVCGkV8LCkTpdqKvEuYkE5VIIkMkW0l2kOoslMTsZSUWd ECCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GrkiGweU; 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 x11si14248407pgj.65.2019.05.06.07.37.14; Mon, 06 May 2019 07:37:33 -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; dkim=pass header.i=@kernel.org header.s=default header.b=GrkiGweU; 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 S1726977AbfEFOfi (ORCPT + 99 others); Mon, 6 May 2019 10:35:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:55778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726954AbfEFOfh (ORCPT ); Mon, 6 May 2019 10:35:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 4EA5720C01; Mon, 6 May 2019 14:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153336; bh=mvVg1JdDwMsN6OACj1AvgZ/teB7ua0sGC95Ru4jlzOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GrkiGweUx5FJXw+gVjiKqPq94niJ0mN12JSZQilHnhllDowA2U0sL3o2l6F9yIfK1 +sYZrPllta4TVrjis8EuTCh0QtI5O5UGbYS9bFcUuXAkZ2sqvzerCbzob5bf6Y2RPS CIK0Cj/Tw8P4oL8QGVNIkRN5B5wfWnKneZ+0u1pg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Kao , Greentime Hu , Vincent Chen , Palmer Dabbelt , "Sasha Levin (Microsoft)" Subject: [PATCH 5.0 043/122] riscv: fix accessing 8-byte variable from RV32 Date: Mon, 6 May 2019 16:31:41 +0200 Message-Id: <20190506143058.785457087@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@linuxfoundation.org> User-Agent: quilt/0.66 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 [ 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 (Microsoft) --- 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 637b896894fc..aa82df30e38a 100644 --- a/arch/riscv/include/asm/uaccess.h +++ b/arch/riscv/include/asm/uaccess.h @@ -301,7 +301,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.20.1