Re: [PATCH 09/10] PM: hibernate: Verify the digest encryption key

From: Eric Biggers
Date: Tue Aug 02 2022 - 18:51:13 EST


On Wed, May 04, 2022 at 04:21:01PM -0700, Evan Green wrote:
> + /* TPML_PCR_SELECTION.count */
> + if (be32_to_cpu(*(int *)payload->creation) != 1) {
> + ret = -EINVAL;
> + goto out;
> + }

Make sure to run sparse by passing C=1 to make. It will find bugs like this
where the wrong type is being used (int instead of __be32 here).

- Eric