From b6338d4d7ae0bc8cd8f61be4dd9ac02fc9e0630d Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Tue, 13 Feb 2024 14:19:58 +0100 Subject: [PATCH] fix for kernel 6.5 --- module/pteditor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/pteditor.c b/module/pteditor.c index 8637d7f..856d627 100644 --- a/module/pteditor.c +++ b/module/pteditor.c @@ -332,7 +332,11 @@ static int resolve_vm(size_t addr, vm_t* entry, int lock) { entry->valid |= PTEDIT_VALID_MASK_PMD; /* Map PTE (page table entry) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0) entry->pte = pte_offset_map(entry->pmd, addr); +#else + entry->pte = pte_offset_kernel(entry->pmd, addr); +#endif if (entry->pte == NULL || pmd_large(*(entry->pmd))) { entry->pte = NULL; goto error_out;