non-cached IO alignment requirements recently enforced

There is a documented restriction that non-cached access must be sector aligned.
i.e. it must both start and end on a sector boundary.
This restriction is generally not enforced.

A Windows8.1.1 client operating on a folder shared by Windows 2012 server seems to be the first platform combination to enforce the restriction.
In this environment, attempting unaligned non-cached IO (using FltWriteFile and FLTFL_IO_OPERATION_NON_CACHED) gets a return code of STATUS_INVALID_PARAMETER.

On this platform combination, how can a minifilter write a file (using non-cached IO) that is not a clean sector-multiple in length?
(I need the write to be non-cached because it is cyphertext that must not pollute the cache)

Any insight gratefully received,
All the best,

David

First, enabling verifier on the driver will capture this on all previous
platforms. In general, you need to write out a sector aligned size of
data then set the EOF to the correct size once the write completes. Of
course there are always edge cases where multiple writes to the file can
cause you headache but implementing an intelligent locking mechanism is
not impossible.

Pete

On 7/24/2014 11:54 AM, xxxxx@nney.com wrote:

There is a documented restriction that non-cached access must be sector aligned.
i.e. it must both start and end on a sector boundary.
This restriction is generally not enforced.

A Windows8.1.1 client operating on a folder shared by Windows 2012 server seems to be the first platform combination to enforce the restriction.
In this environment, attempting unaligned non-cached IO (using FltWriteFile and FLTFL_IO_OPERATION_NON_CACHED) gets a return code of STATUS_INVALID_PARAMETER.

On this platform combination, how can a minifilter write a file (using non-cached IO) that is not a clean sector-multiple in length?
(I need the write to be non-cached because it is cyphertext that must not pollute the cache)

Any insight gratefully received,
All the best,

David


NTFSD is sponsored by OSR

OSR is hiring!! Info at http://www.osr.com/careers

For our schedule of debugging and file system seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295