Re: [PATCH v11 1/3] x86/tdx: Add TDX Guest attestation interface driver

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

 



On 8/29/22 13:09, Sathyanarayanan Kuppuswamy wrote:
> With the changed format, we avoided the holes, but it still adds 7 bytes of padding.
> 
> Total size of struct is 32 bytes.
> 
> struct tdx_report_req {
> 	__u64                      reportdata;           /*     0     8 */
> 	__u64                      tdreport;             /*     8     8 */
> 	__u32                      rpd_len;              /*    16     4 */
> 	__u32                      tdr_len;              /*    20     4 */
> 	__u8                       subtype;              /*    24     1 */
> 
> 	/* size: 32, cachelines: 1, members: 5 */
> 	/* padding: 7 */
> 	/* last cacheline: 32 bytes */
> };

Might as well make some use of the padding and add:

	u8 reserved[7];

That will ensure that the entire structure is explicitly sized *AND*
leave you room to add flags or other fun in the future without a new ABI.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux