lkml.org 
[lkml]   [2022]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH V2 10/18] drivers: hv: Decrypt percpu hvcall input arg page in sev-snp enlightened guest
From
On 12/15/2022 2:16 AM, Michael Kelley (LINUX) wrote:
>> @@ -134,6 +136,16 @@ int hv_common_cpu_init(unsigned int cpu)
>> if (!(*inputarg))
>> return -ENOMEM;
>>
>> + if (hv_isolation_type_en_snp()) {
>> + ret = set_memory_decrypted((unsigned long)*inputarg, 1);
>> + if (ret) {
>> + kfree(*inputarg);
> After the kfree(), set *inputarg back to NULL. There's other code that
> tests the value of *inputarg to know if the per-CPU hypercall page has
> been successfully allocated.
>

Good point! Will add in the next version.

\
 
 \ /
  Last update: 2023-03-26 23:20    [W:0.056 / U:3.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site