Re: [PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-18 Thread Jia Zhang
On 2019/1/18 下午11:18, Jarkko Sakkinen wrote: > On Thu, Jan 17, 2019 at 09:32:55AM +0800, Jia Zhang wrote: >> >> >> On 2019/1/17 上午6:09, Jarkko Sakkinen wrote: >>> Please use "tpm:" tag for commits, not "tpm/eventlog/tpm1". >>> ... snipped > > OK, got it now. I think I will apply this! Will

Re: [PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-18 Thread Jarkko Sakkinen
On Thu, Jan 17, 2019 at 09:32:55AM +0800, Jia Zhang wrote: > > > On 2019/1/17 上午6:09, Jarkko Sakkinen wrote: > > Please use "tpm:" tag for commits, not "tpm/eventlog/tpm1". > > > > On Fri, Jan 11, 2019 at 04:59:32PM +0800, Jia Zhang wrote: > >> The responsibility of

Re: [PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-16 Thread Jia Zhang
On 2019/1/17 上午6:09, Jarkko Sakkinen wrote: > Please use "tpm:" tag for commits, not "tpm/eventlog/tpm1". > > On Fri, Jan 11, 2019 at 04:59:32PM +0800, Jia Zhang wrote: >> The responsibility of tpm1_bios_measurements_start() is to walk >> over the first *pos measurements, ensuring the skipped

Re: [PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-16 Thread Jarkko Sakkinen
Please use "tpm:" tag for commits, not "tpm/eventlog/tpm1". On Fri, Jan 11, 2019 at 04:59:32PM +0800, Jia Zhang wrote: > 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.

[PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-11 Thread Jia Zhang
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. Current logic is complicated a bit. Just employ a do-while loop with necessary sanity check, and then get the goal.

Re: [PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-11 Thread Jia Zhang
On 2019/1/11 上午1:32, Jarkko Sakkinen wrote: > On Sun, Jan 06, 2019 at 03:23:18PM +0800, Jia Zhang wrote: >> The sanity check would be easier, especially for the first read >> of binary_bios_measurements from the beginning. >> >> Signed-off-by: Jia Zhang > > The cover letter is missing and

Re: [PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-10 Thread Jarkko Sakkinen
On Sun, Jan 06, 2019 at 03:23:18PM +0800, Jia Zhang wrote: > The sanity check would be easier, especially for the first read > of binary_bios_measurements from the beginning. > > Signed-off-by: Jia Zhang The cover letter is missing and commit messages do not describe what kind of change the

[PATCH 1/2] tpm/eventlog/tpm1: Simplify walking over *pos measurements

2019-01-05 Thread Jia Zhang
The sanity check would be easier, especially for the first read of binary_bios_measurements from the beginning. Signed-off-by: Jia Zhang --- drivers/char/tpm/eventlog/tpm1.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git