From patchwork Thu Feb 16 10:32:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 728552 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vPCF10lQ1z9s8c for ; Thu, 16 Feb 2017 21:33:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kp9Z56eF"; dkim-atps=neutral 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=G2PDpKisXwcq1V9W1wRnkv82Gs9IjXS5ezQ41OQXgSQ=; b=kp9Z56eFlb3lYzAni8Ay/r7R6j RLWqmgZ/sBAYjkoX+elEVebksFC6405mLIrpXFr5m7lnwCZNd/OK7xt69CPXB3wD1IBBcpq9hcz24 mLmA79Ovpjig0ZM5lIJgNKz8mHGXX1cn+3OhvSVOMTO3klbdPf/J0lRDldBDyvYUMNyZq9JlI6cZc 5zmI8F2BNuB6puNfLX4TB0n5IRQcPlDgGm1sgIB34tedX+RqkQ3xCq8K3zi7OUACLG3PsFkoLpp3W 2H5etKu+Zw2TDTM5EKlLSMJ/OtkBw+BIruMn2vRnVwvJbklSKKC4FgeJaPg97lccprc3p1fsQUGqc XkBTIxxQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ceJNr-0001LW-MU; Thu, 16 Feb 2017 10:33:55 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceJNo-0001IC-0y for linux-snps-arc@lists.infradead.org; Thu, 16 Feb 2017 10:33:53 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 48376ADAA; Thu, 16 Feb 2017 10:33:27 +0000 (UTC) From: Jiri Slaby To: stable@vger.kernel.org Subject: [patch added to 3.12-stable] ARC: [arcompact] brown paper bag bug in unaligned access delay slot fixup Date: Thu, 16 Feb 2017 11:32:37 +0100 Message-Id: <20170216103248.19251-61-jslaby@suse.cz> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170216103248.19251-1-jslaby@suse.cz> References: <20170216103248.19251-1-jslaby@suse.cz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170216_023352_282635_D757F8F3 X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vineet Gupta , Vineet Gupta , linux-kernel@vger.kernel.org, Jiri Slaby , linux-snps-arc@lists.infradead.org, Linus Torvalds MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Vineet Gupta This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. =============== commit a524c218bc94c705886a0e0fedeee45d1931da32 upstream. Reported-by: Jo-Philipp Wich Fixes: 9aed02feae57bf7 ("ARC: [arcompact] handle unaligned access delay slot") Cc: linux-kernel@vger.kernel.org Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Vineet Gupta Signed-off-by: Linus Torvalds Signed-off-by: Jiri Slaby --- arch/arc/kernel/unaligned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c index dbde997d16c6..2cc82b6ec23d 100644 --- a/arch/arc/kernel/unaligned.c +++ b/arch/arc/kernel/unaligned.c @@ -242,7 +242,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, /* clear any remanants of delay slot */ if (delay_mode(regs)) { - regs->ret = regs->bta ~1U; + regs->ret = regs->bta & ~1U; regs->status32 &= ~STATUS_DE_MASK; } else { regs->ret += state.instr_len;