ufrisk / MemProcFS

MemProcFS
GNU Affero General Public License v3.0
2.8k stars 352 forks source link

Can't specify -memmap file #270

Closed BubonicPestilence closed 4 months ago

BubonicPestilence commented 4 months ago

Hello. Thank you for both of your projects. While using PCILeech, i was able to specify -memmap mmap.txt and it read it.

While trying to do same in Python, permanently getting errors:

    vmm = memprocfs.Vmm(["-device", "fpga", "-memmap", "C:/Upload/mmap.txt"])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Vmm.init(): Initialization of vmm failed.

    vmm = memprocfs.Vmm(["-device", "fpga", "-memmap", "C:\\Upload\\mmap.txt"])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Vmm.init(): Initialization of vmm failed.

    vmm = memprocfs.Vmm(["-device", "fpga", "-memmap", "mmap.txt"])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Vmm.init(): Initialization of vmm failed.

Maybe there is some different way of loading this map?

And yes, if i remove memmap option, everything works good.

ufrisk commented 4 months ago

Can you try:

vmm = memprocfs.Vmm(["-device", "fpga", "-memmap", "C:\\Upload\\mmap.txt", "-v", "-vv", "-printf"])

and see if you get additional debug output. I find this really curious and I should look into it, but having some debut output would be good to rule out some of the more easier to find culprits first.

BubonicPestilence commented 4 months ago

Thank yo uvery much, this one worked, and pointed me to possible error. I've regenerated mmap.txt and it works, so error was in not "fully exported mmap.txt"