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

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

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux