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:   Fri, 1 Oct 2021 21:17:33 +0800
From:   Tianyu Lan <ltykernel@...il.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
        wei.liu@...nel.org, decui@...rosoft.com, tglx@...utronix.de,
        mingo@...hat.com, x86@...nel.org, hpa@...or.com,
        dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
        davem@...emloft.net, kuba@...nel.org, gregkh@...uxfoundation.org,
        arnd@...db.de, brijesh.singh@....com, jroedel@...e.de,
        Tianyu.Lan@...rosoft.com, thomas.lendacky@....com,
        pgonda@...gle.com, akpm@...ux-foundation.org, rppt@...nel.org,
        kirill.shutemov@...ux.intel.com, saravanand@...com,
        aneesh.kumar@...ux.ibm.com, rientjes@...gle.com, tj@...nel.org,
        michael.h.kelley@...rosoft.com, linux-arch@...r.kernel.org,
        linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, vkuznets@...hat.com,
        konrad.wilk@...cle.com, hch@....de, robin.murphy@....com,
        joro@...tes.org, parri.andrea@...il.com, dave.hansen@...el.com
Subject: Re: [PATCH V6 3/8] x86/hyperv: Add new hvcall guest address host
 visibility support

Hi Boris:
	Thanks for your review.

On 10/1/2021 2:02 AM, Borislav Petkov wrote:
> On Thu, Sep 30, 2021 at 09:05:39AM -0400, Tianyu Lan wrote:
>> @@ -1980,15 +1982,11 @@ int set_memory_global(unsigned long addr, int numpages)
>>   				    __pgprot(_PAGE_GLOBAL), 0);
>>   }
>>   
>> -static int __set_memory_enc_dec(unsigned long addr, int numpages, bool enc)
>> +static int __set_memory_enc_pgtable(unsigned long addr, int numpages, bool enc)
> 
> What exactly is that "pgtable" at the end of the name supposed to mean?
> 

This was suggested by Dave Hansen. It gets used for the hypervisors
that get informed about "encryption" status via page tables: SEV and TDX.

https://lore.kernel.org/linux-iommu/c00e269c-da4c-c703-0182-0221c73a76cc@intel.com/

> So if you want to have different indirections here, I'd suggest you do
> this:
> 
> set_memory_encrypted/decrypted() is the external API. It calls
> 
> _set_memory_enc_dec() which does your hv_* checks. Note the single
> underscore "_" prefix.
> 
> Then, the workhorse remains __set_memory_enc_dec().
> 
> Ok?
> 
> Also, we're reworking the mem_encrypt_active() accessors:
> 
> https://lkml.kernel.org/r/20210928191009.32551-1-bp@alien8.de
> 
> so some synchronization when juggling patchsets will be needed. JFYI
> anyway.

Thanks for reminder. I know that patchset and suggested to decouple 
dependency among SEV, TDX and Hyper=v patchset.

> 
> Also 2, building your set triggers this, dunno if I'm missing some
> patches on my local branch for that.

Thanks for your test. Missing hv_set_register() when CONFIG_HYPERV is 
not selected. I will fix it in the next version.

> 
> In file included from ./arch/x86/include/asm/mshyperv.h:240,
>                   from ./include/clocksource/hyperv_timer.h:18,
>                   from ./arch/x86/include/asm/vdso/gettimeofday.h:21,
>                   from ./include/vdso/datapage.h:137,
>                   from ./arch/x86/include/asm/vgtod.h:12,
>                   from arch/x86/entry/vdso/vma.c:20:
> ./include/asm-generic/mshyperv.h: In function ‘vmbus_signal_eom’:
> ./include/asm-generic/mshyperv.h:153:3: error: implicit declaration of function ‘hv_set_register’; did you mean ‘kset_register’? [-Werror=implicit-function-declaration]
>    153 |   hv_set_register(HV_REGISTER_EOM, 0);
>        |   ^~~~~~~~~~~~~~~
>        |   kset_register
> In file included from ./arch/x86/include/asm/mshyperv.h:240,
>                   from arch/x86/mm/pat/set_memory.c:34:
> ./include/asm-generic/mshyperv.h: In function ‘vmbus_signal_eom’:
> ...
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ