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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1698BC433FE for ; Mon, 14 Mar 2022 11:41:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239582AbiCNLms (ORCPT ); Mon, 14 Mar 2022 07:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239534AbiCNLme (ORCPT ); Mon, 14 Mar 2022 07:42:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A179449F22; Mon, 14 Mar 2022 04:39:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D39FBB80DBA; Mon, 14 Mar 2022 11:39:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08808C340F4; Mon, 14 Mar 2022 11:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647257981; bh=8GRftVGi7CsZvzqciMCYW4gQ0EmaOvOQp0EDe9brSYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mmYnDhWvaG/zLm0ARp/EUsUKQ7H7BVYoy41fKmDrzI29BTrxCFgWpdM5Kaut7Cyel UhnQFbpHzc3MZ8SrvxpndDVhOHCyg/gIhcVi3urDVnLbjyhuJTNdzzqd65RRo2W2b9 yQwOieriZXG4VLReR8e2okQAmOgZD6aZO1b2G5+0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , "Russell King (Oracle)" , Linus Torvalds Subject: [PATCH 4.19 25/30] ARM: fix Thumb2 regression with Spectre BHB Date: Mon, 14 Mar 2022 12:34:43 +0100 Message-Id: <20220314112732.504580347@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112731.785042288@linuxfoundation.org> References: <20220314112731.785042288@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Russell King (Oracle) commit 6c7cb60bff7aec24b834343ff433125f469886a3 upstream. When building for Thumb2, the vectors make use of a local label. Sadly, the Spectre BHB code also uses a local label with the same number which results in the Thumb2 reference pointing at the wrong place. Fix this by changing the number used for the Spectre BHB local label. Fixes: b9baf5c8c5c3 ("ARM: Spectre-BHB workaround") Tested-by: Nathan Chancellor Signed-off-by: Russell King (Oracle) Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- arch/arm/kernel/entry-armv.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -1067,9 +1067,9 @@ vector_bhb_loop8_\name: @ bhb workaround mov r0, #8 -1: b . + 4 +3: b . + 4 subs r0, r0, #1 - bne 1b + bne 3b dsb isb b 2b