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

Lin, Shuicheng shuicheng.lin at intel.com
Tue Jul 10 08:35:41 UTC 2018


Hi Erich,
Please check below link, the definition of "ACPI_TPM2_START_METHOD_PARAMETER_OFFSET" is removed.
I think you could update the patch to use the upstream code.
https://sourceforge.net/p/tpmdd/mailman/message/35770085/
https://patchwork.kernel.org/patch/9663779/


Best Regards
Shuicheng


-----Original Message-----
From: Cordoba Malibran, Erich [mailto:erich.cordoba.malibran at intel.com] 
Sent: Tuesday, July 10, 2018 12:52 PM
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


More information about the Starlingx-discuss mailing list