Write to file in an ISR

> How did you get those questions answered? Surely by asking

someone who is an expert or better than you.

By reading, reverse engineering and experimenting. If I get the answer (from
someone) too easily, I will never remember it hence the knowledge won’t
retain.

Calvin

Bingo!!!

Good evening,

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Calvin Guan
Sent: Tuesday, June 08, 2010 9:00 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Write to file in an ISR

How did you get those questions answered? Surely by asking someone who
is an expert or better than you.

By reading, reverse engineering and experimenting. If I get the answer (from
someone) too easily, I will never remember it hence the knowledge won’t
retain.

Calvin


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

>And I am doing the same (surely after doing some research)

Mr. Peter Viscarola - What do you think you are?

For those of you who understand I am not doing my homework, that’s
incorrect.

No, you’re really not doing your homework. Peter is the guy who, you know,
started this list. Among other things.

Do you guys do the same with other posters.

No, no - just you. It’s all part of a big conspiracy, actually.

Next time I will always place a post with some clear text that to replied
by positive repliers :slight_smile:

And we’re back…me me me me me me me me me me me…

If you don’t like this list, maybe you should go somewhere else. Just a
thought.

Seriously, though, you could go somewhere else, rather than insisting that
everybody else conform to your wishes.

Thank you for your consideration,

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, June 08, 2010 8:28 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Write to file in an ISR

Those of who are bombarding me with foul language - Are you been always like
that? Do you guys do the same with other posters. You guys might be geniuses
here and have tons of experience in kernel field, but at the same time you
all have started somewhere and could have millions or zillions of questions
at the time you started. How did you get those questions answered? Surely by
asking someone who is an expert or better than you.

And I am doing the same (surely after doing some research)

Mr. Peter Viscarola - What do you think you are? I will not use any foul
language because you seems to be ignorant as of now what a forum means? You
might be a professional with lots and lots of knowledge. If you want to
answer somebody, please feel free to do so, and if your consiousness doesn’t
let you do that, atleast don’t bring negative synergy into this forum. This
is a forum about helping others. Some people over here have replied to my
posting very politely with the information I should be looking for, whereas
others have shown same behavior as you (no offence from mypart).

For those of you who understand I am not doing my homework, that’s
incorrect. It’s just that I have started digging into kernel only in past 2
months time and you know the learning curve is huge - intel documents,
assembly language, driver writing, memory model, IDT’s, ISR’s, Driver
levels, etc. etc. Could be true that my postings are very basic, but again
emphasising on huge learning curve. Surely in coming months ahead, my
postings won’t be as stupid as they are right now. And to let you know Mr.
Peter Viscarola I will keep posting, and it’s upto you to decide if you want
to answer them or not.

Next time I will always place a post with some clear text that to replied by
positive repliers :slight_smile:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> Peter is the guy who, you know, started this list.

Actually, I think Nat Miskin created the NTDev list, hosted on a
Majordomo at Atria.com. Later, OSR took over the list.

Mr Gupta,
You are just missing the point.

The first step to get the right answer is to ask the right question. You can write books on “Why you cannot write to file from Isr” but the list is not for that purpose. In two months time, if you would have just gone through the DDK documents you would have known that why can cannot do that.

>Mr. Peter Viscarola - What do you think you are?

He is the god of this list. He is very respected person amongst the dev community. So be careful.
When you post next time, please take two more months to read what everyone on the list is suggesting.

– Aj.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, June 08, 2010 5:28 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Write to file in an ISR

Those of who are bombarding me with foul language - Are you been always like that? Do you guys do the same with other posters. You guys might be geniuses here and have tons of experience in kernel field, but at the same time you all have started somewhere and could have millions or zillions of questions at the time you started. How did you get those questions answered? Surely by asking someone who is an expert or better than you.

And I am doing the same (surely after doing some research)

Mr. Peter Viscarola - What do you think you are? I will not use any foul language because you seems to be ignorant as of now what a forum means? You might be a professional with lots and lots of knowledge. If you want to answer somebody, please feel free to do so, and if your consiousness doesn’t let you do that, atleast don’t bring negative synergy into this forum. This is a forum about helping others. Some people over here have replied to my posting very politely with the information I should be looking for, whereas others have shown same behavior as you (no offence from mypart).

For those of you who understand I am not doing my homework, that’s incorrect. It’s just that I have started digging into kernel only in past 2 months time and you know the learning curve is huge - intel documents, assembly language, driver writing, memory model, IDT’s, ISR’s, Driver levels, etc. etc. Could be true that my postings are very basic, but again emphasising on huge learning curve. Surely in coming months ahead, my postings won’t be as stupid as they are right now. And to let you know Mr. Peter Viscarola I will keep posting, and it’s upto you to decide if you want to answer them or not.

Next time I will always place a post with some clear text that to replied by positive repliers :slight_smile:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> For those of you who understand I am not doing my homework, that’s incorrect. It’s just that I have

started digging into kernel only in past 2 months time and you know the learning curve is huge - intel
documents, assembly language, driver writing, memory model, IDT’s, ISR’s, Driver levels, etc. etc.

OK. Let’s start the lesson on what the IRQL is.

IRQL is per-CPU state, the abstraction which covers - and goes beyound - the notion of the (A)PIC’s current interrupt priority state.

The IRQLs are:

PASSIVE_LEVEL - usual thread execution, just like a user-mode thread. Preemptive. APC delivery to the thread is allowed. Touching pageable memory is allowed too. Waiting on events etc. is allowed too.

APC_LEVEL - same as the above, but the APC delivery is disallowed. Since ZwXxx involve APCs, they are prohibited at this level.

DISPATCH_LEVEL - preemption temporary disallowed on the CPU. This is a must while holding a spinlock, or the thread will be preempted, and the new thread will possibly grab the same spinlock -> deadlock. So, any spinlock acquire raises to DISPATCH (if not on DISPATCH already). You cannot wait on DISPATCH, since wait requires preemption. You can only check the event state at this IRQL.

Since page fault processing requires a wait - you cannot touch anything pageable at DISPATCH.

Except the code holding a spinlock, there are such things in Windows called DPCs, which are non-thread non-preemptive execution context, like the second stage of the interrupt. Anything called by a DPC is running on DISPATCH, including most IRP completion routines (IoCompleteRequest is usually called from a DPC), network incoming packet indications etc.

DISPATCH - the level hardware IRQLs run at. You cannot even use the usual spinlocks at this level. The ISR always runs with its interrupt spinlock held, and this is the only lock you can use at this level. To synchronize with this lock from non-ISR context, call KeSynchronizeExecution or KeAcquireInterruptSpinLock.

You cannot lower the IRQL if it was not raised by your very code a bit earlier. If the function is called by the OS at high IRQL - you cannot lower it below this level.

Not many things you can do at >DISPATCH, i.e. touching the hardware, the nonpaged memory and calling KeInsertQueueDpc.

From DISPATCH, you can call lots of functions, IoCompleteRequest included.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> Actually, I think Nat Miskin created the NTDev list, hosted on a

Majordomo at Atria.com. Later, OSR took over the list.

I remember this list on Atria, IIRC Robert Kennet was the owner.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Ok, let’s take your latest post, and all I have to do is look at the
subject: “Write to file in an ISR”. It took you longer to write the post
than what it would have taken for you to answer your own question. You would
have quickly wound up in the ZwXxxx commands, where you would find
ZwOpen/ZwCreate/ and gloriosky daddy warbucks ZWWRITEFILE and even a casual
read of that information would have pointed out that you use it only at
PASSIVE-LEVEL. You do know that an ISR runs at DIRQL which is somewhere
between above DISPATCH. That is like asking what kind of gas is in a vacuum
tube.

I stand by what I stated … Your question was stupid … find another
career path.

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Tuesday, June 08, 2010 7:28 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Write to file in an ISR

Those of who are bombarding me with foul language - Are you been always like
that? Do you guys do the same with other posters. You guys might be geniuses
here and have tons of experience in kernel field, but at the same time you
all have started somewhere and could have millions or zillions of questions
at the time you started. How did you get those questions answered? Surely by
asking someone who is an expert or better than you.

And I am doing the same (surely after doing some research)

Mr. Peter Viscarola - What do you think you are? I will not use any foul
language because you seems to be ignorant as of now what a forum means? You
might be a professional with lots and lots of knowledge. If you want to
answer somebody, please feel free to do so, and if your consiousness doesn’t
let you do that, atleast don’t bring negative synergy into this forum. This
is a forum about helping others. Some people over here have replied to my
posting very politely with the information I should be looking for, whereas
others have shown same behavior as you (no offence from mypart).

For those of you who understand I am not doing my homework, that’s
incorrect. It’s just that I have started digging into kernel only in past 2
months time and you know the learning curve is huge - intel documents,
assembly language, driver writing, memory model, IDT’s, ISR’s, Driver
levels, etc. etc. Could be true that my postings are very basic, but again
emphasising on huge learning curve. Surely in coming months ahead, my
postings won’t be as stupid as they are right now. And to let you know Mr.
Peter Viscarola I will keep posting, and it’s upto you to decide if you want
to answer them or not.

Next time I will always place a post with some clear text that to replied by
positive repliers :slight_smile:


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> -----Original Message-----

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.com
Sent: Wednesday, June 09, 2010 2:28 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Write to file in an ISR

And to let you know Mr. Peter Viscarola I will keep posting,
and it’s upto you to decide if you want to answer them or not.

Actually, Peter can decide if you keep posting here or not :wink:

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

…That is like asking what kind of gas is in a vacuum tube…

ROTFLMFAO!

Thanks Maxim.

Started re-reading "The windows 2000 device driver book - 3rd time. In the first 2 reads, I missed lot of topics because I couldn’t understand what’s going on especially advanced topics. Will post after re-read (depends how long it takes)

>> Actually, I think Nat Miskin created the NTDev list, hosted on a

> Majordomo at Atria.com. Later, OSR took over the list.

I remember this list on Atria, IIRC Robert Kennet was the owner.

Whoops, Nat MisHkin, not Miskin.

I don’t think I recall Robert. Maybe he created and/or worked on it, but
I used to work with Nat on some list coordination stuff, so Nat was
definately involved, along with Robert, and probably others at
Atria->Rational->IBM.

Michal Vodicka wrote:

Actually, Peter can decide if you keep posting here or not :wink:

What I find funniest about this thread is that a while back, many of you sided with another poster who did not know how to make a filename (I think it was “SOURCES”) that did not have an extension. I think only Michal (quite correctly) called out this person as a moron. Frankly, I find not knowing how to create a filename without an extension to be orders of magnitude stupider than understanding IRQL.


LeeFi is right: It was Nat Mishkin. OSR took over the list at Nat’s request when Atria was acquired, more than 10 years ago.

Bob Kennet owned the domains NTDEV and NTFSD, and maintained a list archive there for quite a long while for the benefit of the community.

Peter
OSR

I THINK I’m the list owner. Oh, wait… that’s right! I AM the list owner!

Dude… I was being NICE to you. Really. I think my reply to you was VERY polite (go back and read it), at least in internet terms. I even chastised Mr. Little for being excessively rude to you. Obviously, this was a bad decision on my part.

No, actually, you won’t. Because I’ve deleted your membership in the list, deleted your membership from OSR Online, and banned you from both resources. You can try changing your email address, of course, but I’ll just ban you again.

Have a nice day… on some other list.

Peter
OSR

Undoubtedly.

To be clear: It’s not THIS POST by this particular poster that caused folks to give him some salty replies. It’s the pattern of posts by this poster. And his dogged refusal to read the manual.

BUT (again, to be clear) ultimately what got this guy banned was his last reply. Yeah, he got some scattered abuse in this thread, but he needs to STFU and listen to his betters. We actually gave him some very good advice in this thread (from direct technical answers, to serious advice on how to be a better engineer).

And he probably shouldn’t directly call me out. That again showed that he didn’t do his homework before posting.

Peter
OSR

> No, actually, you won’t. Because I’ve deleted your membership in the
list,

deleted your membership from OSR Online, and banned you from both
resources. You can try changing your email address, of course, but I’ll
just
ban you again.

Thank you Peter for list noise control :slight_smile:

Jan

>

No, actually, you won’t. Because I’ve deleted your membership in the
list,
deleted your membership from OSR Online, and banned you from both
resources.
You can try changing your email address, of course, but I’ll just ban
you
again.

Have a nice day… on some other list.

Hehe. Now we get to play ‘spot xxxxx@yahoo.com’. For instance, is he
the same guy who’s just asked for help using ATA commands?

James

> What I find funniest about this thread is that a while back, many of you sided with another poster who

did not know how to make a filename (I think it was “SOURCES”) that did not have an extension.

Jan-Feb 09 I think.

Oh not, that’s by far worse.

A person who does not know IRQL can be a good, say, SQL DBA or Java developer.

Not so with the person who cannot create a file without a suffix. I would not hire even a junior IT guy or a junior software tester who does not know this. This means being not a professional computer guy at all.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

“By reading, reverse engineering and experimenting”
+1

Kris

-----Original Message-----
From: Calvin Guan [mailto:xxxxx@gradovec.com]
Posted At: Wednesday, June 09, 2010 2:00 AM
Posted To: ntdev
Conversation: Write to file in an ISR
Subject: RE: Write to file in an ISR

How did you get those questions answered? Surely by asking
someone who is an expert or better than you.

By reading, reverse engineering and experimenting. If I get the answer
(from
someone) too easily, I will never remember it hence the knowledge won’t
retain.

Calvin