Re: [PATCH] net/nfc/nci: use memset avoid infoleaks
From: Krzysztof Kozlowski
Date: Tue Mar 01 2022 - 05:24:10 EST
On 01/03/2022 10:34, Lv Ruyi wrote:
> hello sir
>
> I think this way: On 64-bit systems, struct nci_set_config_param has
> an added padding of 7 bytes between struct members id and len. Even
> though all struct members are initialized, the 7-byte hole will
> contain data from the kernel stack.
>
That's reasonable. This explanation should be mentioned in the commit
msg. Also just initialize the array to 0, instead of separate memset call.
Best regards,
Krzysztof