diff mbox

Latest tip of the tree issues

Message ID OF39017581.C0F42D48-ON00258005.0054AEBE-85258005.00562C33@notes.na.collabserv.com (mailing list archive)
State New, archived
Headers show

Commit Message

Stefan Berger Aug. 4, 2016, 3:40 p.m. UTC
Jarkko,

  when building the latest tree I have the following two issues when 
building with modules: 

- missing exported symbols tpm_getcap and tpm2_get_tpm_pt. See the patch 
below that should be squashed into the patch(es) that introduced the 
problem (so one can bisect)

- the probing of TPM 1.2 doesn't work anymore ; the bad patch seems to be 
the tip:

commit 783fa18d7bb7bac20b8591cf575418fce31dd397
Author: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date:   Fri Jun 17 13:12:20 2016 +0200

    tpm: use tpm_pcr_read_dev() in tpm_do_selftest()
 
    Instead of a  ad-hoc protocol message construction it is better to
    call tpm_pcr_read_dev().
 
    Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
    Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>


# dmesg | grep tpm
[    4.385205] tpm_tis 00:05: 1.2 TPM (device-id 0x1, rev-id 1)
[    4.424537] tpm tpm0: TPM self test failed
[    4.426630] tpm_tis: probe of 00:05 failed with error -14

The reason for this is that rc in the following is 0.

       do {
                /* Attempt to read a PCR value */
                rc = tpm_pcr_read_dev(chip, 0, dummy);

Looking at tpm_pcr_read_dev, returning 0 is quite ok.

Stefan



        (sizeof(struct tpm_input_header) + \
------------------------------------------------------------------------------

Comments

Jarkko Sakkinen Aug. 4, 2016, 5:08 p.m. UTC | #1
Stefan,

Since this patch is not going to the next release (it's not merged into
next nor has pull request containing it been sent) can this hold until
next week when I'm back from my four week leave? Thanks.

I'll prioritize this right after I've got through pile of emails early
next week. Thanks and sorry for the inconvience. Next branch should be
ok.


/Jarkko
On Thu, Aug 04, 2016 at 11:40:48AM -0400, Stefan Berger wrote:
>    Jarkko,
> 
>      when building the latest tree I have the following two issues when
>    building with modules:
> 
>    - missing exported symbols tpm_getcap and tpm2_get_tpm_pt. See the patch
>    below that should be squashed into the patch(es) that introduced the
>    problem (so one can bisect)
> 
>    - the probing of TPM 1.2 doesn't work anymore ; the bad patch seems to be
>    the tip:
> 
>    commit 783fa18d7bb7bac20b8591cf575418fce31dd397
>    Author: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>    Date:   Fri Jun 17 13:12:20 2016 +0200
> 
>        tpm: use tpm_pcr_read_dev() in tpm_do_selftest()
>       
>        Instead of a  ad-hoc protocol message construction it is better to
>        call tpm_pcr_read_dev().
>       
>        Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>        Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> 
>    # dmesg | grep tpm
>    [    4.385205] tpm_tis 00:05: 1.2 TPM (device-id 0x1, rev-id 1)
>    [    4.424537] tpm tpm0: TPM self test failed
>    [    4.426630] tpm_tis: probe of 00:05 failed with error -14
> 
>    The reason for this is that rc in the following is 0.
> 
>           do {
>                    /* Attempt to read a PCR value */
>                    rc = tpm_pcr_read_dev(chip, 0, dummy);
> 
>    Looking at tpm_pcr_read_dev, returning 0 is quite ok.
> 
>    Stefan
> 
>    diff --git a/drivers/char/tpm/tpm-interface.c
>    b/drivers/char/tpm/tpm-interface.c
>    index f43cc3f..3722fc0 100644
>    --- a/drivers/char/tpm/tpm-interface.c
>    +++ b/drivers/char/tpm/tpm-interface.c
>    @@ -458,6 +458,7 @@ ssize_t tpm_getcap(struct tpm_chip *chip, __be32
>    subcap_id, cap_t *cap,
>                    *cap = tpm_cmd.params.getcap_out.cap;
>            return rc;
>     }
>    +EXPORT_SYMBOL_GPL(tpm_getcap);
>     
>     #define TPM_ORD_STARTUP cpu_to_be32(153)
>     #define TPM_ST_CLEAR cpu_to_be16(1)
>    diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
>    index e1db404..499f405 100644
>    --- a/drivers/char/tpm/tpm2-cmd.c
>    +++ b/drivers/char/tpm/tpm2-cmd.c
>    @@ -707,6 +707,7 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32
>    property_id,  u32 *value,
>     
>            return rc;
>     }
>    +EXPORT_SYMBOL_GPL(tpm2_get_tpm_pt);
>     
>     #define TPM2_STARTUP_IN_SIZE \
>            (sizeof(struct tpm_input_header) + \

------------------------------------------------------------------------------
diff mbox

Patch

diff --git a/drivers/char/tpm/tpm-interface.c 
b/drivers/char/tpm/tpm-interface.c
index f43cc3f..3722fc0 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -458,6 +458,7 @@  ssize_t tpm_getcap(struct tpm_chip *chip, __be32 
subcap_id, cap_t *cap,
                *cap = tpm_cmd.params.getcap_out.cap;
        return rc;
 }
+EXPORT_SYMBOL_GPL(tpm_getcap);
 
 #define TPM_ORD_STARTUP cpu_to_be32(153)
 #define TPM_ST_CLEAR cpu_to_be16(1)
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index e1db404..499f405 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -707,6 +707,7 @@  ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 
property_id,  u32 *value,
 
        return rc;
 }
+EXPORT_SYMBOL_GPL(tpm2_get_tpm_pt);
 
 #define TPM2_STARTUP_IN_SIZE \