Driver Verifier Question

Hi All,
I am running Driver verifier on my Scsi Miniport driver. I am not clear
about the Faults Injected counter under Global Counter tab.

What does this counter signifies??
Does driver verifier injects some faults??? if yes then what does it
actually do to inject the faults??

Initially when i start the driver verifier this counter is zero. There is a
application which issues IOCTLS to my driver continiously. After sometime i
am seeing that this fault injected counter starts to increase (and keeps
incrementing there after) and I fail application’s IOCTL from the driver.
The buffer that application sends to me contains a signature.If that
signature is not found by the driver then the request will be failed. Is
there a possibility that driver verifier will TOUCH this buffer.

Thanks in advance.
Ajitabh

Hi Aji,

First of all, the reason that “after a while the counter starts
incrementing” is so that you can safely get your driver up and running
before things start going wrong. This time is approximately 8 minutes.

The verifier will, once it starts “injecting faults” simply fail some of the
calls that it covers.
The calls that will fail are:
MmMapLockedPagesXXXX()
MmProbeAndLockPages()
MmMapIoSpace
ExAllocatePool() [and related functions]

So, for instance, if you call some ExAllocatePool sibling, it will every now
and again return “failed”. If your driver works as it should it will just
return some “didn’t work” to the caller.

If your driver doesn’t work right, it will crash… :wink:

Of course, non-robust applications will not accept having a failure in
certain places, so your test-application also needs to have a nice behaviour
when it encounters a “didn’t work” type of error code.

Hope this helps.

[Of course, if you’d been at the Driver Devcon and gone to the Driver
Verifier session, you’d know all this…]


Mats

-----Original Message-----
From: Saxena, Ajitabh Prakash [mailto:xxxxx@lsil.com]
Sent: Wednesday, November 19, 2003 6:22 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Driver Verifier Question

Hi All,
I am running Driver verifier on my Scsi Miniport driver.
I am not clear
about the Faults Injected counter under Global Counter tab.

What does this counter signifies??
Does driver verifier injects some faults??? if yes then what does it
actually do to inject the faults??

Initially when i start the driver verifier this counter is
zero. There is a
application which issues IOCTLS to my driver continiously.
After sometime i
am seeing that this fault injected counter starts to increase
(and keeps
incrementing there after) and I fail application’s IOCTL from
the driver.
The buffer that application sends to me contains a signature.If that
signature is not found by the driver then the request will be
failed. Is
there a possibility that driver verifier will TOUCH this buffer.

Thanks in advance.
Ajitabh


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi Mat,

Thanks for the reply. ScsiMiniport driver does not call any of these
(or related) functions. I am really doubtful that my little miniport driver
will have anything to with this. My driver did not crash when I ran the
verifier for 5 hours. :wink:

I was there at DevCon and also attended the driver verifier session but i
posted this here because i know my driver is not making any of these calls
because Scsiminiport is not allowed to do “any of this (Mm and Ex calls)at
any time” and can do some allocation (specifically
ScsiPortGetUncachedExtension) related stuff at FindAdapter time.

Though I am not sure that how fragile is my application is…so probably i
will start looking from that prespective.

Thanks a lot for information,
Ajitabh

-----Original Message-----
From: Mats Petersson [mailto:xxxxx@3Dlabs.com]
Sent: Wednesday, November 19, 2003 1:43 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: Driver Verifier Question

Hi Aji,

First of all, the reason that “after a while the counter starts
incrementing” is so that you can safely get your driver up and running
before things start going wrong. This time is approximately 8 minutes.

The verifier will, once it starts “injecting faults” simply fail some of the
calls that it covers.
The calls that will fail are:
MmMapLockedPagesXXXX()
MmProbeAndLockPages()
MmMapIoSpace
ExAllocatePool() [and related functions]

So, for instance, if you call some ExAllocatePool sibling, it will every now
and again return “failed”. If your driver works as it should it will just
return some “didn’t work” to the caller.

If your driver doesn’t work right, it will crash… :wink:

Of course, non-robust applications will not accept having a failure in
certain places, so your test-application also needs to have a nice behaviour
when it encounters a “didn’t work” type of error code.

Hope this helps.

[Of course, if you’d been at the Driver Devcon and gone to the Driver
Verifier session, you’d know all this…]


Mats

-----Original Message-----
From: Saxena, Ajitabh Prakash [mailto:xxxxx@lsil.com]
Sent: Wednesday, November 19, 2003 6:22 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Driver Verifier Question

Hi All,
I am running Driver verifier on my Scsi Miniport driver.
I am not clear
about the Faults Injected counter under Global Counter tab.

What does this counter signifies??
Does driver verifier injects some faults??? if yes then what does it
actually do to inject the faults??

Initially when i start the driver verifier this counter is
zero. There is a
application which issues IOCTLS to my driver continiously.
After sometime i
am seeing that this fault injected counter starts to increase
(and keeps
incrementing there after) and I fail application’s IOCTL from
the driver.
The buffer that application sends to me contains a signature.If that
signature is not found by the driver then the request will be
failed. Is
there a possibility that driver verifier will TOUCH this buffer.

Thanks in advance.
Ajitabh


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@lsil.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

It injects memory allocation faults only, which is not interesting to you
anyway, since the SCSI miniport does not allocate memory.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Saxena, Ajitabh Prakash”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, November 19, 2003 9:22 PM
Subject: [ntdev] Driver Verifier Question

> Hi All,
> I am running Driver verifier on my Scsi Miniport driver. I am not clear
> about the Faults Injected counter under Global Counter tab.
>
> What does this counter signifies??
> Does driver verifier injects some faults??? if yes then what does it
> actually do to inject the faults??
>
> Initially when i start the driver verifier this counter is zero. There is a
> application which issues IOCTLS to my driver continiously. After sometime i
> am seeing that this fault injected counter starts to increase (and keeps
> incrementing there after) and I fail application’s IOCTL from the driver.
> The buffer that application sends to me contains a signature.If that
> signature is not found by the driver then the request will be failed. Is
> there a possibility that driver verifier will TOUCH this buffer.
>
>
> Thanks in advance.
> Ajitabh
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Ajitabh,

So, are you running fault injection only for your driver, or all drivers in
the system? [Presumably only for your driver, as I would suspect that a lot
of other drivers wouldn’t necessarily survive this…]

If you’re only running in your own context, is it possible (I have no idea
if this is true or not) that the allocation of memory for double buffered
IOCTL’s are failing, and thus the IOCTL call itself returns “failed”?

The fact that your driver doesn’t fail within 5 hours is a good sign…

Also, beware that some “device specific allocation calls” may end up at some
function like ExAllocatePool in the end, so anything that allocates memory
buffers and/or maps pages to your driver will be a suspect of getting fault
injected to it. I suppose that you have some way of dealing with memory in
the SCSI miniport, but I’ve never even looked at what a SCSI miniport is
allowed to do, so I could be off by many miles… :wink:


Mats

Hi Mat,

Thanks for the reply. ScsiMiniport driver does not call
any of these
(or related) functions. I am really doubtful that my little
miniport driver
will have anything to with this. My driver did not crash when
I ran the
verifier for 5 hours. :wink:

I was there at DevCon and also attended the driver verifier
session but i
posted this here because i know my driver is not making any
of these calls
because Scsiminiport is not allowed to do “any of this (Mm
and Ex calls)at
any time” and can do some allocation (specifically
ScsiPortGetUncachedExtension) related stuff at FindAdapter time.

Though I am not sure that how fragile is my application
is…so probably i
will start looking from that prespective.

Thanks a lot for information,
Ajitabh

-----Original Message-----
From: Mats Petersson [mailto:xxxxx@3Dlabs.com]
Sent: Wednesday, November 19, 2003 1:43 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RE: Driver Verifier Question

Hi Aji,

First of all, the reason that “after a while the counter starts
incrementing” is so that you can safely get your driver up and running
before things start going wrong. This time is approximately 8
minutes.

The verifier will, once it starts “injecting faults” simply
fail some of the
calls that it covers.
The calls that will fail are:
MmMapLockedPagesXXXX()
MmProbeAndLockPages()
MmMapIoSpace
ExAllocatePool() [and related functions]

So, for instance, if you call some ExAllocatePool sibling, it
will every now
and again return “failed”. If your driver works as it should
it will just
return some “didn’t work” to the caller.

If your driver doesn’t work right, it will crash… :wink:

Of course, non-robust applications will not accept having a failure in
certain places, so your test-application also needs to have a
nice behaviour
when it encounters a “didn’t work” type of error code.

Hope this helps.

[Of course, if you’d been at the Driver Devcon and gone to the Driver
Verifier session, you’d know all this…]


Mats

> -----Original Message-----
> From: Saxena, Ajitabh Prakash [mailto:xxxxx@lsil.com]
> Sent: Wednesday, November 19, 2003 6:22 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Driver Verifier Question
>
>
> Hi All,
> I am running Driver verifier on my Scsi Miniport driver.
> I am not clear
> about the Faults Injected counter under Global Counter tab.
>
> What does this counter signifies??
> Does driver verifier injects some faults??? if yes then what does it
> actually do to inject the faults??
>
> Initially when i start the driver verifier this counter is
> zero. There is a
> application which issues IOCTLS to my driver continiously.
> After sometime i
> am seeing that this fault injected counter starts to increase
> (and keeps
> incrementing there after) and I fail application’s IOCTL from
> the driver.
> The buffer that application sends to me contains a signature.If that
> signature is not found by the driver then the request will be
> failed. Is
> there a possibility that driver verifier will TOUCH this buffer.
>
>
> Thanks in advance.
> Ajitabh
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@lsil.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

On Thu, 2003-11-20 at 04:15, Mats Petersson wrote:

Ajitabh,

So, are you running fault injection only for your driver, or all drivers in
the system? [Presumably only for your driver, as I would suspect that a lot
of other drivers wouldn’t necessarily survive this…]

I thought I just heard (at Driver DevCon) that if you enable verifier on
a miniport (ndis, scsiport, videoport), the port driver gets verified
too automatically.

-sd