summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorRuoyu Wang <ruoyuw560@gmail.com>2026-08-21 04:38:05 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2026-08-25 18:13:34 +0300
commit8b92687708f5ef980de01c2042dbd76d11f78547 (patch)
treec4e57acebca90ab5b26ae348d422fb5d75d9a3e9 /tools/perf/scripts/python/bin/stackcollapse-record
parentb4d1adc70471d0752bba674552d19971ed9fa869 (diff)
tpm: st33zp24: Return zero on status read failure
st33zp24_status() ignores the result of the transport read and returns data even when no byte was received. The I2C transport, for example, skips i2c_master_recv() when the register-select write is short or fails, leaving data uninitialized. The resulting stack value can be interpreted as TPM_STS flags and let status checks complete spuriously. The status callback cannot propagate a transport error. Return zero unless recv() reports exactly one byte. With no status bits set, callers retry or take their existing timeout or error path instead of acting on an invalid status value. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 251a7b08213a ("TPM: STMicroelectronics ST33 I2C KERNEL 3.x") Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com> Link: https://lore.kernel.org/r/20260813153032.3951878-1-ruoyuw560@gmail.com Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions