Re: [PATCH v2 3/3] selftests/tdx: Test GetQuote TDX attestation feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/26/23 08:47, Dionna Amalie Glaze wrote:
>> +/* Helper function to get TDREPORT */
>> +long get_tdreport0(int devfd, struct tdx_report_req *req)
>> +{
>> +       int i;
>> +
>> +       /* Generate sample report data */
>> +       for (i = 0; i < TDX_REPORTDATA_LEN; i++)
>> +               req->reportdata[i] = i;
>> +
> Shouldn't req be zeroed before populating reportdata? We wouldn't want
> uninitialized memory to leave the guest. I know this is just a test,
> but it's best to model good practices for anyone that might
> copy/paste.

It's leaving the guest and going to the TDX module.  What's the problem
there?



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux