]> asedeno.scripts.mit.edu Git - linux.git/commit
tpm: Simplify the measurements loop
authorJia Zhang <zhang.jia@linux.alibaba.com>
Fri, 11 Jan 2019 08:59:32 +0000 (16:59 +0800)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 13 Feb 2019 07:47:00 +0000 (09:47 +0200)
commitbb3b6b0fc57182b568ded61c55eff8a02fcfe27b
treef05b6ecfd53614425b7bd3efc20f63f617f40e3a
parent442601e87a4769a8daba4976ec3afa5222ca211d
tpm: Simplify the measurements loop

The responsibility of tpm1_bios_measurements_start() is to walk over the
first *pos measurements, ensuring the skipped and to-be-read
measurements are not out-of-boundary.

This commit simplifies the loop by employing a do-while loop with
the necessary sanity check.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
Reviewd-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/eventlog/tpm1.c