!36 fix the compile error.
From: @ZhouShuiQing Reviewed-by: @houmingyong Signed-off-by: @houmingyong
This commit is contained in:
commit
f3bdb0efdb
32
0001-Modify-the-vm_flags-variable-through-interfaces.patch
Normal file
32
0001-Modify-the-vm_flags-variable-through-interfaces.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 753fd239a08e331168f7fac6fed1f2c9f5632fe4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhoushuiqing <zhoushuiqing2@huawei.com>
|
||||||
|
Date: Mon, 24 Jul 2023 15:08:24 +0800
|
||||||
|
Subject: [PATCH] Modify the vm_flags variable through interfaces
|
||||||
|
The kernel has set the vm_flags variable as const and provided a series of
|
||||||
|
interfaces to manipulate it. Therefore, it is necessary to make appropriate
|
||||||
|
modifications to the code in linux-sgx-driver.
|
||||||
|
|
||||||
|
the kernel commit is https://github.com/torvalds/linux/commit/bc292ab00f6c7a661a8a605c714e8a148f629ef6
|
||||||
|
---
|
||||||
|
sgx_main.c | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sgx_main.c b/sgx_main.c
|
||||||
|
index ca52821..75951a2 100644
|
||||||
|
--- a/sgx_main.c
|
||||||
|
+++ b/sgx_main.c
|
||||||
|
@@ -109,9 +109,8 @@ bool sgx_has_sgx2;
|
||||||
|
static int sgx_mmap(struct file *file, struct vm_area_struct *vma)
|
||||||
|
{
|
||||||
|
vma->vm_ops = &sgx_vm_ops;
|
||||||
|
- vma->vm_flags |= VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_IO |
|
||||||
|
- VM_DONTCOPY;
|
||||||
|
-
|
||||||
|
+ vm_flags_set(vma, VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_IO |
|
||||||
|
+ VM_DONTCOPY);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: linux-sgx-driver
|
Name: linux-sgx-driver
|
||||||
Version: 2.14
|
Version: 2.14
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Intel SGX Linux* Driver
|
Summary: Intel SGX Linux* Driver
|
||||||
ExclusiveArch: x86_64
|
ExclusiveArch: x86_64
|
||||||
License: BSD-3-Clause and GPL-2.0 License
|
License: BSD-3-Clause and GPL-2.0 License
|
||||||
@ -8,6 +8,7 @@ URL: https://github.com/intel/linux-sgx-driver
|
|||||||
Source0: https://github.com/intel/linux-sgx-driver/archive/sgx_driver_%{version}.tar.gz
|
Source0: https://github.com/intel/linux-sgx-driver/archive/sgx_driver_%{version}.tar.gz
|
||||||
|
|
||||||
BuildRequires: gcc kernel-devel make module-init-tools glibc uname-build-checks elfutils-devel
|
BuildRequires: gcc kernel-devel make module-init-tools glibc uname-build-checks elfutils-devel
|
||||||
|
Patch0: 0001-Modify-the-vm_flags-variable-through-interfaces.patch
|
||||||
|
|
||||||
%define kern_devel_ver %(uname -r)
|
%define kern_devel_ver %(uname -r)
|
||||||
Requires: kernel=%{kern_devel_ver}
|
Requires: kernel=%{kern_devel_ver}
|
||||||
@ -60,6 +61,9 @@ sed -i '/^isgx$/d' /etc/modules
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 24 2023 zhoushuiqing <zhoushuiqing2@huawei.com> - 2.14-2
|
||||||
|
- fix the compile error of vm_flags
|
||||||
|
|
||||||
* Mon Jan 30 2023 wangyunjia <yunjia.wang@huawei.com> - 2.14-1
|
* Mon Jan 30 2023 wangyunjia <yunjia.wang@huawei.com> - 2.14-1
|
||||||
- Update version to 2.14
|
- Update version to 2.14
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user