Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3942705pxj; Mon, 21 Jun 2021 09:52:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp9Igw5vknNCod9y/yKPVwJ05gkeL6EAJA5AxCEjjv9ruHF1pkI2nXgcR1O+3rzCS94mo4 X-Received: by 2002:a92:3f08:: with SMTP id m8mr18266012ila.104.1624294369941; Mon, 21 Jun 2021 09:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294369; cv=none; d=google.com; s=arc-20160816; b=LXvLi6AZ/kDK6NOnKJYfNfSYXjrTg0wz0C7LrBQ9jdzI/sMReNCPpibu1Q3/vMMku2 x+/gQ3Hnt3UIq1zH5FPqaqAWFaX96jtxvEHtQ1ec+01YrTqYYZjjjRX2TmMUMS8bimRj KnUaKc8Qz4HAm1GQ8I68ftkoHnT1RUkz2oXl1JInNUIn9dAIaOIrACSakDU5yYtKcn5Z mbHvPi19HQ6mE53Nbdy0InLA5KeDA0Nifj/1zkugIVfXlQmiK+QiSP1gfH60gLTMQpJ3 DfV7x9sH/bQ2jYO9thi72m+67yEWVVv/FkvJGCjihtfGlZPio1IFIGhHBkgvsP0UwYn3 cQLg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qyuvUCi8yuZ7+1+7nO8h6EsE5TFRbDtnzr1EqCwJfs4=; b=loKcCZ5Wz1VwphbSZ3Hr43Rdb2aH1GkHJhVCltljOR86Bmm7cuZe3/0xmRNgbLP33R ov18P+RMMDgpwzoE/kueemIcBr9N1pHCFZ0yGRgxEG72ar1mBYJoqGynam6KOfy5swHF nsPnBixWoQ9b+7zTRkUWetmfU/X1darxBbt1jWkpIcNs+siCI8O/gz2v/p4h13OM8Buj 74Z1wz560gxDi6zNNx0ydNcPBFHXmFNOanH8ifOyrddWBWVGXcQD4wesy5xHfpVBM9v2 nohdttn+VRw6ZkrCS6zOyDnFCK43lEdkQU3yw5AiPAxnYumSdkbbAzbO+tuiGVkpjga/ Cptg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e5Cmt3pK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si20362790iop.97.2021.06.21.09.52.35; Mon, 21 Jun 2021 09:52:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e5Cmt3pK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231418AbhFUQyC (ORCPT + 99 others); Mon, 21 Jun 2021 12:54:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:41352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233463AbhFUQtp (ORCPT ); Mon, 21 Jun 2021 12:49:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 930366145B; Mon, 21 Jun 2021 16:34:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293284; bh=BI7DdNCcTO7m5jjZQLi7eYOCQXk23B73zOQUucRPvpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e5Cmt3pKcWjU/nTOKu5eVHqUMNgV5AjiDoGQFS5WISuHu2/U60kiO2ccaAAJ4umcg zFeCcmqU8NGcWiJkNiHFfj9TUJL3ja6ws4llIIGdvQ4C+jmLrVw6O6FdtinFBM+JgE MoBg8oAtZQIrpAQplPdwg07FSWTIeeTGBtT+JHJE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Gordeev , Christian Borntraeger , Heiko Carstens , Vasily Gorbik Subject: [PATCH 5.12 133/178] s390/mcck: fix invalid KVM guest condition check Date: Mon, 21 Jun 2021 18:15:47 +0200 Message-Id: <20210621154927.309454936@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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: linux-kernel@vger.kernel.org From: Alexander Gordeev commit 1874cb13d5d7cafa61ce93a760093ebc5485b6ab upstream. Wrong condition check is used to decide if a machine check hit while in KVM guest. As result of this check the instruction following the SIE critical section might be considered as still in KVM guest and _CIF_MCCK_GUEST CPU flag mistakenly set as result. Fixes: c929500d7a5a ("s390/nmi: s390: New low level handling for machine check happening in guest") Cc: Signed-off-by: Alexander Gordeev Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -653,7 +653,7 @@ ENDPROC(stack_overflow) slgr %r9,%r13 larl %r13,.Lsie_skip clgr %r9,%r13 - jh .Lcleanup_sie_int + jhe .Lcleanup_sie_int oi __LC_CPU_FLAGS+7, _CIF_MCCK_GUEST .Lcleanup_sie_int: BPENTER __SF_SIE_FLAGS(%r15),(_TIF_ISOLATE_BP|_TIF_ISOLATE_BP_GUEST)