Question about XP RC1 w/verifier ON

All,

I am having a problem with a bus driver someone else in my company
wrote which seems to work perfectly well on 98SE, ME, 2000 and
even in XP RC1. However, on XP RC1, if you enable verifier against
said driver, when we return from our call to IoCallDriver for the
case of the QUERY_RESOURCE_REQUIREMENTS IRP we get a status of
0x00000002.

Without verifier enabled the call to IoCallDriver returns STATUS_SUCCESS.

Would anyone happen to know why this is? I am not sure this is the
culprit of the problem I am seeing but it is certainly one of the very
first differences between the trace for the case when the driver works
and the case of the trace when the driver does not work.

TIA,
Rob


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Are you doing a (status == STATUS_SUCCESS)? You can change it to
NT_SUCCESS(status), which would succeed, since 0x00000002 is a
STATUS_WAIT_2. Does WinDbg trap there or is it just a “noisy” status code
you are not expecting?

Typical code after a call to IoCallDriver is to wait if STATUS_PENDING is
returned.

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Montalvo, Robinson [mailto:xxxxx@virata.com]
Sent: Thursday, July 19, 2001 1:30 PM
To: NT Developers Interest List
Subject: [ntdev] Question about XP RC1 w/verifier ON

All,

I am having a problem with a bus driver someone else in my company
wrote which seems to work perfectly well on 98SE, ME, 2000 and
even in XP RC1. However, on XP RC1, if you enable verifier against
said driver, when we return from our call to IoCallDriver for the
case of the QUERY_RESOURCE_REQUIREMENTS IRP we get a status of
0x00000002.

Without verifier enabled the call to IoCallDriver returns STATUS_SUCCESS.

Would anyone happen to know why this is? I am not sure this is the
culprit of the problem I am seeing but it is certainly one of the very
first differences between the trace for the case when the driver works
and the case of the trace when the driver does not work.

TIA,
Rob


You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Rob,

I don’t know why you’d get that particular value, but note that 0x00000002
is indeed a success status code, and should succeed the NT_SUCCESS(status)
macro’s check for success. If you’re comparing the return from
IoCallDriver() explicitly against STATUS_SUCCESS, Driver Verifier may indeed
have just found a bug in your code.

if (status != STATUS_SUCCESS) KdPrint((“Failed!!!\n”)); // NOT OK

if (!NT_SUCCESS(status)) KdPrint((“Failed!!!”)); // OK

-Tim

Timothy A. Johns — xxxxx@driverdev.com
Driver Development Corporation — 800.841.0092
Bring Up Your Hardware — Fast. www.driverdev.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Montalvo, Robinson
Sent: Thursday, July 19, 2001 1:30 PM
To: NT Developers Interest List
Subject: [ntdev] Question about XP RC1 w/verifier ON

All,

I am having a problem with a bus driver someone else in my company
wrote which seems to work perfectly well on 98SE, ME, 2000 and
even in XP RC1. However, on XP RC1, if you enable verifier against
said driver, when we return from our call to IoCallDriver for the
case of the QUERY_RESOURCE_REQUIREMENTS IRP we get a status of
0x00000002.

Without verifier enabled the call to IoCallDriver returns STATUS_SUCCESS.

Would anyone happen to know why this is? I am not sure this is the
culprit of the problem I am seeing but it is certainly one of the very
first differences between the trace for the case when the driver works
and the case of the trace when the driver does not work.

TIA,
Rob


You are currently subscribed to ntdev as: xxxxx@driverdev.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Tim and Gary,

Thank you for the insight.

Unfortunately, that does not seem to be the problem.
In fact, the problem becomes evident ONLY when
driver verifier is enabled. I don’t know if I have
made this clear, but, just to make sure, I don’t get
bugchecked or any messages at all. The system seems
to be happy but I certainly I’m not since our bus
driver never creates the PDOs it needs to create to
cause the system to load the function drivers for
the corresponding ports.

I am in the process of opening a problem report with
MS on this issue. It may be that our implementation
has a very subtle bug in it and we are just seeing
the effects of that. Unfortunately (or fortunately),
the same code works fine on Win2K, Win 98SE, ME and
even on XP RC1, as long as I don’t enable driver
verifier against it.

Any more thoughts/ideas are always welcome.

Regards,
Rob

-----Original Message-----
From: Timothy A. Johns [mailto:xxxxx@driverdev.com]
Sent: Thursday, July 19, 2001 6:43 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

Rob,

I don’t know why you’d get that particular value, but note
that 0x00000002
is indeed a success status code, and should succeed the
NT_SUCCESS(status)
macro’s check for success. If you’re comparing the return from
IoCallDriver() explicitly against STATUS_SUCCESS, Driver
Verifier may indeed
have just found a bug in your code.

if (status != STATUS_SUCCESS) KdPrint((“Failed!!!\n”)); // NOT OK

if (!NT_SUCCESS(status)) KdPrint((“Failed!!!”)); // OK

-Tim

Timothy A. Johns — xxxxx@driverdev.com
Driver Development Corporation — 800.841.0092
Bring Up Your Hardware — Fast. www.driverdev.com

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of
Montalvo, Robinson
> Sent: Thursday, July 19, 2001 1:30 PM
> To: NT Developers Interest List
> Subject: [ntdev] Question about XP RC1 w/verifier ON
>
>
> All,
>
> I am having a problem with a bus driver someone else in my company
> wrote which seems to work perfectly well on 98SE, ME, 2000 and
> even in XP RC1. However, on XP RC1, if you enable verifier against
> said driver, when we return from our call to IoCallDriver for the
> case of the QUERY_RESOURCE_REQUIREMENTS IRP we get a status of
> 0x00000002.
>
> Without verifier enabled the call to IoCallDriver returns
STATUS_SUCCESS.
>
> Would anyone happen to know why this is? I am not sure this is the
> culprit of the problem I am seeing but it is certainly one
of the very
> first differences between the trace for the case when the
driver works
> and the case of the trace when the driver does not work.
>
> TIA,
> Rob
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@driverdev.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: xxxxx@virata.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

This is the expected behaviour of driver verifier. Suppose there was a
filter driver below your driver that was returning some status code that
was actually successful but not STATUS_SUCCESS – does your driver deal
with this situation correctly? This is what driver verifier is trying to
catch. A lot of people check only for STATUS_SUCCESS instead of
NT_SUCCESS() which is incorrect.

-jordan

On 07/19/01, ““Montalvo, Robinson” ” wrote:
> Tim and Gary,
>
> Thank you for the insight.
>
> Unfortunately, that does not seem to be the problem.
> In fact, the problem becomes evident ONLY when
> driver verifier is enabled. I don’t know if I have
> made this clear, but, just to make sure, I don’t get
> bugchecked or any messages at all. The system seems
> to be happy but I certainly I’m not since our bus
> driver never creates the PDOs it needs to create to
> cause the system to load the function drivers for
> the corresponding ports.
>
> I am in the process of opening a problem report with
> MS on this issue. It may be that our implementation
> has a very subtle bug in it and we are just seeing
> the effects of that. Unfortunately (or fortunately),
> the same code works fine on Win2K, Win 98SE, ME and
> even on XP RC1, as long as I don’t enable driver
> verifier against it.
>
> Any more thoughts/ideas are always welcome.
>
> Regards,
> Rob
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

In other words, the proper way to test for a successful completion is to use
the NT_SUCCESS macro provided by the DDK. Verifier tests for proper handling
of successful but non 0 status. A 2 is a successful status, and you never
know when someone might inject themselves below you and return such.

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@interactivesi.com
Sent: Friday, July 20, 2001 12:38 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

This is the expected behaviour of driver verifier. Suppose there was a
filter driver below your driver that was returning some status code that
was actually successful but not STATUS_SUCCESS – does your driver deal
with this situation correctly? This is what driver verifier is trying to
catch. A lot of people check only for STATUS_SUCCESS instead of
NT_SUCCESS() which is incorrect.

-jordan

On 07/19/01, ““Montalvo, Robinson” ” wrote:
> Tim and Gary,
>
> Thank you for the insight.
>
> Unfortunately, that does not seem to be the problem.
> In fact, the problem becomes evident ONLY when
> driver verifier is enabled. I don’t know if I have
> made this clear, but, just to make sure, I don’t get
> bugchecked or any messages at all. The system seems
> to be happy but I certainly I’m not since our bus
> driver never creates the PDOs it needs to create to
> cause the system to load the function drivers for
> the corresponding ports.
>
> I am in the process of opening a problem report with
> MS on this issue. It may be that our implementation
> has a very subtle bug in it and we are just seeing
> the effects of that. Unfortunately (or fortunately),
> the same code works fine on Win2K, Win 98SE, ME and
> even on XP RC1, as long as I don’t enable driver
> verifier against it.
>
> Any more thoughts/ideas are always welcome.
>
> Regards,
> Rob
>


You are currently subscribed to ntdev as: xxxxx@inland.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Gary,

do you want to say returing STATUS_WAIT_2 from IoCallDriver is correct
thing? I believed that status should give caller some meaningful info about
result of requested operation; what does this status mean? From ntstatus.h:

// The success status codes 0 - 63 are reserved for wait completion status.

NT_SUCCESS macro just check if the severity of the status isn’t error or
warning. Right, it should be the first thing which caller test but next it
should test real status code at least for pending status. How it should
handle such nonsense? Quietly ignore? I’m just confused and haven’t found
anything about NT_SUCCESS macro in the docs (searching XP DDK on OSR site).

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Gary G. Little[SMTP:xxxxx@inland.net]
Reply To: NT Developers Interest List
Sent: Friday, July 20, 2001 9:27 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

In other words, the proper way to test for a successful completion is to
use
the NT_SUCCESS macro provided by the DDK. Verifier tests for proper
handling
of successful but non 0 status. A 2 is a successful status, and you never
know when someone might inject themselves below you and return such.

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@interactivesi.com
Sent: Friday, July 20, 2001 12:38 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

This is the expected behaviour of driver verifier. Suppose there was a
filter driver below your driver that was returning some status code that
was actually successful but not STATUS_SUCCESS – does your driver deal
with this situation correctly? This is what driver verifier is trying to
catch. A lot of people check only for STATUS_SUCCESS instead of
NT_SUCCESS() which is incorrect.

-jordan

On 07/19/01, ““Montalvo, Robinson” ” wrote:
> > Tim and Gary,
> >
> > Thank you for the insight.
> >
> > Unfortunately, that does not seem to be the problem.
> > In fact, the problem becomes evident ONLY when
> > driver verifier is enabled. I don’t know if I have
> > made this clear, but, just to make sure, I don’t get
> > bugchecked or any messages at all. The system seems
> > to be happy but I certainly I’m not since our bus
> > driver never creates the PDOs it needs to create to
> > cause the system to load the function drivers for
> > the corresponding ports.
> >
> > I am in the process of opening a problem report with
> > MS on this issue. It may be that our implementation
> > has a very subtle bug in it and we are just seeing
> > the effects of that. Unfortunately (or fortunately),
> > the same code works fine on Win2K, Win 98SE, ME and
> > even on XP RC1, as long as I don’t enable driver
> > verifier against it.
> >
> > Any more thoughts/ideas are always welcome.
> >
> > Regards,
> > Rob
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@inland.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Michal,

I am very glad you brought up this point. I am also interested
in hearing the response to that question as I have also been
looking for the answer to it myself.

Regards,
Rob

-----Original Message-----
From: Michal Vodicka [mailto:xxxxx@veridicom.cz.nospam]
Sent: Friday, July 20, 2001 1:32 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

Gary,

do you want to say returing STATUS_WAIT_2 from IoCallDriver is correct
thing? I believed that status should give caller some meaningful info about
result of requested operation; what does this status mean? From ntstatus.h:

// The success status codes 0 - 63 are reserved for wait completion status.

NT_SUCCESS macro just check if the severity of the status isn’t error or
warning. Right, it should be the first thing which caller test but next it
should test real status code at least for pending status. How it should
handle such nonsense? Quietly ignore? I’m just confused and haven’t found
anything about NT_SUCCESS macro in the docs (searching XP DDK on OSR site).

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Gary G. Little[SMTP:xxxxx@inland.net]
Reply To: NT Developers Interest List
Sent: Friday, July 20, 2001 9:27 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

In other words, the proper way to test for a successful completion is to
use
the NT_SUCCESS macro provided by the DDK. Verifier tests for proper
handling
of successful but non 0 status. A 2 is a successful status, and you never
know when someone might inject themselves below you and return such.

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@interactivesi.com
Sent: Friday, July 20, 2001 12:38 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

This is the expected behaviour of driver verifier. Suppose there was a
filter driver below your driver that was returning some status code that
was actually successful but not STATUS_SUCCESS – does your driver deal
with this situation correctly? This is what driver verifier is trying to
catch. A lot of people check only for STATUS_SUCCESS instead of
NT_SUCCESS() which is incorrect.

-jordan

On 07/19/01, ““Montalvo, Robinson” ” wrote:
> > Tim and Gary,
> >
> > Thank you for the insight.
> >
> > Unfortunately, that does not seem to be the problem.
> > In fact, the problem becomes evident ONLY when
> > driver verifier is enabled. I don’t know if I have
> > made this clear, but, just to make sure, I don’t get
> > bugchecked or any messages at all. The system seems
> > to be happy but I certainly I’m not since our bus
> > driver never creates the PDOs it needs to create to
> > cause the system to load the function drivers for
> > the corresponding ports.
> >
> > I am in the process of opening a problem report with
> > MS on this issue. It may be that our implementation
> > has a very subtle bug in it and we are just seeing
> > the effects of that. Unfortunately (or fortunately),
> > the same code works fine on Win2K, Win 98SE, ME and
> > even on XP RC1, as long as I don’t enable driver
> > verifier against it.
> >
> > Any more thoughts/ideas are always welcome.
> >
> > Regards,
> > Rob
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@inland.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: xxxxx@virata.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

NT_SUCCESS is a macro that does GROSS scale testing for non-error returning
status. It’s like saying “Ok it’s a tree. We’ll worry about plum tree or
watermelon tree later.” NT_SUCCESS simply says there were no errors
returned, and many times that will suffice that first test on return from
IoCallDriver since you’re looking for a genuine error. If you want to know
more then you set up additional tests after NT_SUCCESS.

The original question appeared that the test was (status == STATUS_SUCCESS).
That is a very narrow test that will fail on any valid status return that is
not STATUS_SUCCESS. Verifier plays with the devnode, shoving itself into the
device stack an various and sundry ways. I provides a vehicle that can be
used to stress a driver and to force it down paths that the write may not
think of. Doing a (status == STATUS_SUCCESS) on return from IoCallDriver is
too easily failed.

(Oh, you mean you’ve never seen watermelons growing on trees? Hmm, well,
being from West Texas, maybe it was just a real big vine. :))

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Friday, July 20, 2001 10:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

Gary,

do you want to say returing STATUS_WAIT_2 from IoCallDriver is correct
thing? I believed that status should give caller some meaningful info about
result of requested operation; what does this status mean? From ntstatus.h:

// The success status codes 0 - 63 are reserved for wait completion status.

NT_SUCCESS macro just check if the severity of the status isn’t error or
warning. Right, it should be the first thing which caller test but next it
should test real status code at least for pending status. How it should
handle such nonsense? Quietly ignore? I’m just confused and haven’t found
anything about NT_SUCCESS macro in the docs (searching XP DDK on OSR site).

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Gary G. Little[SMTP:xxxxx@inland.net]
Reply To: NT Developers Interest List
Sent: Friday, July 20, 2001 9:27 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

In other words, the proper way to test for a successful completion is to
use
the NT_SUCCESS macro provided by the DDK. Verifier tests for proper
handling
of successful but non 0 status. A 2 is a successful status, and you never
know when someone might inject themselves below you and return such.

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@interactivesi.com
Sent: Friday, July 20, 2001 12:38 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

This is the expected behaviour of driver verifier. Suppose there was a
filter driver below your driver that was returning some status code that
was actually successful but not STATUS_SUCCESS – does your driver deal
with this situation correctly? This is what driver verifier is trying to
catch. A lot of people check only for STATUS_SUCCESS instead of
NT_SUCCESS() which is incorrect.

-jordan

On 07/19/01, ““Montalvo, Robinson” ” wrote:
> > Tim and Gary,
> >
> > Thank you for the insight.
> >
> > Unfortunately, that does not seem to be the problem.
> > In fact, the problem becomes evident ONLY when
> > driver verifier is enabled. I don’t know if I have
> > made this clear, but, just to make sure, I don’t get
> > bugchecked or any messages at all. The system seems
> > to be happy but I certainly I’m not since our bus
> > driver never creates the PDOs it needs to create to
> > cause the system to load the function drivers for
> > the corresponding ports.
> >
> > I am in the process of opening a problem report with
> > MS on this issue. It may be that our implementation
> > has a very subtle bug in it and we are just seeing
> > the effects of that. Unfortunately (or fortunately),
> > the same code works fine on Win2K, Win 98SE, ME and
> > even on XP RC1, as long as I don’t enable driver
> > verifier against it.
> >
> > Any more thoughts/ideas are always welcome.
> >
> > Regards,
> > Rob
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@inland.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: xxxxx@inland.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hmm, I understand but still don’t like it. When I receive something strange
as STATUS_WAIT_2 I tend to fail or at least pop-up debugger via assert. Yes,
it is success code but the meaning is unknown for my driver and what if it
says something about requested operation which the driver don’t understand?
I write code conservative and paranoid way and don’t like surprises. Note
also Numega BoundsChecker would probably pop-up in this case because of
strange IoCallDriver return code (I haven’t tested it with verifier enable,
it can be funny :)).

I haven’t seen watermelons growing so you may convince me they grow on trees
:wink:

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Gary G. Little[SMTP:xxxxx@inland.net]
Reply To: NT Developers Interest List
Sent: Friday, July 20, 2001 8:40 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

NT_SUCCESS is a macro that does GROSS scale testing for non-error
returning
status. It’s like saying “Ok it’s a tree. We’ll worry about plum tree or
watermelon tree later.” NT_SUCCESS simply says there were no errors
returned, and many times that will suffice that first test on return from
IoCallDriver since you’re looking for a genuine error. If you want to know
more then you set up additional tests after NT_SUCCESS.

The original question appeared that the test was (status ==
STATUS_SUCCESS).
That is a very narrow test that will fail on any valid status return that
is
not STATUS_SUCCESS. Verifier plays with the devnode, shoving itself into
the
device stack an various and sundry ways. I provides a vehicle that can be
used to stress a driver and to force it down paths that the write may not
think of. Doing a (status == STATUS_SUCCESS) on return from IoCallDriver
is
too easily failed.

(Oh, you mean you’ve never seen watermelons growing on trees? Hmm, well,
being from West Texas, maybe it was just a real big vine. :))

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Friday, July 20, 2001 10:32 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

Gary,

do you want to say returing STATUS_WAIT_2 from IoCallDriver is correct
thing? I believed that status should give caller some meaningful info
about
result of requested operation; what does this status mean? From
ntstatus.h:

// The success status codes 0 - 63 are reserved for wait completion
status.

NT_SUCCESS macro just check if the severity of the status isn’t error or
warning. Right, it should be the first thing which caller test but next it
should test real status code at least for pending status. How it should
handle such nonsense? Quietly ignore? I’m just confused and haven’t found
anything about NT_SUCCESS macro in the docs (searching XP DDK on OSR
site).

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I don’t know how many of you noticed that on XP when you enable your
driver under verifier, a filter driver gets inserted every where (above
and below your function and filter device objects) in the stack to do
some more sanity checking. In some cases (don’t know the details) the
verifier changes the STATUS_SUCCESS value to flush out following bugs:

  1. To catch lack of NT_SUCCESS(status) checks in drivers. Many PnP IRPs
    (like IRP_MN_QUERY_STOP) have multiple success codes. So you should
    always use this macro to check for success.

  2. To catch broken IRP code such as:

Irp->IoStatus.Status = STATUS_SUCCESS;
IoCallDriver(…);
return STATUS_SUCCESS;

It is definitely a confusing that the verifier uses 1,2,3,…
(STATUS_WAIT_1, STATUS_WAIT_2, …) as status values instead of
something more straight-forward like STATUS_VERIFIER_SUCCESS_1, etc. :frowning:

I will make sure that this gets documented in the DDK.

-Eliyas

-----Original Message-----
From: Montalvo, Robinson [mailto:xxxxx@virata.com]
Sent: Friday, July 20, 2001 11:29 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

Michal,

I am very glad you brought up this point. I am also interested
in hearing the response to that question as I have also been
looking for the answer to it myself.

Regards,
Rob

-----Original Message-----
From: Michal Vodicka [mailto:xxxxx@veridicom.cz.nospam]
Sent: Friday, July 20, 2001 1:32 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

Gary,

do you want to say returing STATUS_WAIT_2 from IoCallDriver is correct
thing? I believed that status should give caller some meaningful info
about
result of requested operation; what does this status mean? From
ntstatus.h:

// The success status codes 0 - 63 are reserved for wait completion
status.

NT_SUCCESS macro just check if the severity of the status isn’t error or
warning. Right, it should be the first thing which caller test but next
it
should test real status code at least for pending status. How it should
handle such nonsense? Quietly ignore? I’m just confused and haven’t
found
anything about NT_SUCCESS macro in the docs (searching XP DDK on OSR
site).

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: Gary G. Little[SMTP:xxxxx@inland.net]
Reply To: NT Developers Interest List
Sent: Friday, July 20, 2001 9:27 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

In other words, the proper way to test for a successful completion is
to
use
the NT_SUCCESS macro provided by the DDK. Verifier tests for proper
handling
of successful but non 0 status. A 2 is a successful status, and you
never
know when someone might inject themselves below you and return such.

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@interactivesi.com
Sent: Friday, July 20, 2001 12:38 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Question about XP RC1 w/verifier ON

This is the expected behaviour of driver verifier. Suppose there was a
filter driver below your driver that was returning some status code
that
was actually successful but not STATUS_SUCCESS – does your driver
deal
with this situation correctly? This is what driver verifier is trying
to
catch. A lot of people check only for STATUS_SUCCESS instead of
NT_SUCCESS() which is incorrect.

-jordan

On 07/19/01, ““Montalvo, Robinson” ” wrote:
> > Tim and Gary,
> >
> > Thank you for the insight.
> >
> > Unfortunately, that does not seem to be the problem.
> > In fact, the problem becomes evident ONLY when
> > driver verifier is enabled. I don’t know if I have
> > made this clear, but, just to make sure, I don’t get
> > bugchecked or any messages at all. The system seems
> > to be happy but I certainly I’m not since our bus
> > driver never creates the PDOs it needs to create to
> > cause the system to load the function drivers for
> > the corresponding ports.
> >
> > I am in the process of opening a problem report with
> > MS on this issue. It may be that our implementation
> > has a very subtle bug in it and we are just seeing
> > the effects of that. Unfortunately (or fortunately),
> > the same code works fine on Win2K, Win 98SE, ME and
> > even on XP RC1, as long as I don’t enable driver
> > verifier against it.
> >
> > Any more thoughts/ideas are always welcome.
> >
> > Regards,
> > Rob
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@inland.net
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: xxxxx@virata.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com