NT Kernel Mode Time’s changing and this time from scratch

  These days, in time of trying different methods of Inter-Process communication i found one very interesting issue concerning usage of MmSecureVirtualMemory , and that on Michael Howard’s blog, so that give me some reasons for code review and for sure using Prefast over some classes. It is true that the amount of code for Windows NT kernel-mode applications is not comparable with that used in day by day applications but the implications of that code is at least twice heavy.

Here comes the issue :

If you run PREfast on code using this function and it’s not in a try/except block, you may get this warning:

253 – MmSecureVirtualMemory locks VADs not pages.
Additional Information: Dereferences must still be protected by try-except.

The advice for this warning at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcepbguide5/html/wce50grfPREfastWarning253.asp is simple:

Defective Source

MmSecureVirtualMemory(NULL,
                      0,
                      0);

Corrected Source

; // use something else
 
So than, have fun by low-level development.
 
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s