Open Wenzel opened 3 years ago
From what I can see from the LeechCore call, it's trying to read 0xf00000
bytes at physical address 0x100000
#10 0x00007ffff7e942e9 in DeviceMicrovmi_ReadContigious (ctxRC=0x7ffff3bbd010) at leechcore_device_microvmi.c:14
14 if (!microvmi_read_physical(driver, ctxRC->paBase, ctxRC->pb, ctxRC->cb, &bytes_read)) {
(gdb) driver
Undefined command: "driver". Try "help".
(gdb) p driver
$1 = (void *) 0x555555568880
(gdb) l
9 {
10 // read contigious physical memory
11 PLC_CONTEXT ctxLC = ctxRC->ctxLC;
12 void* driver = ctxLC->hDevice;
13 uint64_t bytes_read = 0;
14 if (!microvmi_read_physical(driver, ctxRC->paBase, ctxRC->pb, ctxRC->cb, &bytes_read)) {
15 lcprintfvvv(ctxLC, "Failed to read physical memory at 0x%llx\n", ctxRC->paBase);
16 }
17 ctxRC->cbRead = (DWORD)bytes_read;
18 }
(gdb) p/x ctxRC->paBase
$2 = 0x100000
(gdb) p/x ctxRC->cb
$3 = 0xf00000
As a workaround I'm splitting the read by 4K, and it seems to work.
So the 0xf00000
read size was definitely the issue ! :wink:
Icebox does split into aligned chunks before reading and we don't get segfaults. However, reading the virtualbox implementation, it's supposed to support reading physical memory mapping multiple contiguous pages so something is definitely wrong
Hi,
I'm facing a segfault while trying to read physical memory:
I initialized FDP with:
FDP_OpenSHM()
FDP_Init()
https://github.com/Wenzel/fdp/blob/master/src/lib.rs#L92The last call in FDP is here
My memory dump example is still working though:
But this time I'm trying to bridge libmicrovmi with MemProcFS.
I wanted to check with you if this was a bug somewhere in FDP ?
Thanks !