4 ms·
I really don't understand why the IO hit... If you're designing the OS, you can either scan a file when it's written to disk, or when it's read from disk, or
by londons_explore 5y ago
I really don't understand why the IO hit... If you're designing the OS, you can either scan a file when it's written to disk, or when it's read from disk, or sometime inbetween. when you have scanned a given file, you need not rescan it if the file hasn't changed.
These facts together mean that it should be really rare that any application needs to be waiting for any scanning - since scanning can happen anytime between a data write and a read of the same data.
- XorNot 5y agoNo way to tell if it's changed if you don't store a hash as metadata. Something like ZFS where hashing is baked into the cost of the FS operation could optimise this.
- londons_explore 5y agoBut if you control the kernel and all the code that runs in the kernel, you know exactly who has written to disk and when. So if nobody wrote that data, then it hasn't changed.
- netcoyote 5y agoThe virus might be discovered after the file it’s contained in is written to disk, which is why you’d need to scan when reading.
- ComputerGuru 5y agoThen don’t scan when writing?
- codeflo 5y agoThe virus signatures haven’t been updated since my last recompile though.
- daemin 5y agoIn Windows there's a hook on file handle close which AV products use to implement their file scanning. I know this because I did a bunch of reading on the topic after encountering catastrophic halts inside of CloseHandle, deep inside the kernel. And even with administrator privileges I could not kill the process, or the attached debugger, and the machine was unable to shutdown because even it could not kill the stuck process. I had to hard power cycle to get back to a usable system. Near as I can tell this was because of the AV product the company was using that crashed or deadlocked or something. Note this product was not Windows Defender.