]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/sev: Handle failures from snp_init()
authorNikunj A Dadhania <nikunj@amd.com>
Wed, 9 Oct 2024 09:28:33 +0000 (14:58 +0530)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 16 Oct 2024 16:17:36 +0000 (18:17 +0200)
commitf75ff17fb48b1991d7a2822de5acc12bba240dc1
tree8958f7ed714b304c8ce26bee0d698e8167ae8481
parentf3476bc77057db0adf90c0a141a3599dd11c56a0
x86/sev: Handle failures from snp_init()

Address the ignored failures from snp_init() in sme_enable(). Add error
handling for scenarios where snp_init() fails to retrieve the SEV-SNP CC
blob or encounters issues while parsing the CC blob. Ensure that SNP guests
will error out early, preventing delayed error reporting or undefined
behavior.

Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20241009092850.197575-3-nikunj@amd.com
arch/x86/mm/mem_encrypt_identity.c