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]
Date:   Tue, 5 Sep 2023 18:04:58 +0000
From:   Dexuan Cui <decui@...rosoft.com>
To:     "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
        jason <jason@...c4.com>, "Lutomirski, Andy" <luto@...nel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "Hansen, Dave" <dave.hansen@...el.com>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "ak@...ux.intel.com" <ak@...ux.intel.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        KY Srinivasan <kys@...rosoft.com>,
        "nik.borisov@...e.com" <nik.borisov@...e.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "Michael Kelley (LINUX)" <mikelley@...rosoft.com>,
        "chu, jane" <jane.chu@...cle.com>, "hpa@...or.com" <hpa@...or.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        "bp@...en8.de" <bp@...en8.de>, "Luck, Tony" <tony.luck@...el.com>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "sathyanarayanan.kuppuswamy@...ux.intel.com" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        "brijesh.singh@....com" <brijesh.singh@....com>,
        "Williams, Dan J" <dan.j.williams@...el.com>,
        "x86@...nel.org" <x86@...nel.org>
CC:     vkuznets <vkuznets@...hat.com>,
        "Li, Xiaoyao" <xiaoyao.li@...el.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        Anthony Davis <andavis@...hat.com>,
        Mark Heslin <mheslin@...hat.com>
Subject: RE: [PATCH v10 2/2] x86/tdx: Support vmalloc() for
 tdx_enc_status_changed()

> From: Edgecombe, Rick P <rick.p.edgecombe@...el.com>
> Sent: Tuesday, September 5, 2023 9:25 AM
> [...]
> On Fri, 2023-08-11 at 14:48 -0700, Dexuan Cui wrote:
> > When a TDX guest runs on Hyper-V, the hv_netvsc driver's
> > netvsc_init_buf()
> > allocates buffers using vzalloc(), and needs to share the buffers
> > with the
> > host OS by calling set_memory_decrypted(), which is not working for
> > vmalloc() yet. Add the support by handling the pages one by one.
> >
> > Co-developed-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > Reviewed-by: Michael Kelley <mikelley@...rosoft.com>
> > Reviewed-by: Kuppuswamy Sathyanarayanan
> > <sathyanarayanan.kuppuswamy@...ux.intel.com>
> > Signed-off-by: Dexuan Cui <decui@...rosoft.com>
> > ---
> >  arch/x86/coco/tdx/tdx.c | 36 ++++++++++++++++++++++++++++++------
> >  1 file changed, 30 insertions(+), 6 deletions(-)
> 
> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@...el.com>
Thanks!

> Only small comment, it is possible to have huge vmalloc's now, which
> would mean this would do 512 TDVMCALL_MAP_GPA calls instead of 1 when
> encountering a huge vmalloc mapping. If this used lookup_address()
> directly instead of slow_virt_to_phys(), it could catch this case. I
> don't think there are any cases of huge vmallocs today that would get
> passed into set_memory_en/decrypted(), so would only be future
> proofing.
Thanks for the suggestion! So I think let's keep the code as-is for 
simplicity. We can enhance the code in future when it's necessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ