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] [day] [month] [year] [list]
Message-ID: <Y6rOTM6Q7AZekpoc@zn.tnic>
Date:   Tue, 27 Dec 2022 11:51:56 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Kim Phillips <kim.phillips@....com>
Cc:     x86@...nel.org, Babu Moger <Babu.Moger@....com>,
        Borislav Petkov <bp@....com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
        Joao Martins <joao.m.martins@...cle.com>,
        Jonathan Corbet <corbet@....net>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        David Woodhouse <dwmw@...zon.co.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Juergen Gross <jgross@...e.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Tony Luck <tony.luck@...el.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Alexey Kardashevskiy <aik@....com>, kvm@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/7] x86/cpu: Make X86_FEATURE_LFENCE_RDTSC a
 scattered feature bit

On Mon, Dec 05, 2022 at 05:32:31PM -0600, Kim Phillips wrote:
> It's a part of the CPUID 0x80000021 leaf, and will be grouped
> with other feature bits to being propagated via kvm_set_cpu_caps()
> instead of open-coding them in __do_cpuid_func().
> 
> Unlike the other CPUID 0x80000021 EAX feature bits,
> X86_FEATURE_LFENCE_RDTSC already had an entry in cpufeatures.h.
> 
> Signed-off-by: Kim Phillips <kim.phillips@....com>
> ---
>  arch/x86/kernel/cpu/scattered.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c
> index d0734cc19d37..caa03466cd9e 100644
> --- a/arch/x86/kernel/cpu/scattered.c
> +++ b/arch/x86/kernel/cpu/scattered.c
> @@ -46,6 +46,7 @@ static const struct cpuid_bit cpuid_bits[] = {
>  	{ X86_FEATURE_PROC_FEEDBACK,    CPUID_EDX, 11, 0x80000007, 0 },
>  	{ X86_FEATURE_MBA,		CPUID_EBX,  6, 0x80000008, 0 },
>  	{ X86_FEATURE_NO_NESTED_DATA_BP,CPUID_EAX,  0, 0x80000021, 0 },
> +	{ X86_FEATURE_LFENCE_RDTSC,	CPUID_EAX,  2, 0x80000021, 0 },

Hmm, so this patchset keeps growing and growing with new bits.

Perhaps my initial suggestion to make it a scattered one doesn't make
a whole lot of sense anymore.

/me goes and looks at CPUID_Fn80000021_EAX [Extended Feature 2 EAX] (Core::X86::Cpuid::FeatureExt2Eax)

Yah, judging by what's there in that leaf, we are likely to use a lot
more bits in the future I think you should go back to

https://lore.kernel.org/lkml/20221104213651.141057-2-kim.phillips@amd.com/

But please state in that commit message that the majority of the feature
bits in CPUID_Fn80000021_EAX will be used in the kernel and thus a
separate leaf makes sense.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ