mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
pagemap.h: fix missing pread offset
Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/125
This commit is contained in:
@@ -8173,7 +8173,10 @@ vaddr pfn soft-dirty file/shared swapped present library
|
||||
7ffff78ec000 1fd4 0 1 0 1 /lib/libuClibc-1.0.30.so
|
||||
....
|
||||
|
||||
Source: link:userland/linux/pagemap_dump.c[]
|
||||
Source:
|
||||
|
||||
* link:userland/linux/pagemap_dump.c[]
|
||||
* link:lkmc/pagemap.h[]
|
||||
|
||||
Adapted from: https://github.com/dwks/pagemap/blob/8a25747bc79d6080c8b94eac80807a4dceeda57a/pagemap2.c
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ int lkmc_pagemap_get_entry(LkmcPagemapEntry *entry, int pagemap_fd, uintptr_t va
|
||||
while (nread < sizeof(data)) {
|
||||
ret = pread(
|
||||
pagemap_fd,
|
||||
&data,
|
||||
((uint8_t*)&data) + nread,
|
||||
sizeof(data) - nread,
|
||||
vpn * sizeof(data) + nread
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user