Re: [PATCH v3 2/4] virt: tdx-guest: Calculate the Quote buffer size safely
From: Binbin Wu
Date: Thu Sep 03 2026 - 05:35:27 EST
On 7/29/2026 8:29 PM, Peter Fang wrote:
> struct tdx_quote_buf has a trailing flexible array member.
> struct_size_t() calculates the size of this kind of struct safely. It
> handles overflow, which is an important property since the Quote size
> comes from the host.
>
> Use it in place of the fixed length limit.
>
> Signed-off-by: Peter Fang <peter.fang@xxxxxxxxx>
Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>