MmGetSystemAddressForMdl question

In a number of places, I see the warning that you should avoid
MmGetSystemAddressForMdl because when it is released, it causes all the
processor caches to be flushed. So what is the proper way to map
Irp-MdlAddress when you can’t be sure of the context you are in.

Thanks for any clarification.

Neil

> In a number of places, I see the warning that you should avoid

MmGetSystemAddressForMdl because when it is released, it causes all the
processor caches to be flushed. So what is the proper way to map

Not processor caches IIRC, but only TLB caches and only if the OS runs short
of the system PTEs.

Max

Thanks for the reply. So MmGetSystemAddressForMdl *is* the correct way? Can
you explain what he meant by his comment? What is the alternative to
MmGetSystemAddressForMdl?

Thanks.


In a number of places, I see the warning that you should avoid
MmGetSystemAddressForMdl because when it is released, it causes all the
processor caches to be flushed. So what is the proper way to map

Not processor caches IIRC, but only TLB caches and only if the OS runs short
of the system PTEs.

Max