Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Check for paging file on read / write

Sergey_PisarevSergey_Pisarev Member - All Emails Posts: 185
Hello !

Here https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs/constraints-on-dispatch-routines it’s said “ Dispatch routines that are in the paging file I/O path cannot safely call any kernel-mode routines that require a caller to be running at IRQL < DISPATCH_LEVEL.” . So I can’t call fltgetstreamcontext for paging file on pre-write ? I understand that context can’t be attached to a pagefile, but I thought that get context call is at least safe. In Microsoft samples I don’t see check for pagefile.

So the question is it safe to call get context routines for page file on pre- read/ write ?

This documentation is for legacy filters, but in pre callback we are called in the context of legacy filter(fltmgr) dispatch routine. So the constraint should still apply, right ?

Comments

  • rod_widdowsonrod_widdowson Member - All Emails Posts: 1,095

    is it safe to call get context routines for page file on pre- read/ write ?

    Only if you know this isn’t a paging file object. ISTR that’s there’s a fsrtl call to establish that. Or of course you could check the IRQL

  • Sergey_PisarevSergey_Pisarev Member - All Emails Posts: 185
    edited January 31
    Thank you Rod !
    Yes, FsRtlIsPagingFile.

    > @rod_widdowson said:
    > (Quote)
    > Or of course you could check the IRQL

    What do you mean? In file filter dispatch we are guaranteed to be below dispatch level. The constraint is that for pf I can’t call passive and apc routines even at passive or apc. What would IRQL check do for me ?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 20 Apr 2020 OSR Seminar Space & ONLINE
Writing WDF Drivers 11 May 2020 OSR Seminar Space & ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA