From 2e2da431f7bc8c53fdf43e7c11eb28417be44895 Mon Sep 17 00:00:00 2001 From: Shuicheng Lin Date: Wed, 30 Jan 2019 23:54:55 +0800 Subject: [PATCH] Fix compile error for integrity driver integrity tarball in my local mirror is wrong, cause the patch is not correct. Correct the patch with the right tarball. Story: 2004521 Task: 29194 Change-Id: Iee0e7afa12b8583d1bb3d620a5f7626a28f57fed Signed-off-by: Shuicheng Lin --- .../integrity/centos/build_srpm.data | 2 +- .../Changes-for-CentOS-7.6-support.patch | 50 ++----------------- 2 files changed, 5 insertions(+), 47 deletions(-) diff --git a/kernel/kernel-modules/integrity/centos/build_srpm.data b/kernel/kernel-modules/integrity/centos/build_srpm.data index 76557562e..1e3f38ac0 100644 --- a/kernel/kernel-modules/integrity/centos/build_srpm.data +++ b/kernel/kernel-modules/integrity/centos/build_srpm.data @@ -2,4 +2,4 @@ COPY_LIST=" \ $FILES_BASE/* \ $PATCHES_BASE/* \ $STX_BASE/downloads/integrity-kmod-e6aef069.tar.gz" -TIS_PATCH_VER=6 +TIS_PATCH_VER=7 diff --git a/kernel/kernel-modules/integrity/centos/patches/Changes-for-CentOS-7.6-support.patch b/kernel/kernel-modules/integrity/centos/patches/Changes-for-CentOS-7.6-support.patch index 869ca3396..4d8c62473 100644 --- a/kernel/kernel-modules/integrity/centos/patches/Changes-for-CentOS-7.6-support.patch +++ b/kernel/kernel-modules/integrity/centos/patches/Changes-for-CentOS-7.6-support.patch @@ -29,13 +29,10 @@ Tested-by: PrasannaKumar Muralidharan Signed-off-by: Shuicheng Lin --- - ima/ima_crypto.c | 2 +- - ima/ima_init.c | 2 +- - ima/ima_queue.c | 2 +- - integrity/ima/ima_crypto.c | 2 +- - integrity/ima/ima_init.c | 2 +- - integrity/ima/ima_queue.c | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) + ima/ima_crypto.c | 2 +- + ima/ima_init.c | 2 +- + ima/ima_queue.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ima/ima_crypto.c b/ima/ima_crypto.c index 802d5d2..3371d13 100644 @@ -71,45 +68,6 @@ index d9aa5ab..9946363 100644 if (!ima_used_chip) return result; -- result = tpm_pcr_extend(TPM_ANY_NUM, pcr, hash); -+ result = tpm_pcr_extend(NULL, pcr, hash); - if (result != 0) - pr_err("Error Communicating to TPM chip, result: %d\n", result); - return result; -diff --git a/integrity/ima/ima_crypto.c b/integrity/ima/ima_crypto.c -index 802d5d2..3371d13 100644 ---- a/integrity/ima/ima_crypto.c -+++ b/integrity/ima/ima_crypto.c -@@ -644,7 +644,7 @@ static void __init ima_pcrread(int idx, u8 *pcr) - if (!ima_used_chip) - return; - -- if (tpm_pcr_read(TPM_ANY_NUM, idx, pcr) != 0) -+ if (tpm_pcr_read(NULL, idx, pcr) != 0) - pr_err("Error Communicating to TPM chip\n"); - } - -diff --git a/integrity/ima/ima_init.c b/integrity/ima/ima_init.c -index 2967d49..29b72cd 100644 ---- a/integrity/ima/ima_init.c -+++ b/integrity/ima/ima_init.c -@@ -110,7 +110,7 @@ int __init ima_init(void) - int rc; - - ima_used_chip = 0; -- rc = tpm_pcr_read(TPM_ANY_NUM, 0, pcr_i); -+ rc = tpm_pcr_read(NULL, 0, pcr_i); - if (rc == 0) - ima_used_chip = 1; - -diff --git a/integrity/ima/ima_queue.c b/integrity/ima/ima_queue.c -index d9aa5ab..9946363 100644 ---- a/integrity/ima/ima_queue.c -+++ b/integrity/ima/ima_queue.c -@@ -145,7 +145,7 @@ static int ima_pcr_extend(const u8 *hash, int pcr) - if (!ima_used_chip) - return result; - - result = tpm_pcr_extend(TPM_ANY_NUM, pcr, hash); + result = tpm_pcr_extend(NULL, pcr, hash); if (result != 0)