diff options
Diffstat (limited to 'dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch')
-rw-r--r-- | dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch b/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch deleted file mode 100644 index 974b561df47f..000000000000 --- a/dev-debug/scap-driver/files/0.29.3-fix-kmod-build-on-5.18+.patch +++ /dev/null @@ -1,63 +0,0 @@ - -Bug: https://bugs.gentoo.org/866113 -Source: https://github.com/falcosecurity/libs/pull/411/commits/36e945af4feb31c8b875f7d4624592b0c1ff929d - -From 36e945af4feb31c8b875f7d4624592b0c1ff929d Mon Sep 17 00:00:00 2001 -From: Federico Di Pierro <nierro92@gmail.com> -Date: Mon, 20 Jun 2022 14:26:39 +0200 -Subject: [PATCH] fix(driver): fixed kmod build on linux kernels >= 5.18. - -Signed-off-by: Federico Di Pierro <nierro92@gmail.com> ---- - driver/main.c | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) - -diff --git a/driver/main.c b/driver/main.c -index 6b5ae461a..e606cc2f8 100644 ---- a/driver/main.c -+++ b/driver/main.c -@@ -70,8 +70,9 @@ MODULE_AUTHOR("the Falco authors"); - #define TRACEPOINT_PROBE(probe, args...) static void probe(void *__data, args) - #endif - --#ifndef pgprot_encrypted --#define pgprot_encrypted(x) (x) -+// Allow build even on arch where PAGE_ENC is not implemented -+#ifndef _PAGE_ENC -+#define _PAGE_ENC 0 - #endif - - struct ppm_device { -@@ -1217,8 +1218,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma) - - pfn = vmalloc_to_pfn(vmalloc_area_ptr); - -+ pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC; - ret = remap_pfn_range(vma, useraddr, pfn, -- PAGE_SIZE, pgprot_encrypted(PAGE_SHARED)); -+ PAGE_SIZE, vma->vm_page_prot); - if (ret < 0) { - pr_err("remap_pfn_range failed (1)\n"); - goto cleanup_mmap; -@@ -1255,8 +1257,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma) - while (mlength > 0) { - pfn = vmalloc_to_pfn(vmalloc_area_ptr); - -+ pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC; - ret = remap_pfn_range(vma, useraddr, pfn, -- PAGE_SIZE, pgprot_encrypted(PAGE_SHARED)); -+ PAGE_SIZE, vma->vm_page_prot); - if (ret < 0) { - pr_err("remap_pfn_range failed (1)\n"); - goto cleanup_mmap; -@@ -1277,8 +1280,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma) - while (mlength > 0) { - pfn = vmalloc_to_pfn(vmalloc_area_ptr); - -+ pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC; - ret = remap_pfn_range(vma, useraddr, pfn, -- PAGE_SIZE, pgprot_encrypted(PAGE_SHARED)); -+ PAGE_SIZE, vma->vm_page_prot); - if (ret < 0) { - pr_err("remap_pfn_range failed (1)\n"); - goto cleanup_mmap; |