[Starlingx-discuss] tpm-kmod patches cannot be applied with upstream code

McKenna, Jason Jason.McKenna at windriver.com
Wed Jul 11 13:33:31 UTC 2018


Hi Erich,

e6aef069b is closer to what has been tested, so I'd recommend going with that.

-Jason

-----Original Message-----
From: Cordoba Malibran, Erich <erich.cordoba.malibran at intel.com> 
Sent: July 10, 2018 4:21 PM
To: McKenna, Jason <Jason.McKenna at windriver.com>; Rowsell, Brent <Brent.Rowsell at windriver.com>; starlingx-discuss at lists.starlingx.io
Subject: Re: [Starlingx-discuss] tpm-kmod patches cannot be applied with upstream code

Thanks Jason for the explanation, now makes sense. 

I can create the story, what do you think would be the proper snapshot to recreate the patches? fd5c78694 or e6aef069b?

-Erich

On 7/10/18, 2:21 PM, "McKenna, Jason" <Jason.McKenna at windriver.com> wrote:

    Hi Eric,
    
    I dug into the origin of the our version of tpm-kmod-668a8270.tar.gz, and it looks like our tarball was generated from an incomplete view of the git tree, and therefore the patches were generated against  the incomplete code.  Specifically, commit 3b395d67 appears to be missing in our tarball (this is the commit immediately before the fd5c78694 commit the .txt file claims the tarball represents).  Our tarball is does also include the e6aef069b commit (the immediately after fd5c78694).
    
    $ git log
    ...
    future
    e6aef069b <--- rev the tarball actually is (less 3b39d67 commit)
    fd5c78694 <--- rev the .txt claims to be
    3b395d67 <--- our tarball missing this commit
    past
    ...
    
    So to recreate the tarball, you'd checkout e6aef069b, revert 3b395d67, and tar up the drivers/char/tpm directory.
    
    It might be worthwhile creating a story to regenerate the patches against a proper snapshot of the git.
    
    -Jason
    
    -----Original Message-----
    From: Cordoba Malibran, Erich <erich.cordoba.malibran at intel.com> 
    Sent: July 10, 2018 11:22 AM
    To: Rowsell, Brent <Brent.Rowsell at windriver.com>; starlingx-discuss at lists.starlingx.io
    Subject: Re: [Starlingx-discuss] tpm-kmod patches cannot be applied with upstream code
    
    Hi Brent, 
    
    This is not upversioning, we are trying to use the same version, according to the tpm-kmod-668a8270.txt file in cgcs-dl repository the SHA used is fd5c78694 from http://git.infradead.org/users/jjs/linux-tpmdd.git/ but the code there is not the same as the content of tpm-kmod-668a8270.tar.gz in cgcs-dl. 
    
    That's why the question about where to find the correct code for tpm-kmod.
    
    -Erich
    
    On 7/10/18, 6:20 AM, "Rowsell, Brent" <Brent.Rowsell at windriver.com> wrote:
    
        Erich,
        
        Why are we upversioning this now ? 
        
        Brent 
        
        -----Original Message-----
        From: Cordoba Malibran, Erich [mailto:erich.cordoba.malibran at intel.com] 
        Sent: Tuesday, July 10, 2018 12:52 AM
        To: starlingx-discuss at lists.starlingx.io
        Subject: [Starlingx-discuss] tpm-kmod patches cannot be applied with upstream code
        
        Hi all, 
        
        I'm having problems to apply the patches for tpm-kmod with the code from upstream.
        The following patch to the tpm_crb.c file is failing: 0001-disable-arm64-acpi-command.patch
        
        @@ -572,11 +572,12 @@ static int crb_acpi_add(struct acpi_devi
                         ACPI_TPM2_COMMAND_BUFFER_WITH_SMC);
                     return -EINVAL;
                 }
        -        crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf,
        +        struct tpm2_crb_smc *crb_smc = ACPI_ADD_PTR(struct 
        + tpm2_crb_smc, buf,
                                ACPI_TPM2_START_METHOD_PARAMETER_OFFSET);
                 priv->smc_func_id = crb_smc->smc_func_id;
                 priv->flags |= CRB_FL_CRB_SMC_START;
             }
        +#endif
        
        This patch expects to find 
        
        crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf,
                                ACPI_TPM2_START_METHOD_PARAMETER_OFFSET);
        
        However, in the upstream code this line is : 
        crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf, sizeof(*buf));
        
        I had reviewed all kernel versions and in none of them ACPI_TPM2_START_METHOD_PARAMETER_OFFSET is used. 
        In the old tmp-kmod tarball (the one in cgcs-dl repository) the name of the tarball references to the SHA fd5c78694f3, however that one doesn't have the specified line[0].
        
        Does anyone can help us to find where this upstream code is?
        
        Thanks.
        
        [0] http://git.infradead.org/users/jjs/linux-tpmdd.git/blob/fd5c78694f3:/drivers/char/tpm/tpm_crb.c#l575
        
        
        _______________________________________________
        Starlingx-discuss mailing list
        Starlingx-discuss at lists.starlingx.io
        http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
        
    
    _______________________________________________
    Starlingx-discuss mailing list
    Starlingx-discuss at lists.starlingx.io
    http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
    



More information about the Starlingx-discuss mailing list