Do we need a "before you post" document?

Hagen,

So how long can it take to develop and test? 1/25th of the time? Now throw
in some newbie kernel programmer “can-do” attitude for a really explosive mix…

This mix is not yet that explosive - after all, as long as they are unable to even load a driver without BSOD, it will become obvious to a manager, no matter how technically ignorant he is, that it does not work this way. In order to make this mix really explosive, you have to add WDF to it, so they actually succeed in loading a driver and doing some basic operations is it -at this point the manager will get a false impression that newbie’s “can-do” attitude is not-so-unfounded. This is when real troubles will start - when they try to add something *actually* functional (for example, MP synchronization) to their driver, funny things will commence, because the newbies cannot tell a spinlock from event and has no clue about IRQL. At this point we will see countless “my driver don’t work…please help” posts…

It is our responsibility to bring up good arguments and if necessary
prove the complexity of driver writing.

Prove it to whom??? Who is going to ask your opinion (until the troubles begin, of course) if they decide that they are able to do everything without any external help??? The only situation when you have to prove things is when they ask your for help, and it is obvious to you that it is impossible to fix their driver without rewriting it from the scratch. At this point you may, indeed, have a hard time explaining to them that they have just wasted N man-years and X hundred thousand USD on something that just cannot work…

Anton Bassov

> Now throw in some newbie kernel programmer “can-do” attitude for a

really explosive mix…

Well, smart (and only smart) newbies really “can-do” (all of us were such
someday), but this require major amount of self-education, which is a thing
contradicting to rigid timeframes.


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

> Well, smart (and only smart) newbies really “can-do” (all of us were such someday),

but this require major amount of self-education, which is a thing contradicting to rigid timeframes.

Well, those who have a propensity to educate themselves are very, very unlikely post their questions here. Instead, they will thoroughly search the archives, read MSDN, analyze things, disassemble the OS, etc. Normally questions are posted by those who want a ready solution right on the spot (and quite often get aggressive when told to do some research on their own).
Certainly, there are some exceptions to this rule, but, unfortunately, these are just exceptions…

Anton Bassov

In my opinion, this is an overstatement. To be sure, there are a lot of
posts that are fairly absurd, and plenty of posters who would appear to
be lazy and/or in possession of a feeling of entitlement, and both of
these are recurring and very irritating to be sure, but saying that
almost everyone who posts here doesn’t educate themselves is not
accurate, in my opinion. This is a list for questions about nt drivers,
I don’t know what else you would expect to get.

mm

xxxxx@hotmail.com wrote:

> Well, smart (and only smart) newbies really “can-do” (all of us were such someday),
> but this require major amount of self-education, which is a thing contradicting to rigid timeframes.

Well, those who have a propensity to educate themselves are very, very unlikely post their questions here. Instead, they will thoroughly search the archives, read MSDN, analyze things, disassemble the OS, etc. Normally questions are posted by those who want a ready solution right on the spot (and quite often get aggressive when told to do some research on their own).
Certainly, there are some exceptions to this rule, but, unfortunately, these are just exceptions…

Anton Bassov

I agree with Anton on this one. Proof has nothing to do with this.
It’s very obvious that we are the only people who profit from
implementation of the argument that more complicated produces better
results. Personally, I think the argument that the easier you make
things appear, the worse your developers are going to be makes a great
deal of sense, but making this argument is always a non-starter.
Essentially what one is saying to management is that no one can do this
but me so don’t pay me less. I think that they see it as a power play,
which it is. It’s also, in my opinion, full of merit, but I know which
is more important to me, at least, when it comes to decision making.

There’s nothing to prove to Microsoft, because most of them already know
it, in my opinion. That doesn’t mean discension is a viable option,
especially because the argument “what were doing right now isn’t
working” is tough to get around, no matter foolish it can be, depending
on what is proposed. They also know, generally, what sells, and that’s
what any business that is operated for a profit cares about, which makes
a lot of sense to me, at least. While the technical details are
obviously different and much, much, much better, in attitude and
essence, all of this is presented in a way not different than how a VB
based three tier middleware with an Access backend was 7 - 10 years go,
when it was going to meet the needs of developers of mission critical,
internet aware business applications in a robust manner with equivalent
performance. Lower TCO, lower developer cost, all of that. Unless I’m
missing something, leaving out fluctuations in the economy, the cost to
develop software has never really done anything but go up over the
Windows era, at least, and in most ways it should.

This isn’t just a Microsoft or Windows thing; it’s basically a paradigm
of the history of any 4GL, expect that I doubt anyone still makes the
almost certainly contrary to historic fact claim “this can’t be done
without this language.” If they do, they might consider asking, say,
the IRS or Air Traffic Control how it’s working out for them. To date,
everything that was intended to fix the problems of C and C programmers
has been an abject failure. In my opinion, C++ is not an exception to
this, because, in addition to not even coming close to displacing C if
one imposes the constraint that ‘C++’ means something along the lines of
designing around a class hierarchy, fundamentally and more importantly,
C++ wasn’t intended to do anything outside of Bell, and this is the
distinction that I think is important - C++ gained ground because it
worked well for some people, in some situations, and no one ever
designed it for the market. Also, it had enough of a legitimate base to
survive the ramifications of the marketing it suffered starting maybe
fifteen years ago as, well, a better C that would address problems of
scale that C could possibly handle. Aside from the obvious problems
introduced by designing for the market, and really the future market, I
think the bigger issue is that what rears it’s ugly head in anything
that is designed for anything to make money, in and of itself, is the
politics of getting things funded internally. This, in my opinion, is
why something that’s internet aware, mission critical, et. c. is going
to funded - by people who know that is at some level, to some degree,
somewhere between unreasonably optimistic to total bullshit - , over
something like improving the quality of samples. Idea people who ‘think
big’ get their ideas funded, and go on to manage, generally somewhere
else, because their big idea didn’t work, but everyone likes an idea
person, who, no doubt, was undercut by his or her former employer’s lack
of dedication to his or her vision. People who analyze complex
situations and attempt to solve the problem by taking small, cautious,
reverseable steps and change their plans based on the results, get to be
engineers, because the lack ‘leadership skills,’ like ‘sticking to their
goal.’ While it’s very easy to criticize this, it’s a very good policy
for those who make decisions, because making decisions the way an
engineer would in situations a manager is in will get the manager fired
if it doesn’t work out. Fundamentally, this all boils down to
accountablity, just like everything else.

All that said, I think C# will succeed, which is unfortunate it my
opinion, because, to me, programming is about representation, which C#
has, and management of memory, which it doesn’t. When either of these
are not present, in my opinion, the situation becomes not unlike that of
budgeting in organizations operated not for profit - anything seems as
good as anything else. Personally, I distrust the work of anyone who
finds memory management a chore or detail, and much less important than,
say, organizing your program around a collection of singlets, mostly
because I have doubts that they enjoy there work, and take pride in
their craft. Were I in charge of anything managerial, which I deeply,
deeply hope never to be, I would never hire anyone who hasn’t spent most
of their time using C or C++, and instead C#, because, no matter what
it’s virtues, applying one of them to a C/C++ program would be a
disaster and likely to happen because they look similar.

Just my ramblings,

mm

For the same reason
, and it’s also why I think that ‘proving’ is a complete waste of time.

xxxxx@hotmail.com wrote:

Hagen,

> So how long can it take to develop and test? 1/25th of the time? Now throw
> in some newbie kernel programmer “can-do” attitude for a really explosive mix…

This mix is not yet that explosive - after all, as long as they are unable to even load a driver without BSOD,
it will become obvious to a manager, no matter how technically ignorant
he is, that it does not work this way.
In order to make this mix really explosive, you have to add WDF to it,
so they actually succeed in loading a driver and
doing some basic operations is it -at this point the manager will get a
false impression that newbie’s “can-do” attitude
is not-so-unfounded. This is when real troubles will start - when they
try to add something *actually* functional (for example, MP
synchronization)
to their driver, funny things will commence, because the newbies cannot
tell a spinlock from event and has no clue about IRQL. At this point we
will see
countless “my driver don’t work…please help” posts…

> It is our responsibility to bring up good arguments and if necessary
> prove the complexity of driver writing.

Prove it to whom??? Who is going to ask your opinion (until the troubles begin, of course) if
they decide that they are able to do everything without any external
help??? The only situation when
you have to prove things is when they ask your for help, and it is
obvious to you that it is impossible to fix
their driver without rewriting it from the scratch. At this point you
may, indeed, have a hard time explaining to
them that they have just wasted N man-years and X hundred thousand USD
on something that just cannot work…

Anton Bassov

Martin,

saying that almost everyone who posts here doesn’t educate themselves
is not accurate, in my opinion.

Probably, you noticed quite an interesting trend here - those who answer questions practically never ask anything themselves. There are some very,very rare occasions
when a question is being asked by some of the regulars, but these are so exceptional that they can be just ignored, for the purpose of this discussion. It is understandable that there is no one
who knows everything, so that anyone may get into a situation when he has to deal with something he has no prior experience with, - I suspect it happens on more or less regular basis to everyone, including “old-timers” . Therefore, lack of questions from regulars leads me to a conclusion that they normally just prefer to find answers to their questions themselves, rather than asking for some external help. This is why I said that those who have a propensity to educate themselves are very, very unlikely to post their questions - they would rather find a solution themselves…

Anton Bassov

xxxxx@hotmail.com schrieb:

> So how long can it take to develop and test? 1/25th of the time?
> Now throw in some newbie kernel programmer “can-do” attitude for a
> really explosive mix…

This mix is not yet that explosive - after all, as long as they are
unable to even load a driver without BSOD, it will become obvious to
a manager, no matter how technically ignorant he is, that it does not
work this way. In order to make this mix really explosive, you have
to add WDF to it, so they actually succeed in loading a driver and
doing some basic operations is it -at this point the manager will get
a false impression that newbie’s “can-do” attitude is
not-so-unfounded.

Well, you don’t even need WDF for this. There were always DDK/WDK
samples. And in my opinion it is very necessary to have samples for a
lot of driver types.
Also IMO a driver sample should indeed be a template for good,
production-ready code (as opposed to a “functional demo”, which you may
have, too, but clearly marked as such).

Example: My guess is that >70% of pure bulk USB drivers were only
programmed by HW manufacturers, because without your own WDM driver you
could not send even a few measly bytes bytes to an external device nor
receive some. (These days we luckily have WinUSB - but being not
available for the so-called legacy platforms this is not an option for
everyone.)

This is when real troubles will start - when they try to add
> something *actually* functional (for example, MP synchronization) to
> their driver, funny things will commence, because the newbies cannot
> tell a spinlock from event and has no clue about IRQL. At this point
> we will see countless “my driver don’t work…please help” posts…

Absolutely correct - in either case, whether someone uses WDF (or WDM
samples) and starts adding some different or additional functionality.

Even someone who can successfully write a stable, robust and
feature-packed graphics driver for one device “domain” IMHO is not
automatically able to do the same for a different domain.
At least not without a lot of learning and experimentation.

> It is our responsibility to bring up good arguments and if
> necessary prove the complexity of driver writing.

Prove it to whom??? Who is going to ask your opinion (until the
troubles begin, of course) if they decide that they are able to do
everything without any external help???

Prove it to managers. Sorry for giving not enough context, my statement
was meant in accordance to this statement from OP:

[…] the answer from managers to the question “do you want it
correct or on friday” is mostly “on friday” nowadays :wink:

IMO no developer should ask such a question, but on the contrary make it
crystal clear that driver programming is not trivial.
In this contect “It is our responsibility [to do so]”. OK?

But back to your statement:

The only situation when you have to prove things is when they ask
your for help, and it is obvious to you that it is impossible to fix
their driver without rewriting it from the scratch. At this point you
may, indeed, have a hard time explaining to them that they have just
wasted N man-years and X hundred thousand USD on something that just
cannot work…

True. But in the end the problem will probably solve itself - if they
sunk that amount of work and money it’s possible management will at
least realize they made unrealistic assumptions and / or requests.
(And possibly out-source driver programming.)

>…if they sunk that amount of work and money it’s possible management will at least

realize they made unrealistic assumptions and / or requests.

Well, they are not necessarily going to admit it , unless it is so plainly obvious that it just cannot be denied - after all, how are they going explain it all to their bosses/investors/etc??? Instead, they may try to “improve” their existing solution, and, at this point, get ready for totally brain-damaged requirements, suggestions, etc. This is why I said that explaining to them that they have just wasted N man-years and X hundred thousand USD on something that just cannot work is not the easiest task one would imagine…

Anton Bassov

Wow… there’s a lot of “broad brushing” going on in this thread.

I think knowledgeable people need to distinguish between two classes of problems:

a) Problems that are amenable to solutions with simple methods;

b) Problems that require more advanced knowledge.

For example, I was surprised (and quite happy, to be honest) to discover that I am a rather competent VB.NET and C#.NET programmer *for simple problems* – I was thrilled to discover that I can throw together a forms-based windows app, while knowing next to nothing what I was doing. I was NOT surprised, however, to discover that as soon as I ran into a few non-obvious challenges (such as trying to implement late-binding in C#) I had nowhere to turn (heck, I don’t know ANYbody who programs in .NET… everybody *I* know is a kernel dev) and had to resort to searching the C# newsgroups for answers – If I needed a solution badly enough (like, if I was writing this code for my JOB and not for my hobby) I might have had to resort to posting “Can anyone provide me a sample of how to call GetObject() from C#, sorta like you can call it in VB.NET??” I suppose then I would be treated to the level of scorn and derision that greets folks with similar questions in this group.

Of course, the REAL problem is that I don’t know anything at all about C#.NET or VB.NET programming. I know I don’t know anything about it. And that means I’m only able to craft solutions to simple problems, using the few simple mechanisms I know.

However, it’s not always easy to know when the problem your trying to solve has moved from the realm of the “simple” and into the realm of the “complicated” – and that means it’s not intuitively obvious when you’ve accidentally veered out of your depth.

So it is with folks learning driver development. The beauty of WDF is that there are now a class of problems in the driver space that can be solved with its simple methods… whereas with WDM, there really WERE no simple methods (even for seemingly simple problems). This is a good thing. Knowledgeable or not, people are going to attempt to build stuff they need.

The REAL difference between being a dummy in the .NET space and being a dummy in the driver space is the consequence of failure in the driver space: The whole system is compromised.

Recognizing this is the case, FOR YEARS here at OSR we’ve called for moving ALL driver models that are not required to boot the machine to user mode. Given that people who are not fully knowledgeable WILL try to write drivers, and given that these people can NOT clearly distinguish the problems they are competent to solve from those they are not competent to solve, all we can do is reduce the consequences of their failure.

Folks here have to wake up and smell the coffee. Unqualified people will want or need to build stuff, and they won’t KNOW they’ve ventured into the territory of the complex, and will therefore fall off the cliff. SOME of these people will be lazy morons, who don’t spend enough time with Google before posting their queries. Others will be, well, just plain stumped and in need of an answer so they can keep their job, feed their family, and go home and enjoy the weekend. While the ROOT FIX to their problem is for them to read Oney, take an OSR seminar, become personal friends with six to ten Microsoft kernel devs, and spend 2 additional years in post graduate CS education, telling them this isn’t likely to help them solve their immediate problem.

All we can do is inform them that they’re now in dangerous waters, give them an answer, and work our asses off to reduce the consequences of their failures.

And THAT’S why all driver models should be moved to user mode.

Peter
OSR

>…all driver models should be moved to user mode.

I somehow arrived to the conclusion that if we rethink the concept of a process address space a little bit, the above objective (along with moving a fair share of the OS to the UM) may be, indeed, achieved without too much overhead, particularly on 64-bit platforms. However, I don’t think it is feasible under the existing process model that dates back to the late 60s, because performance penalty is going to be prohibitively high…

Anton Bassov

>64-bit platforms. However, I don’t think it is feasible under the existing
process

model that dates back to the late 60s, because performance penalty is going to
be prohibitively high…

Let’s look at the direction MS goes.

Hyper-V seems to be a very strategic piece of software for them. And what
Hyper-V suggests about hardware and drivers? Correct, Enlightened IO aka
VMBus - fully syntentic hardware in the guests, having no hardware analogs able
to operate without Hyper-V, the message-sending VSC drivers which send the
messages by Hyper-V calls to the server process in the root partition.

Welcome back, the microkernels, on the next level of the dialectical spiral.
Now all existing NT kernel is a server process (root partition), with the
hypervisor being a microkernel. BTW, this microkernel is not extensible by
design, so all hardware drivers will use the classic microkernel
message-passing way.

Probably the next step with Hyper-V will be to allow some non-NT-kernel-based,
lightweight server processes to implement some synthetic devices for the
guests. Something like this - the lightweight server is developed, is started
from the root partition as, say, partition 1, will open the Hyper-Vs
communication ports, listen for the messages and thus provide the virtual
device server facilities to emulate some devices to the guests. Such
lightweight servers will not need a full NT kernel, just a small C runtime
library with a memory allocator. Well, possibly even no thread scheduler or
paged VM - they will rely on Hyper-V for this.

BTW - Hyper-V’s guests run really fast. The current hardware power is well
enough to run even performance-critical things as a guest.


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

> Hyper-V seems to be a very strategic piece of software for them.

And what Hyper-V suggests about hardware and drivers? Correct, Enlightened IO
aka VMBus - fully syntentic hardware in the guests, having no hardware analogs
able to operate without Hyper-V, the message-sending VSC drivers which send
the messages by Hyper-V calls to the server process in the root partition

Actually, there is nothing particularly new about it - this concept has been known for more than 40 years (IIRC, IBM released VM back in 1964)

BTW, this microkernel is not extensible by design, so all hardware
drivers will use the classic microkernel message-passing way.

IMHO, this is exactly what has to be changed - you can map the server into the client address space pretty much like DLLs are mapped into the address space of a process. The only difference is that the server code and data can temporarily replace that of a client - the only thing that will be left is stack. Although it may be problematic under 32-bit OS, this approach is very natural for 64-bit one - the size of the address space, as well as 64-bit address translation scheme opens doors for various manipulations that can be done almost without overhead…

Anton Bassov

What I find interesting and amazing is that people *have* to ask the same
questions over and over. Let me explain by example. When I worked on WinDK
(the first commercially available WDM driver framework and development
tools – later killed by BSquare), if we had say 5 users ask the same
question on our support newsgroup, or via phone support or email or
whatever, we made sure to add that issue to our documentation so we wouldn’t
have to deal with it again. That and/or we would tailor our framework code
to try to remove situations that people regularly misunderstood or otherwise
ran into easy failure situations with. We certainly weren’t perfect in this
regard, but we tried!! There seems to be no parallel with the OS maker,
which I have never really understood. I mean we did it as a means of self
defense. We couldn’t afford a heavy support burden, so we tried to ensure
we didn’t have one. I guess the difference is that we just didn’t have the
luxury of being able to completely ignore most of our customers.

I will give you an example of a technical problem that I just don’t
understand the existance of at this late date: If I had a dollar for every
poster on the public driver newsgroups and email lists who asked a basic
question about virtual serial ports I could retire young :slight_smile: Yet, there is
still no information in the WDK documentation, nor any samples available for
virtual serial ports. I mean, there is serial port info in there to some
limited degree, but nothing that explains what a virtual serial driver needs
to do to work properly. Certainly nothing that goes to the depth of being
able to support RAS, or fax capability etc. Why not? It comes up just
about weekly. Not my problem though.

Good thing we have newsgroups!!

Bill M.

wrote in message news:xxxxx@ntdev…
> Martin,
>
>> saying that almost everyone who posts here doesn’t educate themselves
>> is not accurate, in my opinion.
>
> Probably, you noticed quite an interesting trend here - those who answer
> questions practically never ask anything themselves. There are some
> very,very rare occasions
> when a question is being asked by some of the regulars, but these are so
> exceptional that they can be just ignored, for the purpose of this
> discussion. It is understandable that there is no one
> who knows everything, so that anyone may get into a situation when he has
> to deal with something he has no prior experience with, - I suspect it
> happens on more or less regular basis to everyone, including “old-timers”
> . Therefore, lack of questions from regulars leads me to a conclusion that
> they normally just prefer to find answers to their questions themselves,
> rather than asking for some external help. This is why I said that those
> who have a propensity to educate themselves are very, very unlikely to
> post their questions - they would rather find a solution themselves…
>
> Anton Bassov
>

With your virtual serial question, there appear a lot of questions in the
storage and filesystem area that seem to be favorites:

  1. How do I do a ‘disk in a file’ storage driver?
  2. How do I do encryption on files in Windows?
  3. How do I take a file’s IRP_MJ_CREATE and have it preprocessed in user
    mode before the FSD processes it?
  4. How do I take one of the filesystem filter samples and convert it to an
    active filter of some sort?
  5. Luckily I see less of this lately - how do I ‘fix’ filemon source code
    to do xxx?
  6. How do I get a legacy filesystem filter to unload like filemon?

There are also the anti-virus/spam/email/trojan filtering of Internet
traffic questions.

I am sure glad that I only have to do NDIS miniports now. A fairly
restrictive environment, but it is all just about getting packets and
pumping them in or out. I do get frustrated by the fact that I get an
interrupt from my chip and have to beg NDIS to call my DPC when it gets
around to it and sometimes it can be a minute or more before it gets around
to it. Doesn’t happen often, but it does happen in NDIS 5.1. Being an
in-the-box driver, we can’t just schedule our own DPC. For anyone who
cares, I do find it very useful to have done other drivers dealing with
hardware and software only since it gives me a better understanding of what
the port driver has to handle and why some of the rules exist. I sometimes
do find myself doing a ‘out of the box’ solution violating the various
miniport rules to better understand who, what, when and where the box is
choking me but then the ‘within the rules’ solution is easier to find. I
also have others I can use as a sounding board to determine if my ‘first
impression’ is just an illusion or delusion. Sometimes just saying
something aloud can lead you to a solution or to realize your current path
leads to a dead end.

“Bill McKenzie” wrote in message
news:xxxxx@ntdev…
> What I find interesting and amazing is that people have to ask the same
> questions over and over. Let me explain by example. When I worked on
> WinDK (the first commercially available WDM driver framework and
> development tools – later killed by BSquare), if we had say 5 users ask
> the same question on our support newsgroup, or via phone support or email
> or whatever, we made sure to add that issue to our documentation so we
> wouldn’t have to deal with it again. That and/or we would tailor our
> framework code to try to remove situations that people regularly
> misunderstood or otherwise ran into easy failure situations with. We
> certainly weren’t perfect in this regard, but we tried!! There seems to
> be no parallel with the OS maker, which I have never really understood. I
> mean we did it as a means of self defense. We couldn’t afford a heavy
> support burden, so we tried to ensure we didn’t have one. I guess the
> difference is that we just didn’t have the luxury of being able to
> completely ignore most of our customers.
>
> I will give you an example of a technical problem that I just don’t
> understand the existance of at this late date: If I had a dollar for
> every poster on the public driver newsgroups and email lists who asked a
> basic question about virtual serial ports I could retire young :slight_smile: Yet,
> there is still no information in the WDK documentation, nor any samples
> available for virtual serial ports. I mean, there is serial port info in
> there to some limited degree, but nothing that explains what a virtual
> serial driver needs to do to work properly. Certainly nothing that goes
> to the depth of being able to support RAS, or fax capability etc. Why
> not? It comes up just about weekly. Not my problem though.
>
> Good thing we have newsgroups!!
>
> Bill M.
>
>
> wrote in message news:xxxxx@ntdev…
>> Martin,
>>
>>> saying that almost everyone who posts here doesn’t educate themselves
>>> is not accurate, in my opinion.
>>
>> Probably, you noticed quite an interesting trend here - those who answer
>> questions practically never ask anything themselves. There are some
>> very,very rare occasions
>> when a question is being asked by some of the regulars, but these are so
>> exceptional that they can be just ignored, for the purpose of this
>> discussion. It is understandable that there is no one
>> who knows everything, so that anyone may get into a situation when he has
>> to deal with something he has no prior experience with, - I suspect it
>> happens on more or less regular basis to everyone, including “old-timers”
>> . Therefore, lack of questions from regulars leads me to a conclusion
>> that they normally just prefer to find answers to their questions
>> themselves, rather than asking for some external help. This is why I said
>> that those who have a propensity to educate themselves are very, very
>> unlikely to post their questions - they would rather find a solution
>> themselves…
>>
>> Anton Bassov
>>
>
>
>

(1) seems to be “the” question of late, and I would add something about
“my encryption/filter doesn’t work with notepad” and “do X in post
create” to the list.

mm

David Craig wrote:

With your virtual serial question, there appear a lot of questions in the
storage and filesystem area that seem to be favorites:

  1. How do I do a ‘disk in a file’ storage driver?
  2. How do I do encryption on files in Windows?
  3. How do I take a file’s IRP_MJ_CREATE and have it preprocessed in user
    mode before the FSD processes it?
  4. How do I take one of the filesystem filter samples and convert it to an
    active filter of some sort?
  5. Luckily I see less of this lately - how do I ‘fix’ filemon source code
    to do xxx?
  6. How do I get a legacy filesystem filter to unload like filemon?

There are also the anti-virus/spam/email/trojan filtering of Internet
traffic questions.

I am sure glad that I only have to do NDIS miniports now. A fairly
restrictive environment, but it is all just about getting packets and
pumping them in or out. I do get frustrated by the fact that I get an
interrupt from my chip and have to beg NDIS to call my DPC when it gets
around to it and sometimes it can be a minute or more before it gets around
to it. Doesn’t happen often, but it does happen in NDIS 5.1. Being an
in-the-box driver, we can’t just schedule our own DPC. For anyone who
cares, I do find it very useful to have done other drivers dealing with
hardware and software only since it gives me a better understanding of what
the port driver has to handle and why some of the rules exist. I sometimes
do find myself doing a ‘out of the box’ solution violating the various
miniport rules to better understand who, what, when and where the box is
choking me but then the ‘within the rules’ solution is easier to find. I
also have others I can use as a sounding board to determine if my ‘first
impression’ is just an illusion or delusion. Sometimes just saying
something aloud can lead you to a solution or to realize your current path
leads to a dead end.

“Bill McKenzie” wrote in message
> news:xxxxx@ntdev…
>> What I find interesting and amazing is that people have to ask the same
>> questions over and over. Let me explain by example. When I worked on
>> WinDK (the first commercially available WDM driver framework and
>> development tools – later killed by BSquare), if we had say 5 users ask
>> the same question on our support newsgroup, or via phone support or email
>> or whatever, we made sure to add that issue to our documentation so we
>> wouldn’t have to deal with it again. That and/or we would tailor our
>> framework code to try to remove situations that people regularly
>> misunderstood or otherwise ran into easy failure situations with. We
>> certainly weren’t perfect in this regard, but we tried!! There seems to
>> be no parallel with the OS maker, which I have never really understood. I
>> mean we did it as a means of self defense. We couldn’t afford a heavy
>> support burden, so we tried to ensure we didn’t have one. I guess the
>> difference is that we just didn’t have the luxury of being able to
>> completely ignore most of our customers.
>>
>> I will give you an example of a technical problem that I just don’t
>> understand the existance of at this late date: If I had a dollar for
>> every poster on the public driver newsgroups and email lists who asked a
>> basic question about virtual serial ports I could retire young :slight_smile: Yet,
>> there is still no information in the WDK documentation, nor any samples
>> available for virtual serial ports. I mean, there is serial port info in
>> there to some limited degree, but nothing that explains what a virtual
>> serial driver needs to do to work properly. Certainly nothing that goes
>> to the depth of being able to support RAS, or fax capability etc. Why
>> not? It comes up just about weekly. Not my problem though.
>>
>> Good thing we have newsgroups!!
>>
>> Bill M.
>>
>>
>> wrote in message news:xxxxx@ntdev…
>>> Martin,
>>>
>>>> saying that almost everyone who posts here doesn’t educate themselves
>>>> is not accurate, in my opinion.
>>> Probably, you noticed quite an interesting trend here - those who answer
>>> questions practically never ask anything themselves. There are some
>>> very,very rare occasions
>>> when a question is being asked by some of the regulars, but these are so
>>> exceptional that they can be just ignored, for the purpose of this
>>> discussion. It is understandable that there is no one
>>> who knows everything, so that anyone may get into a situation when he has
>>> to deal with something he has no prior experience with, - I suspect it
>>> happens on more or less regular basis to everyone, including “old-timers”
>>> . Therefore, lack of questions from regulars leads me to a conclusion
>>> that they normally just prefer to find answers to their questions
>>> themselves, rather than asking for some external help. This is why I said
>>> that those who have a propensity to educate themselves are very, very
>>> unlikely to post their questions - they would rather find a solution
>>> themselves…
>>>
>>> Anton Bassov
>>>
>>
>>
>
>
>

> I do get frustrated by the fact that I get an interrupt from my chip and have to beg NDIS

to call my DPC when it gets around to it and sometimes it can be a minute
or more before it gets around to it. Doesn’t happen often, but it does happen
in NDIS 5.1. Being an in-the-box driver, we can’t just schedule our own DPC.

Well, this is a double-edged sword - imagine if your miniport driver want to ensure that its DPCs are always the first ones in the queue. In such case the scenario that you have described may occur on regular basis, although in this particular case it will be other drivers and not you who encounters it. Now imagine if there are more than one NIC on the machine, and they all want to do the same. Funny to watch, don’t you think??? Taking into consideration that network-related DPCs may consume a significant portion of CPU time when network traffic is heavy, probably it makes sense to let OS-provided component to make network-related DPC scheduling - otherwise, the target machine may become “not-so-usable” when network traffic is heavy…

Anton Bassov

In this particular case there was only a couple of packets in motion. There
were two computers connected via a switch with no other connections to that
switch. Yes, it does make sense, but sometimes there are edge cases where
it fails. There was only one active network card at the time of the
failure.

wrote in message news:xxxxx@ntdev…
>> I do get frustrated by the fact that I get an interrupt from my chip and
>> have to beg NDIS
>> to call my DPC when it gets around to it and sometimes it can be a minute
>> or more before it gets around to it. Doesn’t happen often, but it does
>> happen
>> in NDIS 5.1. Being an in-the-box driver, we can’t just schedule our own
>> DPC.
>
> Well, this is a double-edged sword - imagine if your miniport driver want
> to ensure that its DPCs are always the first ones in the queue. In such
> case the scenario that you have described may occur on regular basis,
> although in this particular case it will be other drivers and not you who
> encounters it. Now imagine if there are more than one NIC on the machine,
> and they all want to do the same. Funny to watch, don’t you think???
> Taking into consideration that network-related DPCs may consume a
> significant portion of CPU time when network traffic is heavy, probably it
> makes sense to let OS-provided component to make network-related DPC
> scheduling - otherwise, the target machine may become “not-so-usable” when
> network traffic is heavy…
>
> Anton Bassov
>

FWIW Can I

(a) concur with Bill McKenzie. The driver examples need to be complete and
correct. Can I suggest that MS contract some of the experts here on this
site to review every single example to make sure they all comply with
current best practice, and that all the major technologes are present. (I
had to learn the hard way that the 1394 examples in WDM were actually
examples of how not to write a driver!)

(b) agree that in future users should not be allowed into the kernel: it
should be possible to do everything in user mode. (I think Peter said this).
I don’t see how you can have a reliable OS if anyone other than the OS
provider can tamper with the kernel. I certainly have yet to experience a
reliable OS from MS.

M

> it should be possible to do everything in user mode.

What about DMA??? If third-party driver sets up DMA transfer improperly, it may well overwrite the kernel itself. Objectively, the OS cannot validate DMA transfers that are done by the third-party drivers, because if it could, then it could handle the target controller itself the way it does with USB and IDE controllers, i.e. there would be no need for any third-party assistance, in the first place. Therefore, as long as the OS does not know everything about the controllers on the target machine, it would still require some trusted third-party components. The best we can do here is to move *most* third-party drivers to the UM…

Anton Bassov