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

Cordoba Malibran, Erich erich.cordoba.malibran at intel.com
Tue Jul 10 04:51:56 UTC 2018


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




More information about the Starlingx-discuss mailing list