Just don’t specify that anything is pageable, it’ll all be non-pageable by default, and you’ll be good to go.
Problem solved?
Yes, I’m serious.
That is my plan B for this case. I have other cases where I would like to know if a piece of memory is pageable or not though.
For example, and I guess I should have led with this since it drives me nuts that I can’t do it, annotations could be much more descriptive if we could read this simple bit. Possibly a majority of my functions, as well as a great many of those in the Windows kernel API, have to allow DISPATCH_LEVEL in the annotations, but resort to warning the user in the documentation that if this or this or this, then it is <= APC_LEVEL. If there were a low cost check for pageable memory, we could use:
When(KeIsMemoryPageable(Buffer), IRQL_requires_max(APC_LEVEL))
_Ron