From patchwork Mon Mar 14 11:34:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 551796 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 2963CC433EF for ; Mon, 14 Mar 2022 11:37:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239278AbiCNLiv (ORCPT ); Mon, 14 Mar 2022 07:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239235AbiCNLin (ORCPT ); Mon, 14 Mar 2022 07:38:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880BA42A21; Mon, 14 Mar 2022 04:37:33 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2553661178; Mon, 14 Mar 2022 11:37:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F16C2C340F6; Mon, 14 Mar 2022 11:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647257852; bh=iN7HimTURbw5M6FGLDWua52kQmbMKl/8KG9Qr9bGmqI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aja467ZSGknVkleYU82zTdR+Tp5rRr4H7gu1eM2O9bV1TPYVKWpkKvvYTmsBvE7BC kVKrt+ZghsUFVpyTgBrdflRYmk0zzxT/TU+PnPlBYz+fc+lUkUS4tL7e5U/k4Rj9Zc L2UFUk1gHi3i/MRZH98/84w1T773hAWhOj0nBghc= 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.14 21/23] ARM: fix Thumb2 regression with Spectre BHB Date: Mon, 14 Mar 2022 12:34:34 +0100 Message-Id: <20220314112731.671228748@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112731.050583127@linuxfoundation.org> References: <20220314112731.050583127@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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 @@ -1071,9 +1071,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