lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Aug 2022 16:25:30 +0200
From:   Jeremi Piotrowski <jpiotrowski@...ux.microsoft.com>
To:     "michael.roth@....com" <michael.roth@....com>
Cc:     "brijesh.singh@....com" <brijesh.singh@....com>,
        NOMURA JUNICHI(野村 淳一) 
        <junichi.nomura@....com>, LKML <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>, "bp@...e.de" <bp@...e.de>
Subject: Re: [Regression v5.19-rc1] kernel fails to boot, no console output
 (Re: [PATCH v12 38/46] x86/sev: Add SEV-SNP feature detection/setup)

On Fri, Jun 24, 2022 at 12:44:52AM +0000, NOMURA JUNICHI(野村 淳一) wrote:
> I found crash kexec fails to boot the 2nd kernel since v5.19-rc1 and
> git bisect points to this as a bad commit:
> 
>   commit b190a043c49af4587f5e157053f909192820522a
>   Author: Michael Roth <michael.roth@....com>
>   Date:   Thu Feb 24 10:56:18 2022 -0600
> 
>     x86/sev: Add SEV-SNP feature detection/setup
> 
>     Initial/preliminary detection of SEV-SNP is done via the Confidential
>     Computing blob. Check for it prior to the normal SEV/SME feature
>     initialization, and add some sanity checks to confirm it agrees with
>     SEV-SNP CPUID/MSR bits.
> 

Hi Michael,

I too have bisected an issue to this commit and my issue is not fixed by
b57feed2cc2622ae14b2fa62f19e973e5e0a60cf. I have a Dell R6515 with AMD EPYC
7513 that is supposed to act as an SNP host, but after v5.19-rc1 I don't get
any console output and the machine resets shortly after grub loads the
kernel.

The bisect was done on 5.18+SNP patches that were merged into 5.19-rc1, this
is the full patch list:

  git log --oneline v5.18-rc1..eb39e37d5cebdf0f63ee2a315fc23b035d81b4b0^2

If I comment out the following lines, the machine boots correctly and if I also
have the SNP host patches applied SNP guests work correctly. Applying
b57feed2cc2622ae14b2fa62f19e973e5e0a60cf instead does not change anything,
there is still no console output and no boot.

Any further suggestions on how to debug this? Attached you'll find my dmesg and
config.

diff --git a/arch/x86/mm/mem_encrypt_identity.c b/arch/x86/mm/mem_encrypt_identity.c
index f415498d3175..7ffde3fa6be8 100644
--- a/arch/x86/mm/mem_encrypt_identity.c
+++ b/arch/x86/mm/mem_encrypt_identity.c
@@ -510,10 +510,10 @@ void __init sme_enable(struct boot_params *bp)
        bool active_by_default;
        unsigned long me_mask;
        char buffer[16];
-       bool snp;
+       //bool snp;
        u64 msr;
 
-       snp = snp_init(bp);
+       //snp = snp_init(bp);
 
        /* Check for the SME/SEV support leaf */
        eax = 0x80000000;
@@ -547,8 +547,10 @@ void __init sme_enable(struct boot_params *bp)
        feature_mask = (sev_status & MSR_AMD64_SEV_ENABLED) ? AMD_SEV_BIT : AMD_SME_BIT;
 
        /* The SEV-SNP CC blob should never be present unless SEV-SNP is enabled. */
+       /*
        if (snp && !(sev_status & MSR_AMD64_SEV_SNP_ENABLED))
                snp_abort();
+       */
 
        /* Check if memory encryption is enabled */
        if (feature_mask == AMD_SME_BIT) {


View attachment "dmesg" of type "text/plain" (115144 bytes)

View attachment "config" of type "text/plain" (166713 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ