kernel-mode APC

Hi!
What’s the difference between a special kernel-mode APC and a normal kernel-mode APC?
Andrew


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

A “special kernel APC” has restrictions on which operations it can perform;
in return, a special kernel mode APC can run whenever the system is at
APC_LEVEL. A kernel APC has no special restrictions, but it can be blocked
using KeEnterCriticalRegion (in addition to the usual trick of raising to
APC_LEVEL.)

The storage stack is where this is critical (because of locking and the
impact of reentrancy) and thus we see this quite a lot in file systems, but
any kernel mode code path that relies upon locks and could be re-entered
will block normal kernel APCs. Driver verifier (for instance) will bug
check if you have not blocked normal kernel APCs when you acquire an
ERESOURCE lock (since normal kernel APCs should be blocked for the duration
of time when you hold the ERESOURCE lock.)

Regards,

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com http:

-----Original Message-----
From: Andrew Shafranov [mailto:xxxxx@hotmail.com]
Sent: Tuesday, February 27, 2001 9:54 AM
To: NT Developers Interest List
Subject: [ntdev] kernel-mode APC

Hi!
What’s the difference between a special kernel-mode APC and a normal
kernel-mode APC?
Andrew

You are currently subscribed to ntdev as: xxxxx@osr.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</http:>

Thank you, Tony

Andrew
----- Original Message -----
From: Tony Mason
To: NT Developers Interest List
Sent: Tuesday, February 27, 2001 10:35
Subject: [ntdev] RE: kernel-mode APC

> A “special kernel APC” has restrictions on which operations it can
perform;
> in return, a special kernel mode APC can run whenever the system is at
> APC_LEVEL. A kernel APC has no special restrictions, but it can be
blocked
> using KeEnterCriticalRegion (in addition to the usual trick of raising to
> APC_LEVEL.)
>
> The storage stack is where this is critical (because of locking and the
> impact of reentrancy) and thus we see this quite a lot in file systems,
but
> any kernel mode code path that relies upon locks and could be re-entered
> will block normal kernel APCs. Driver verifier (for instance) will bug
> check if you have not blocked normal kernel APCs when you acquire an
> ERESOURCE lock (since normal kernel APCs should be blocked for the
duration
> of time when you hold the ERESOURCE lock.)
>
> Regards,
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com http:
>
>
> -----Original Message-----
> From: Andrew Shafranov [mailto:xxxxx@hotmail.com]
> Sent: Tuesday, February 27, 2001 9:54 AM
> To: NT Developers Interest List
> Subject: [ntdev] kernel-mode APC
>
>
> Hi!
> What’s the difference between a special kernel-mode APC and a normal
> kernel-mode APC?
> Andrew
> —
> You are currently subscribed to ntdev as: xxxxx@osr.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hotmail.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</http:>