fix dim build error
This commit is contained in:
parent
f7a1c56f1d
commit
804f2cbd36
7
dim.spec
7
dim.spec
@ -4,7 +4,7 @@
|
|||||||
Name : dim
|
Name : dim
|
||||||
Summary : Dynamic Integrity Measurement
|
Summary : Dynamic Integrity Measurement
|
||||||
Version : 1.0.2
|
Version : 1.0.2
|
||||||
Release : 4
|
Release : 5
|
||||||
License : GPL-2.0
|
License : GPL-2.0
|
||||||
Source0 : %{name}-v%{version}.tar.gz
|
Source0 : %{name}-v%{version}.tar.gz
|
||||||
BuildRequires: kernel-devel kernel-headers
|
BuildRequires: kernel-devel kernel-headers
|
||||||
@ -13,7 +13,7 @@ Requires : kernel
|
|||||||
Patch0001: Limit-the-max-line-number-of-policy-and-baseline-par.patch
|
Patch0001: Limit-the-max-line-number-of-policy-and-baseline-par.patch
|
||||||
Patch0002: Use-jiffies64-interface-to-set-measure-interval.patch
|
Patch0002: Use-jiffies64-interface-to-set-measure-interval.patch
|
||||||
Patch0003: Add-the-owner-of-file-operations.patch
|
Patch0003: Add-the-owner-of-file-operations.patch
|
||||||
|
Patch0004: fix-build-error-in-kernel-6.6.patch
|
||||||
%description
|
%description
|
||||||
Dynamic Integrity Measurement
|
Dynamic Integrity Measurement
|
||||||
|
|
||||||
@ -51,6 +51,9 @@ rm -rf %{buildroot}
|
|||||||
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/dim/dim_monitor.ko
|
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/dim/dim_monitor.ko
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 26 2024 jinlun <jinlun@huawei.com> 1.0.2-5
|
||||||
|
- The compilation error asused by the kernel upgrade is rectified.
|
||||||
|
|
||||||
* Mon Sep 18 2023 jinlun <jinlun@huawei.com> 1.0.2-4
|
* Mon Sep 18 2023 jinlun <jinlun@huawei.com> 1.0.2-4
|
||||||
- Fix the concurrent issues with removing module and accessing interfaces.
|
- Fix the concurrent issues with removing module and accessing interfaces.
|
||||||
|
|
||||||
|
|||||||
28
fix-build-error-in-kernel-6.6.patch
Normal file
28
fix-build-error-in-kernel-6.6.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From dd7f8dd49e927be2219a34bf88d09e80a0e6446d Mon Sep 17 00:00:00 2001
|
||||||
|
From: jinlun <jinlun@huawei.com>
|
||||||
|
Date: Fri, 26 Jan 2024 15:22:42 +0800
|
||||||
|
Subject: [PATCH] fix build error in kernel-6.6
|
||||||
|
|
||||||
|
---
|
||||||
|
src/core/dim_core_measure_task.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/core/dim_core_measure_task.c b/src/core/dim_core_measure_task.c
|
||||||
|
index f9c53f0..f70d701 100644
|
||||||
|
--- a/src/core/dim_core_measure_task.c
|
||||||
|
+++ b/src/core/dim_core_measure_task.c
|
||||||
|
@@ -223,7 +223,11 @@ static int update_vma_digest(struct vm_area_struct *vma_start,
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
ret_pages = get_user_pages_remote(vma_start->vm_mm, addr_start, nr_pages,
|
||||||
|
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,4,0)
|
||||||
|
0, pages, NULL, NULL);
|
||||||
|
+#else
|
||||||
|
+ 0, pages, NULL);
|
||||||
|
+#endif
|
||||||
|
if (ret_pages < 0) {
|
||||||
|
dim_err("fail to get vma pages: %ld\n", ret_pages);
|
||||||
|
vfree(pages);
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user