2023-09-04 19:47:51 +08:00
|
|
|
%global debug_package %{nil}
|
|
|
|
|
%define kernel_version %(ver=`rpm -qa|grep kernel-devel`;echo ${ver#*kernel-devel-})
|
|
|
|
|
|
|
|
|
|
Name : dim
|
|
|
|
|
Summary : Dynamic Integrity Measurement
|
|
|
|
|
Version : 1.0.2
|
2024-04-16 10:12:20 +08:00
|
|
|
Release : 6
|
2023-09-04 19:47:51 +08:00
|
|
|
License : GPL-2.0
|
|
|
|
|
Source0 : %{name}-v%{version}.tar.gz
|
|
|
|
|
BuildRequires: kernel-devel kernel-headers
|
|
|
|
|
Requires : kernel
|
|
|
|
|
|
2023-09-14 12:40:30 +08:00
|
|
|
Patch0001: Limit-the-max-line-number-of-policy-and-baseline-par.patch
|
2023-09-14 14:26:16 +08:00
|
|
|
Patch0002: Use-jiffies64-interface-to-set-measure-interval.patch
|
2023-09-18 20:35:20 +08:00
|
|
|
Patch0003: Add-the-owner-of-file-operations.patch
|
2024-04-16 10:12:20 +08:00
|
|
|
Patch0004: backport-dim-add-test-code.patch
|
|
|
|
|
Patch0005: backport-fix-the-magic-number.patch
|
|
|
|
|
Patch0006: backport-some-word.patch
|
|
|
|
|
Patch0007: backport-update-src-common-dim_baseline.c.patch
|
|
|
|
|
Patch0008: backport-fix-build-error-in-kernel-6.6.patch
|
|
|
|
|
Patch0009: backport-fix-build-error.patch
|
|
|
|
|
Patch0010: backport-Refactor-the-measurement-code.patch
|
|
|
|
|
Patch0011: backport-Refactor-dim_core-policy-and-support-the-action-poli.patch
|
|
|
|
|
Patch0012: backport-Refactor-the-dim_core-static-baseline-implement.patch
|
|
|
|
|
Patch0013: backport-Support-user-process-measurement-by-ELF-parsing.patch
|
|
|
|
|
Patch0014: backport-Optimize-Makefile.patch
|
|
|
|
|
Patch0015: backport-Dont-queue-measurement-task-when-baseline-failed.patch
|
|
|
|
|
Patch0016: backport-Add-safe-wapper-for-some-memory-and-string-functions.patch
|
|
|
|
|
Patch0017: backport-Fix-potential-integer-overflow.patch
|
|
|
|
|
Patch0018: backport-Add-memory-debug-in-mem_pool.patch
|
|
|
|
|
Patch0019: backport-Optimize-test-framework-and-add-testcases.patch
|
|
|
|
|
Patch0020: backport-Add-warpper-for-strncmp-and-strncpy.patch
|
|
|
|
|
Patch0021: backport-Use-warpper-dim_vzalloc-to-avoid-false-warning.patch
|
|
|
|
|
Patch0022: backport-Set-dim_core_keyring-to-NULL-when-initialize-failed.patch
|
|
|
|
|
Patch0023: backport-Disable-dfx-testcase-by-default.patch
|
|
|
|
|
Patch0024: backport-Support-init-function-for-measure-tasks.patch
|
|
|
|
|
|
2023-09-04 19:47:51 +08:00
|
|
|
%description
|
|
|
|
|
Dynamic Integrity Measurement
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-09-14 12:40:30 +08:00
|
|
|
%autosetup -n %{name}-v%{version} -p1
|
2023-09-04 19:47:51 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
cd src
|
|
|
|
|
sed -i 's#/lib/modules/$(shell uname -r)/build#/lib/modules/%{kernel_version}/build#' Makefile
|
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/dim
|
|
|
|
|
install -m 600 ./src/dim_core.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/dim
|
|
|
|
|
install -m 600 ./src/dim_monitor.ko $RPM_BUILD_ROOT/lib/modules/%{kernel_version}/extra/dim
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
depmod -a `uname -r`
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
depmod -a
|
|
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/dim/dim_core.ko
|
|
|
|
|
%attr(0400,root,root) /lib/modules/%{kernel_version}/extra/dim/dim_monitor.ko
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-04-16 10:12:20 +08:00
|
|
|
* Tue Apr 16 2024 jinlun <jinlun@huawei.com> 1.0.2-6
|
|
|
|
|
- backport some patches
|
|
|
|
|
|
2024-01-26 15:26:06 +08:00
|
|
|
* Fri Jan 26 2024 jinlun <jinlun@huawei.com> 1.0.2-5
|
|
|
|
|
- The compilation error asused by the kernel upgrade is rectified.
|
|
|
|
|
|
2023-09-18 20:35:20 +08:00
|
|
|
* Mon Sep 18 2023 jinlun <jinlun@huawei.com> 1.0.2-4
|
|
|
|
|
- Fix the concurrent issues with removing module and accessing interfaces.
|
|
|
|
|
|
2023-09-14 14:26:16 +08:00
|
|
|
* Fri Sep 15 2023 luhuaxin <luhuaxin1@huawei.com> 1.0.2-3
|
|
|
|
|
- Use jiffies64 interface to set measure interval
|
|
|
|
|
|
2023-09-14 12:40:30 +08:00
|
|
|
* Thu Sep 14 2023 luhuaxin <luhuaxin1@huawei.com> 1.0.2-2
|
|
|
|
|
- Limit the max line number of policy and baseline parsing
|
|
|
|
|
|
2023-09-04 19:47:51 +08:00
|
|
|
* Mon Sep 4 2023 jinlun <jinlun@huawei.com> 1.0.2-1
|
|
|
|
|
- Init package
|