[PATCH v3 5/5] tpm-buf: Make tpm_buf_read*() fallible

sashiko-bot at kernel.org sashiko-bot at kernel.org
Mon Nov 16 01:09:31 UTC 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] tpm-buf: commit message says @offset instead of @value for
  tpm_buf_read*()
--

commit 1b879beddad8b2ec7e0adcfdce0e0fbb6825a4f9
Author: Jarkko Sakkinen <jarkko at kernel.org>

tpm-buf: Make tpm_buf_read*() fallible

This commit changes tpm_buf_read_u8(), tpm_buf_read_u16(), and
tpm_buf_read_u32() to return a boolean status and write the read word into
an output parameter, updating callers to check for out-of-bounds reads.

> Make tpm_buf_read_u8(), tpm_buf_read_u16() and tpm_buf_read_u32() flows
> unambiguous, and fallible by writing the updated offset to @offset.

[Severity: Low]
This isn't a bug, but the commit message says @offset where the patch adds
a @value output parameter for the read word; @offset was already updated in
place before this change.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116005105.1573016-1-jarkko@kernel.org?part=5



More information about the Linux-security-module-archive mailing list