[tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-17 Thread Stefan Berger
tpm_bios_log_setup() may return -ENODEV in case no log was found. In this case we do not need to fail the device. Signed-off-by: Stefan Berger --- drivers/char/tpm/tpm-chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [tpmdd-devel] [PATCH] tpm: vtpm_proxy: Do not access host's event log

2016-11-17 Thread Jason Gunthorpe
On Thu, Nov 17, 2016 at 01:25:54PM -0500, Stefan Berger wrote: > > In the case of x86, tpm_read_log_of() is a stub return -ENODEV, which in > turn fails the whole device: Somehow this got screwed up during the lengthy review. ENODEV is the right return from the leaf routines but the tests in

Re: [tpmdd-devel] [PATCH] tpm: vtpm_proxy: Do not access host's event log

2016-11-17 Thread Jason Gunthorpe
1;2802;0cOn Thu, Nov 17, 2016 at 07:35:05AM -0500, Stefan Berger wrote: > I ran the vtpm driver test suite (with -j32) a few times at that patch and > it didn't crash. It crashes severely with later patches applied. Here's the > current experimental patch that fixes these problems: I can't see

Re: [tpmdd-devel] [PATCH] tpm: drop chip->is_open and chip->duration_adjusted

2016-11-17 Thread Jarkko Sakkinen
On Thu, Nov 17, 2016 at 04:10:29PM +0530, Nayna wrote: > On 11/15/2016 05:14 AM, Jarkko Sakkinen wrote: > > - if (chip->flags & (TPM_CHIP_FLAG_TPM2 | TPM_CHIP_FLAG_VIRTUAL)) > > - return 0; > > + if (test_bit(TPM_CHIP_FLAG_TPM2, >flags) || > > + test_bit(TPM_CHIP_FLAG_VIRTUAL,

Re: [tpmdd-devel] [PATCH RFC 2/2] tpm: refactor tpm2_get_tpm_pt to tpm2_getcap_cmd

2016-11-17 Thread Nayna
On 11/12/2016 05:32 AM, Jarkko Sakkinen wrote: > On Fri, Nov 11, 2016 at 09:51:45AM +0530, Nayna wrote: >> >> >> On 10/09/2016 03:44 PM, Jarkko Sakkinen wrote: >>> Refactored tpm2_get_tpm_pt to tpm2_getcap_cmd, which means that it also >>> takes capability ID as input. This is required to access