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: <20220829191726.GB2700446@ls.amr.corp.intel.com>
Date:   Mon, 29 Aug 2022 12:17:26 -0700
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     Binbin Wu <binbin.wu@...ux.intel.com>
Cc:     isaku.yamahata@...el.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, isaku.yamahata@...il.com,
        Paolo Bonzini <pbonzini@...hat.com>, erdemaktas@...gle.com,
        Sean Christopherson <seanjc@...gle.com>,
        Sagi Shahar <sagis@...gle.com>
Subject: Re: [PATCH v8 022/103] KVM: TDX: Add place holder for TDX VM
 specific mem_enc_op ioctl

On Mon, Aug 29, 2022 at 12:07:55PM +0800,
Binbin Wu <binbin.wu@...ux.intel.com> wrote:

> > diff --git a/arch/x86/kvm/vmx/main.c b/arch/x86/kvm/vmx/main.c
> > index 7b497ed1f21c..067f5de56c53 100644
> > --- a/arch/x86/kvm/vmx/main.c
> > +++ b/arch/x86/kvm/vmx/main.c
> > @@ -73,6 +73,14 @@ static void vt_vm_free(struct kvm *kvm)
> >   		return tdx_vm_free(kvm);
> >   }
> > +static int vt_mem_enc_ioctl(struct kvm *kvm, void __user *argp)
> > +{
> > +	if (!is_td(kvm))
> > +		return -ENOTTY;
> > +
> > +	return tdx_vm_ioctl(kvm, argp);
> > +}
> > +
> >   struct kvm_x86_ops vt_x86_ops __initdata = {
> >   	.name = "kvm_intel",
> > @@ -214,6 +222,7 @@ struct kvm_x86_ops vt_x86_ops __initdata = {
> >   	.vcpu_deliver_sipi_vector = kvm_vcpu_deliver_sipi_vector,
> >   	.dev_mem_enc_ioctl = tdx_dev_ioctl,
> > +	.mem_enc_ioctl = vt_mem_enc_ioctl,
> 
> suggeust to align the interafce/function name style with the scop.
> 
> patch 21 and 27 have the scope in interafce names(dev / vcpu), may be
> clearer to useĀ  vcpu_mem_enc_ioctl?

This is a matter of preference.  I intentionally chose to drop mem_enc part
because actually KVM_MEMORY_ENCRYPT_OP is abused for TDX or SEV(-SNP) specific
operation.  Subcommand for KVM_MEMORY_ENCRYPT_OP is not directly related to
memory encryption.  It should be KVM_CONFIDENTIAL_OP or something.
Unfortunately it's too late to rename it.
-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ