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]
Message-ID: <SA1PR21MB13352DCAA7371B90CB8A637CBFA69@SA1PR21MB1335.namprd21.prod.outlook.com>
Date:   Sat, 18 Feb 2023 02:54:37 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     Jeremi Piotrowski <jpiotrowski@...ux.microsoft.com>
CC:     Tom Lendacky <thomas.lendacky@....com>,
        Borislav Petkov <bp@...en8.de>,
        "sandipan.das@....com" <sandipan.das@....com>,
        "Gupta, Pankaj" <pankaj.gupta@....com>,
        "ray.huang@....com" <ray.huang@....com>,
        "brijesh.singh@....com" <brijesh.singh@....com>,
        "michael.roth@....com" <michael.roth@....com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: Does earlyprintk=ttyS0 work for an AMD SNP guest on KVM?

> From: Jeremi Piotrowski <jpiotrowski@...ux.microsoft.com>
> Sent: Friday, February 17, 2023 4:51 AM
> To: Dexuan Cui <decui@...rosoft.com>
> > [...]
> > The comment before the first branch says:
> >   On 4-level paging, p4d_offset(top_level_pgt, 0) is equal to 'top_level_pgt'.
> >
> > IIUC this means 'top_level_pgt' is equal to '_pgtable'? i.e. without
> > CONFIG_RANDOMIZE_BASE, pgt_data.pgt_buf_size should be 0.
> >
> > Not sure why it's not getting into the first branch for you.
> 
> Sorry, I got two things confused here. The relevant part of the comment is this:
> "If we came here via startup_32(), cr3 will be _pgtable already".
> 
> Booting a (non-SNP) guest via BIOS I end up in the first branch. Upstream SNP
> support requires OVMF (UEFI) so we'll always reach the kernel in 64-bit mode
> (startup_64?), and end up in the second branch.
> 
> Jeremi

Here I'm running a C-bit mode SNP guest on Hyper-V via "direct-boot" (i.e. 
I run Set-VMFirmware to tell Hyper-V to boot the kernel directly without
UEFI). Looks like arch/x86/boot/compressed/head_64.S: startup_32 runs
first and calls startup_64 later (?) This might explain why I'm getting into
the first branch, which I hope could be fixed by someone...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ