diff --git a/0002-Add-macros-to-support-kernels-with-different-compila.patch b/backport-Add-macros-to-support-kernels-with-different-compila.patch similarity index 100% rename from 0002-Add-macros-to-support-kernels-with-different-compila.patch rename to backport-Add-macros-to-support-kernels-with-different-compila.patch diff --git a/0013-Add-missing-header.patch b/backport-Add-missing-header.patch similarity index 100% rename from 0013-Add-missing-header.patch rename to backport-Add-missing-header.patch diff --git a/0007-Clean-code-and-bugfix.patch b/backport-Clean-code-and-bugfix.patch similarity index 100% rename from 0007-Clean-code-and-bugfix.patch rename to backport-Clean-code-and-bugfix.patch diff --git a/0009-Dont-check-pcr-value-when-init-RoT-device.patch b/backport-Dont-check-pcr-value-when-init-RoT-device.patch similarity index 100% rename from 0009-Dont-check-pcr-value-when-init-RoT-device.patch rename to backport-Dont-check-pcr-value-when-init-RoT-device.patch diff --git a/0011-Free-pre-allocated-pages-in-error-branch.patch b/backport-Free-pre-allocated-pages-in-error-branch.patch similarity index 100% rename from 0011-Free-pre-allocated-pages-in-error-branch.patch rename to backport-Free-pre-allocated-pages-in-error-branch.patch diff --git a/0010-Optimize-configurations-related-to-kernel-modules.patch b/backport-Optimize-configurations-related-to-kernel-modules.patch similarity index 100% rename from 0010-Optimize-configurations-related-to-kernel-modules.patch rename to backport-Optimize-configurations-related-to-kernel-modules.patch diff --git a/0012-Set-the-digest-length-to-SHA1-in-binary-measure-log.patch b/backport-Set-the-digest-length-to-SHA1-in-binary-measure-log.patch similarity index 100% rename from 0012-Set-the-digest-length-to-SHA1-in-binary-measure-log.patch rename to backport-Set-the-digest-length-to-SHA1-in-binary-measure-log.patch diff --git a/0006-Support-TPM-boot-aggregate.patch b/backport-Support-TPM-boot-aggregate.patch similarity index 100% rename from 0006-Support-TPM-boot-aggregate.patch rename to backport-Support-TPM-boot-aggregate.patch diff --git a/0005-Support-in-tree-kernel-compilation.patch b/backport-Support-in-tree-kernel-compilation.patch similarity index 100% rename from 0005-Support-in-tree-kernel-compilation.patch rename to backport-Support-in-tree-kernel-compilation.patch diff --git a/0008-Support-kernel-boot-parameter.patch b/backport-Support-kernel-boot-parameter.patch similarity index 100% rename from 0008-Support-kernel-boot-parameter.patch rename to backport-Support-kernel-boot-parameter.patch diff --git a/0004-Support-measure-only-mode.patch b/backport-Support-measure-only-mode.patch similarity index 100% rename from 0004-Support-measure-only-mode.patch rename to backport-Support-measure-only-mode.patch diff --git a/0003-Support-remote-attestation.patch b/backport-Support-remote-attestation.patch similarity index 100% rename from 0003-Support-remote-attestation.patch rename to backport-Support-remote-attestation.patch diff --git a/0001-Support-virtcca.patch b/backport-Support-virtcca.patch similarity index 100% rename from 0001-Support-virtcca.patch rename to backport-Support-virtcca.patch diff --git a/backport-fix-bug-of-code_cmp.patch b/backport-fix-bug-of-code_cmp.patch new file mode 100644 index 0000000000000000000000000000000000000000..195f15ba75d7bce934085ea6b391c94aec6984e7 --- /dev/null +++ b/backport-fix-bug-of-code_cmp.patch @@ -0,0 +1,34 @@ +From cc90096303228190d1624cea4efc7a56f18dc7b5 Mon Sep 17 00:00:00 2001 +From: xuce +Date: Thu, 18 Dec 2025 15:51:40 +0800 +Subject: [PATCH] fix bug of code_cmp + +Signed-off-by: xuce +--- + src/core/tasks/dim_core_measure_kernel.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/core/tasks/dim_core_measure_kernel.c b/src/core/tasks/dim_core_measure_kernel.c +index 502817c..cb15ce8 100644 +--- a/src/core/tasks/dim_core_measure_kernel.c ++++ b/src/core/tasks/dim_core_measure_kernel.c +@@ -26,7 +26,15 @@ + + static int code_cmp(const void *a, const void *b) + { +- return *(unsigned long *)a > *(unsigned long *)b ? 1 : 0; ++ ++ if (*(unsigned long *)a > *(unsigned long *)b) ++ return 1; ++ ++ ++ if (*(unsigned long *)a < *(unsigned long *)b) ++ return -1; ++ ++ return 0; + } + + static int sort_jump_table(struct jump_entry *sjump, +-- +2.43.0 + diff --git a/0001-fix-some-build-errors.patch b/backport-fix-some-build-errors.patch similarity index 100% rename from 0001-fix-some-build-errors.patch rename to backport-fix-some-build-errors.patch diff --git a/dim.spec b/dim.spec index 290e616886ce8215150ef987a0ef19702b2debd2..e07dcb25f59fab6ed7f97e3a1a6533eb0f3e5896 100644 --- a/dim.spec +++ b/dim.spec @@ -22,7 +22,7 @@ mv $module_path/dim_monitor.ko.sig $module_path/dim_monitor.ko ||: \ Name : dim Summary : Dynamic Integrity Measurement Version : 1.0.2 -Release : 11 +Release : 13 License : GPL-2.0 Source0 : %{name}-v%{version}.tar.gz BuildRequires: kernel-devel kernel-headers @@ -81,20 +81,21 @@ Patch0051: backport-add-parameter-check.patch Patch0052: backport-Fix-deadlock-issue-in-directory-iterating.patch Patch0053: backport-Optimized-directory-suffix-matching.patch Patch0054: backport-Resolved-the-problem-that-the-jump_label_lock-isrepe.patch -Patch0055: 0001-Support-virtcca.patch -Patch0056: 0002-Add-macros-to-support-kernels-with-different-compila.patch -Patch0057: 0003-Support-remote-attestation.patch -Patch0058: 0004-Support-measure-only-mode.patch -Patch0059: 0005-Support-in-tree-kernel-compilation.patch -Patch0060: 0006-Support-TPM-boot-aggregate.patch -Patch0061: 0007-Clean-code-and-bugfix.patch -Patch0062: 0008-Support-kernel-boot-parameter.patch -Patch0063: 0009-Dont-check-pcr-value-when-init-RoT-device.patch -Patch0064: 0010-Optimize-configurations-related-to-kernel-modules.patch -Patch0065: 0011-Free-pre-allocated-pages-in-error-branch.patch -Patch0066: 0012-Set-the-digest-length-to-SHA1-in-binary-measure-log.patch -Patch0067: 0013-Add-missing-header.patch -Patch0068: 0001-fix-some-build-errors.patch +Patch0055: backport-Support-virtcca.patch +Patch0056: backport-Add-macros-to-support-kernels-with-different-compila.patch +Patch0057: backport-Support-remote-attestation.patch +Patch0058: backport-Support-measure-only-mode.patch +Patch0059: backport-Support-in-tree-kernel-compilation.patch +Patch0060: backport-Support-TPM-boot-aggregate.patch +Patch0061: backport-Clean-code-and-bugfix.patch +Patch0062: backport-Support-kernel-boot-parameter.patch +Patch0063: backport-Dont-check-pcr-value-when-init-RoT-device.patch +Patch0064: backport-Optimize-configurations-related-to-kernel-modules.patch +Patch0065: backport-Free-pre-allocated-pages-in-error-branch.patch +Patch0066: backport-Set-the-digest-length-to-SHA1-in-binary-measure-log.patch +Patch0067: backport-Add-missing-header.patch +Patch0068: backport-fix-some-build-errors.patch +Patch0069: backport-fix-bug-of-code_cmp.patch %description Dynamic Integrity Measurement @@ -133,6 +134,12 @@ rm -rf %{buildroot} %attr(0400,root,root) /lib/modules/%{kernel_version}/extra/dim/dim_monitor.ko %changelog +* Thu Dec 18 2025 xuce 1.0.2-13 +- fix bug of code_cmp + +* Thu Dec 18 2025 xuce 1.0.2-12 +- fix patch name + * Wed Dec 17 2025 xuce 1.0.2-11 - backport some patches to support dim rot/measure only/binary log