Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp964297pxp; Wed, 16 Mar 2022 22:49:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJrJMvQscSf8qaqJsRdPfFEz2HULcPGuxP4NZ7CKfO70gnOH147J+Vjd41t6wvqACWR68l X-Received: by 2002:a17:90a:f8c:b0:1bc:cf23:2319 with SMTP id 12-20020a17090a0f8c00b001bccf232319mr14172819pjz.67.1647496179928; Wed, 16 Mar 2022 22:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647496179; cv=none; d=google.com; s=arc-20160816; b=LCtYNKbDdJNO9y3R/WGg1sUyuIw0CIseyJnsazL/eodMf2sI/8coLi+i1ri/My1dl0 YGes9lAqzgr2GrR4lkSZvTYU2aBoDiDQ4OaG+OXB9XopbYsSkhR+QLCHhnU+9aUYhwX4 bwy2gYJoxkJIF0i/KK+hQFFQTPeUCCicWH+v3bIXLvOLAMsGapR0i+wkEbopdG8fIMzY RL66P9/p92tS/VZA5G0ESreX8fnylXQhovIzdIMtMR/l5xu7dAEGOGBOYOUnb+Me+d/7 ugVLp3tN7j2ngmqoEd6N+WT3rqDoTZY4pzAExC9RwKDDHqGOyTsFUujChfXFm3dvqmsb KRxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=FcRVFRLUjmiceJEdjxx2Ew7Q0ASgQ98u/JhtnGhObmc=; b=E2tmlxS9CbTBm5OJA7OCnjw+zsB1NYTOrJjK/+cgSXiI7rCp1c3HpnZnxc0j+0gBhu F5YLBUymbN/Ui5TJ2XNj9YX15zbNjWPSmfj17kTlbt242V15vr1spY1R4qUtyUPPvRM1 ozYKl6Nw2qsvYDKdiaL/aAgja7gdp/jzM8S7wNN7z7thvW0LxppRW+BQmv581g5CrY4U 7IyRGDzPa/9NIKvJMRyPhANDKf4kpGOV2ZsIznSFowmX1kTzQGxrWQUuPQCXDcAElTjs 6ufCVthPkGkcKRR3JwQn+uFdBmOu4AXG3j7+a/QtUZX5sH7xJxY1Trfnnt5c2hbDuqaT 9wSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d16-20020a634f10000000b003816043f0e5si1170830pgb.730.2022.03.16.22.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0283C141FD6; Wed, 16 Mar 2022 21:45:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348865AbiCON6k (ORCPT + 99 others); Tue, 15 Mar 2022 09:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347052AbiCON6j (ORCPT ); Tue, 15 Mar 2022 09:58:39 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3913553E0F; Tue, 15 Mar 2022 06:57:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 041FA1474; Tue, 15 Mar 2022 06:57:27 -0700 (PDT) Received: from eglon.cambridge.arm.com (eglon.cambridge.arm.com [10.1.196.218]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2236E3F66F; Tue, 15 Mar 2022 06:57:26 -0700 (PDT) From: James Morse To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, pavel@denx.de, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, james.morse@arm.com Subject: [stable:PATCH v5.10.105] arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable Date: Tue, 15 Mar 2022 13:57:20 +0000 Message-Id: <20220315135720.1302143-1-james.morse@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org KVM's infrastructure for spectre mitigations in the vectors in v5.10 and earlier is different, it uses templates which are used to build a set of vectors at runtime. There are two copy-and-paste errors in the templates: __spectre_bhb_loop_k24 should loop 24 times and __spectre_bhb_loop_k32 32. Fix these. Reported-by: Pavel Machek Link: https://lore.kernel.org/all/20220310234858.GB16308@amd/ Signed-off-by: James Morse --- arch/arm64/kvm/hyp/smccc_wa.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp/smccc_wa.S b/arch/arm64/kvm/hyp/smccc_wa.S index 24b281912463..533b0aa73256 100644 --- a/arch/arm64/kvm/hyp/smccc_wa.S +++ b/arch/arm64/kvm/hyp/smccc_wa.S @@ -68,7 +68,7 @@ SYM_DATA_START(__spectre_bhb_loop_k24) esb sub sp, sp, #(8 * 2) stp x0, x1, [sp, #(8 * 0)] - mov x0, #8 + mov x0, #24 2: b . + 4 subs x0, x0, #1 b.ne 2b @@ -85,7 +85,7 @@ SYM_DATA_START(__spectre_bhb_loop_k32) esb sub sp, sp, #(8 * 2) stp x0, x1, [sp, #(8 * 0)] - mov x0, #8 + mov x0, #32 2: b . + 4 subs x0, x0, #1 b.ne 2b -- 2.30.2