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: <CAGdbjmKC+tTBHLPZ6bqCXvu45Gbout+0QrNemDqxY-nKAo_3gg@mail.gmail.com>
Date: Sun, 10 Mar 2024 10:12:32 -0700
From: Kevin Loughlin <kevinloughlin@...gle.com>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>, acdunlap@...gle.com, alexander.shishkin@...ux.intel.com, 
	andrisaar@...gle.com, bhe@...hat.com, brijesh.singh@....com, 
	dave.hansen@...ux.intel.com, dionnaglaze@...gle.com, grobler@...gle.com, 
	hpa@...or.com, jacobhxu@...gle.com, jpoimboe@...nel.org, kai.huang@...el.com, 
	linux-kernel@...r.kernel.org, michael.roth@....com, mingo@...hat.com, 
	peterz@...radead.org, pgonda@...gle.com, ross.lagerwall@...rix.com, 
	sidtelang@...gle.com, tglx@...utronix.de, thomas.lendacky@....com, 
	x86@...nel.org, ytcoode@...il.com
Subject: Re: [PATCH v2] x86/kernel: skip ROM range scans and validation for
 SEV-SNP guests

On Fri, Mar 8, 2024 at 3:44 AM Ard Biesheuvel <ardb@...nel.org> wrote:
>
> On Fri, 8 Mar 2024 at 12:01, Borislav Petkov <bp@...en8.de> wrote:
> >
> > On Fri, Mar 08, 2024 at 11:30:50AM +0100, Ard Biesheuvel wrote:
> > > Agree with the analysis and the conclusion. However, this will need to
> > > be split into generic and x86 specific changes, given that the DMI
> > > code is shared between all architectures, and explicitly checking for
> > > SEV-SNP support in generic code is not appropriate.
> > >
> > > So what we will need is:
> >
> > I was actually thinking of:
> >
> >         x86_init.resources.probe_roms = snp_probe_roms;
> >
> > and snp_probe_roms() is an empty stub.
> >
> > Problem solved without ugly sprinkling of checks everywhere.
> >
>
> Indeed. Setting the override could be done in
> init_hypervisor_platform(), which is called right before from
> setup_arch().

The call to init_hypervisor_platform() has a comment saying it must
come after dmi_setup() (i.e., init_hypervisor_platform() would *not*
work for doing a dmi_setup() override), so I'm currently planning to
do the overrides at the end of snp_init() in arch/x86/kernel/sev.c
instead (which comes before both). This would be somewhat similar to
how there are early setup functions for specific platforms that
perform init overrides for different reasons (example:
x86_ce4100_early_setup()). Open to other locations of course.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ