[lkml]   [2019]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v7 5/5] tpm: pass an array of tpm_extend_digest structures to tpm_pcr_extend()
On Mon, Jan 21, 2019 at 10:58:22AM +0100, Roberto Sassu wrote:
> Agreed, there should be a clear division.
> 1) The caller shouldn't need to know anything about the chip->info.
> 2) The TPM driver should not rely on the caller to supply all the
> hashes, but verify that all allocated banks are being extended.

1. It is just plain wrong if the basic extend function
invents its own dummy hashes when it doesn't get one. In the end,
this is what matters to me, and I'm not going to accept anything that
tries to do that. That is something that caller should prepare.

You even left undocumented this very awkward and unguessable
behaviour. I think redundancy is better than doing guesswork what
a function might possibly do other than its basic task, which is
constructing the extend command.
2. The driver should return -EINVAL, if it doesn't get all the hashes.
3. The would be nothing wrong exposing struct tpm_chip in
include/linux/tpm.h. I would be totally fine with that.


 \ /
  Last update: 2019-01-21 13:38    [W:0.077 / U:0.340 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site