I have a encryption - on - fly drivers, and encrypt .TXT file(for test purpose). It work well in windows xp. but not in win8’ notepad.exe.
It’s ok when i copy winxp’notepad.exe to win8 system, It’s not ok when win8’s native notepad.exe. under windbg, paging write failed at post-write callback. Data.IoStatus.Status = 0, Data.IoStatus.Information = 0.
I know notepad.exe is memory-mapped. but what’s difference between window xp and window 8.
the procmon log in window 8:
“notepad.exe”,“IRP_MJ_CREATE”,“C:\1\3.txt”,“SUCCESS”
“notepad.exe”,“IRP_MJ_WRITE”,“C:\1\3.txt”,“SUCCESS”
“notepad.exe”,“IRP_MJ_READ”,“C:\1\3.txt”
“notepad.exe”,“IRP_MJ_SET_INFORMATION”,“C:\1\3.txt”,“SUCCESS”,“Type:EndOfFile: 3”
“notepad.exe”,“IRP_MJ_SET_INFORMATION”,“C:\1\3.txt”,“SUCCESS”,“Type:AllocationSize: 3”
“notepad.exe”,“IRP_MJ_CLEANUP”,“C:\1\3.txt”,“SUCCESS”,“”
“notepad.exe”,“FASTIO_ACQUIRE_FOR_CC_FLUSH”,“C:\1\3.txt”,“SUCCESS”,“”
“notepad.exe”,“IRP_MJ_WRITE”,“C:\1\3.txt”,“SUCCESS”,“Offset: 0, Length: 4,096, I/O Flags: Non-cached, Paging I/O, Synchronous Paging I/O, Priority: Normal”
“12:16:46.2184557”,“notepad.exe”,“2648”,“FASTIO_RELEASE_FOR_CC_FLUSH”,“C:\1\3.txt”,“SUCCESS”,“”
My question is:
1?why failed in post-write callback in paging io path? (In the paging io path, I change Write.ByteOffest from 0 to 4096, because my fix-size encrypt header is 4096 bytes. )
2?why paging write occur after clean up?
any suggestion? thanks!