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: <CAMj1kXFRSJ1zT5XvBE2JT1jm2peOs9aymHeydOYk8AZRO=JDbQ@mail.gmail.com>
Date: Mon, 1 Sep 2025 16:02:04 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Ard Biesheuvel <ardb+git@...gle.com>, linux-kernel@...r.kernel.org, 
	linux-efi@...r.kernel.org, x86@...nel.org, Ingo Molnar <mingo@...nel.org>, 
	Kevin Loughlin <kevinloughlin@...gle.com>, Tom Lendacky <thomas.lendacky@....com>, 
	Josh Poimboeuf <jpoimboe@...nel.org>, Peter Zijlstra <peterz@...radead.org>, 
	Nikunj A Dadhania <nikunj@....com>
Subject: Re: [PATCH v7 05/22] x86/sev: Move GHCB page based HV communication
 out of startup code

On Mon, 1 Sept 2025 at 15:55, Borislav Petkov <bp@...en8.de> wrote:
>
> On Sun, Aug 31, 2025 at 03:11:04PM +0200, Ard Biesheuvel wrote:
> > Alternatively, we might consider the below:
>
> This is the full diff ontop of this current patch - it removes the
> get_cpuflags() hunk too as it is not needed now. It builds fine and I'll test
> with it and if all looks good, merge it with your patch.
>
...
> diff --git a/arch/x86/boot/cpuflags.c b/arch/x86/boot/cpuflags.c
> index 63e037e94e4c..916bac09b464 100644
> --- a/arch/x86/boot/cpuflags.c
> +++ b/arch/x86/boot/cpuflags.c
> @@ -106,18 +106,5 @@ void get_cpuflags(void)
>                         cpuid(0x80000001, &ignored, &ignored, &cpu.flags[6],
>                               &cpu.flags[1]);
>                 }
> -
> -               if (max_amd_level >= 0x8000001f) {
> -                       u32 ebx;
> -
> -                       /*
> -                        * The X86_FEATURE_COHERENCY_SFW_NO feature bit is in
> -                        * the virtualization flags entry (word 8) and set by
> -                        * scattered.c, so the bit needs to be explicitly set.
> -                        */
> -                       cpuid(0x8000001f, &ignored, &ebx, &ignored, &ignored);
> -                       if (ebx & BIT(31))
> -                               set_bit(X86_FEATURE_COHERENCY_SFW_NO, cpu.flags);
> -               }

Are you sure this can be removed? It is tested in other places too
(arch/x86/coco/sev/core.c), and AIUI, it is a Linux defined CPU
feature so it will never be set automatically.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ