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: <6b6e7f943b7e28fa6ae6c77e1002ac61c41c1ee2.camel@intel.com>
Date:   Wed, 6 Sep 2023 01:27:35 +0000
From:   "Huang, Kai" <kai.huang@...el.com>
To:     "Jason@...c4.com" <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>,
        "haiyangz@...rosoft.com" <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>,
        "kys@...rosoft.com" <kys@...rosoft.com>,
        "Cui, Dexuan" <decui@...rosoft.com>,
        "nik.borisov@...e.com" <nik.borisov@...e.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "mikelley@...rosoft.com" <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:     "mheslin@...hat.com" <mheslin@...hat.com>,
        "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
        "Tianyu.Lan@...rosoft.com" <Tianyu.Lan@...rosoft.com>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "Li, Xiaoyao" <xiaoyao.li@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "andavis@...hat.com" <andavis@...hat.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
Subject: Re: [PATCH v10 2/2] x86/tdx: Support vmalloc() for
 tdx_enc_status_changed()

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>

Acked-by: Kai Huang <kai.huang@...el.com>

One nit below ...

[...]


>  
> -	if (!tdx_map_gpa(start, end, enc))
> +	if (offset_in_page(start) != 0)
>  		return false;

... 	"!= 0" isn't needed.


Or should we even WARN()?  IIUC by reaching here the caller should already
verified both address and size are page aligned, but I didn't do full check.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ