Skip to content

Commit

Permalink
fix for kernel 6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
misc0110 committed Feb 13, 2024
1 parent 382e6d2 commit b6338d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/pteditor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b6338d4

Please sign in to comment.