From e099d7cb2df7eeb2bb1b6d81d3f13265c0f86761 Mon Sep 17 00:00:00 2001 From: Erich Cordoba Date: Wed, 11 Jul 2018 19:15:30 -0500 Subject: [PATCH] Update TPM patches to be built with upstream code The original TPM patches were applied to a modified version of the TPM module. After the download of tarballs was enabled this patch started to fail. This patch fixes the problem as uses the upstream code to apply the patch. Story: 2002945 Task: 22938 Depends-On: https://review.openstack.org/581915 Change-Id: I54d1a4655cd0dec84b6fb6d1bd2bc83e0d068c5c Signed-off-by: Erich Cordoba Signed-off-by: Scott Little --- kernel/kernel-modules/tpmdd/centos/build_srpm.data | 2 +- kernel/kernel-modules/tpmdd/centos/tpm-kmod.spec | 2 +- .../tpmdd/patches/0001-disable-arm64-acpi-command.patch | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/kernel-modules/tpmdd/centos/build_srpm.data b/kernel/kernel-modules/tpmdd/centos/build_srpm.data index 128c19a5c..a3a69c84e 100644 --- a/kernel/kernel-modules/tpmdd/centos/build_srpm.data +++ b/kernel/kernel-modules/tpmdd/centos/build_srpm.data @@ -1,5 +1,5 @@ COPY_LIST=" \ $PKG_BASE/files/* \ $PKG_BASE/patches/* \ - $STX_BASE/downloads/tpm-kmod-668a8270.tar.gz" + $STX_BASE/downloads/tpm-kmod-e6aef069.tar.gz" TIS_PATCH_VER=5 diff --git a/kernel/kernel-modules/tpmdd/centos/tpm-kmod.spec b/kernel/kernel-modules/tpmdd/centos/tpm-kmod.spec index 65c9fd79b..a6d725fad 100644 --- a/kernel/kernel-modules/tpmdd/centos/tpm-kmod.spec +++ b/kernel/kernel-modules/tpmdd/centos/tpm-kmod.spec @@ -22,7 +22,7 @@ ExclusiveArch: x86_64 # Sources. # the tpmdd is available as a tarball, with # the git commit Id referenced in the name -Source0: %{kmod_name}-kmod-668a8270.tar.gz +Source0: %{kmod_name}-kmod-e6aef069.tar.gz Source1: modules-load.conf Source2: COPYING Source3: README diff --git a/kernel/kernel-modules/tpmdd/patches/0001-disable-arm64-acpi-command.patch b/kernel/kernel-modules/tpmdd/patches/0001-disable-arm64-acpi-command.patch index b6d508888..8a2779340 100644 --- a/kernel/kernel-modules/tpmdd/patches/0001-disable-arm64-acpi-command.patch +++ b/kernel/kernel-modules/tpmdd/patches/0001-disable-arm64-acpi-command.patch @@ -24,13 +24,12 @@ Subject: [PATCH] ARM64 based ACPI commands should not be compiled if (sm == ACPI_TPM2_COMMAND_BUFFER_WITH_SMC) { if (buf->header.length < (sizeof(*buf) + sizeof(*crb_smc))) { dev_err(dev, -@@ -572,11 +572,12 @@ static int crb_acpi_add(struct acpi_devi +@@ -572,10 +572,11 @@ 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); +- crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf, sizeof(*buf)); ++ struct tpm2_crb_smc *crb_smc = ACPI_ADD_PTR(struct tpm2_crb_smc, buf, sizeof(*buf)); priv->smc_func_id = crb_smc->smc_func_id; priv->flags |= CRB_FL_CRB_SMC_START; }