mirror of
https://git.missingno.dev/kolibrios-nvme-driver/
synced 2024-11-21 15:13:48 +01:00
File Corruption? #7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm not sure what's going on here, but if anyone can replicate this please let me know.
So essentially, I copied everything from the /sys folder into the filesystem of the NVMe drive. Everything works, and everything loads as expected. The problem is when you shutdown and restart, the files will be there but for some reason some of the executables that worked before the shutdown now suddenly page fault.
P.S: If you're testing this, try it on a decent sized filesystem (copying everything from /sys folder into the NVMe one works well for this), check if executable loads properly before shutdown, try shutting down, do the same thing (make sure you try it with a bunch of different files), and see if a page fault happens.
Ok, there's definitely something weird going on. This has happened on more than one occasion. Both on QEMU and Virtualbox, however it's random.
I don't know why exactly this happens, especially since the files are completely okay before restart. But I'll have to investigate later.
It seems like this issue always occurs for files between 4KiB and 8Kib. Files below and above that seem to be fine. So it's possible this has to do a bug with allocating a PRP entry for PRP2.
Aha! So it looks like if you pass a page-aligned buffer then PRP2 allocates successfully and no problems occur. However, if a unaligned buffer is used, then it doesn't. So there's a problem with PRP list allocation with unaligned buffers, it seems.
Mostly fixed in
3d95901b65
but there's still a few files causing problems.Okay, I think I got reproduction of this.
Latest commit (I suppose), VirtualBox, loading driver by hands from ISO.
Yesterday I saved two files with FASM code on NVME drive, and today they both are cut to the 30 lines and have encoding problems.
While compiled executables are totally okay and can be run.
UPD. Looks like this square symbols at the and of file are exactly corrupted code, that got displayed as broken encoding for some reason.
UPD. I have two corrupted code files and size of each is shown as 4 KB, so I suppose, it corrupts part larger then 1 disk sector?