From nobody Sat Jun 13 07:52:25 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AB243D6CDF; Fri, 8 May 2026 18:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778265755; cv=none; b=X7DsJP5A5Kcxh6cWURwxG54n9Ppv4uCoI41wIGyuOpiuqjI1q4rzyv2XUPzkfAAT4JkRWIWm+lASsEJ7dTrbSl4k8gIenQP8JkMzNgdL595i2n8tHs+OKLA2e0NwEvg2sTmxq2JwH6X51vyK3k4Dg1+Y3yvvpLmcTlDfc3W1dwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778265755; c=relaxed/simple; bh=mKxN9Ot0nvtgPWFq3HxEL1s6wafEYOxzf6J54/SSmx0=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=CdyFkO9GnL0aBlbhffE1o64MxoIy5rEFUYEydtMufLaePnRJQTHk4+lnYfq/czUJEJUbKnVBu9xkQ4Oe1z0J63mfXXrHiJK5e7En/4qHbxzbJDIt0ojTGZLBmGOxwtC/ASVFZYW1SOCs8XD0NfAfGIHq+GzD++EUdFk9dTspAno= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YozovT0a; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=btJq8lYi; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YozovT0a"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="btJq8lYi" Date: Fri, 08 May 2026 18:42:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1778265752; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n3XzidIp6Bma6yEWRbHEgKHldFJ8GupYlW7y8zhe7UU=; b=YozovT0aneRE2+HaYPQnvvtMFE0e9XPe5CIdCEj29HWDw+5SdbvWzNyGMaKWnmKK5qClyj eh1qydk+2I2ajMI8UAguelKEY7zXN3ssuB2iLBfRIfX+gjrA8WEN83HAjpTnybbzudQQyK gK0Ob5HzBcBieRg7ugjmsH/J4453Bp6efY/32dbPyCCvOUq1TBMq6T0Cm9ilLSF65rhMVj JEOhU3pFlqOc7VeeGfKjUa4dYCvrDXHM7KLrOsoAFvmirjO3k1mBjLo7lDDq100ISpxHhZ d9CzOdbNKNgvwDS3x1qtnovJ91ePMwz5BxYZ99syCaMzF2ARQ8V4py5riTGRBg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1778265752; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n3XzidIp6Bma6yEWRbHEgKHldFJ8GupYlW7y8zhe7UU=; b=btJq8lYi9Gd8mX+LISrR9pN3nTmXrS1nDCsIewB94pnrzyhzt3s7URnN8yY3DLl3u4BrPY ZdmEjNko61q++oAA== From: "tip-bot2 for Tycho Andersen (AMD)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/sev] crypto/ccp: Skip SNP_INIT if preparation fails Cc: "Tycho Andersen (AMD)" , "Borislav Petkov (AMD)" , Nikunj A Dadhania , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177826575076.864.10205814475935367329.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/sev branch of tip: Commit-ID: e9d29f4a9183b5bd355aaf996bd16ecb69e52eb1 Gitweb: https://git.kernel.org/tip/e9d29f4a9183b5bd355aaf996bd16ecb6= 9e52eb1 Author: Tycho Andersen (AMD) AuthorDate: Wed, 29 Apr 2026 09:56:36 -06:00 Committer: Borislav Petkov (AMD) CommitterDate: Fri, 08 May 2026 20:29:40 +02:00 crypto/ccp: Skip SNP_INIT if preparation fails If snp_prepare() fails, SNP_INIT will fail, so skip it and return early. Note that this is not a change in initialization behavior: if SNP_INIT fails even before this change, it will still return an error and __sev_snp_init_locked() will fail initialization of other SEV modes. Signed-off-by: Tycho Andersen (AMD) Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikunj A Dadhania Link: https://lore.kernel.org/20260429155636.540040-1-tycho@kernel.org --- drivers/crypto/ccp/sev-dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c index d1e9e0a..78f98ae 100644 --- a/drivers/crypto/ccp/sev-dev.c +++ b/drivers/crypto/ccp/sev-dev.c @@ -1374,7 +1374,9 @@ static int __sev_snp_init_locked(int *error, unsigned= int max_snp_asid) return -EOPNOTSUPP; } =20 - snp_prepare(); + rc =3D snp_prepare(); + if (rc) + return rc; =20 /* * Starting in SNP firmware v1.52, the SNP_INIT_EX command takes a list