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: <20201103102538.GB6310@zn.tnic>
Date:   Tue, 3 Nov 2020 11:25:38 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Shuo A Liu <shuo.a.liu@...el.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "H . Peter Anvin" <hpa@...or.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Yu Wang <yu1.wang@...el.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Yin Fengwei <fengwei.yin@...el.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Zhi Wang <zhi.a.wang@...el.com>,
        Zhenyu Wang <zhenyuw@...ux.intel.com>
Subject: Re: [PATCH v5 03/17] x86/acrn: Introduce an API to check if a VM is
 privileged

On Tue, Nov 03, 2020 at 02:27:18PM +0800, Shuo A Liu wrote:
> The code just followed KVM style (see kvm_arch_para_features()).

Do you see Documentation/virt/kvm/cpuid.rst?

Now where is yours explaining what your hypervisor is doing?

> I can change to use
> 	cpuid_eax(acrn_cpuid_base() + 1)...
> If you prefer to.

Yes please.

> hypervisor_cpuid_base() implies the base is variable, no? We use
> this function to detect the base.

Yes, but you need to document all that and make it clear and
understandable. If Linux is supposed to run as an acrn guest, that
interface better be documented just like KVM does.

Also, if there's a bug in the KVM guest/host interface, we might be able
to fix it modulo ABI. Is that possible with acrn?

I'm guessing the answer to that is yes if I'm looking at

https://github.com/projectacrn/acrn-hypervisor

?

> OK. Then i will define acrn_cpuid_base() as a static inline function
> in asm/acrn.h for callers.

Yah, that function is simple enough.

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