FileName at Paged Pool

Hi all,

I’m trying build file name from FILE_OBEJCT at IRP_MJ_SET_INFORMATION.
And this works fine, but when I enable DriverVerifier to check IRQL, I get a
BugCheck when I read pFileObject->FileName.Buffer[0]. With WinDbg I did see
that FileName.Buffer is allocated at paged pool. Is it normal?

Thanks in advance,
Fernando.

FileObject->FileName is valid ONLY in Create dispatch (not in
completion).
Don’t try to use it during any other IRP processing.


Kind regards, Dejan M. MVP for DDK
http://www.alfasp.com E-mail: xxxxx@alfasp.com
Alfa Transparent File Encryptor - Transparent file encryption services.
Alfa File Protector - File protection and hiding library for Win32
developers.
Alfa File Monitor - File monitoring library for Win32 developers.

FileObject->FileName is valid only on CREATE path, and only in CREATE path down. In all other paths, it can be invalid.

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

----- Original Message -----
From: Fernando Roberto da Silva
To: Windows File Systems Devs Interest List
Sent: Thursday, November 27, 2003 4:17 PM
Subject: [ntfsd] FileName at Paged Pool

Hi all,

I’m trying build file name from FILE_OBEJCT at IRP_MJ_SET_INFORMATION. And this works fine, but when I enable DriverVerifier to check IRQL, I get a BugCheck when I read pFileObject->FileName.Buffer[0]. With WinDbg I did see that FileName.Buffer is allocated at paged pool. Is it normal?

Thanks in advance,
Fernando.

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

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

Building IRP (IRP_MJ_QUERY_INFORMATION) with FileNameInformation class is a right solution?

“Maxim S. Shatskih” wrote in message news:xxxxx@ntfsd…
FileObject->FileName is valid only on CREATE path, and only in CREATE path down. In all other paths, it can be invalid.

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

----- Original Message -----
From: Fernando Roberto da Silva
To: Windows File Systems Devs Interest List
Sent: Thursday, November 27, 2003 4:17 PM
Subject: [ntfsd] FileName at Paged Pool

Hi all,

I’m trying build file name from FILE_OBEJCT at IRP_MJ_SET_INFORMATION. And this works fine, but when I enable DriverVerifier to check IRQL, I get a BugCheck when I read pFileObject->FileName.Buffer[0]. With WinDbg I did see that FileName.Buffer is allocated at paged pool. Is it normal?

Thanks in advance,
Fernando.

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

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

Not always. There could be cases when you end up deadlocking if you send
this IRP down at arbitrary time (I think, you will deadlock within paged
i/o paths). Usually you get file path in your filter’s create dispatch
(when it’s safe) and keep a map between that path and FILE_OBJECT that
you monitor.

-----Original Message-----
From: Eugene Lomovsky [mailto:xxxxx@mail.ru]
Sent: Tuesday, December 02, 2003 1:28 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Re: FileName at Paged Pool

Building IRP (IRP_MJ_QUERY_INFORMATION) with FileNameInformation class
is a right solution?
“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
FileObject->FileName is valid only on CREATE path, and only
in CREATE path down. In all other paths, it can be invalid.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: Fernando Roberto da Silva
mailto:xxxxx
To: Windows File Systems Devs Interest List
mailto:xxxxx
Sent: Thursday, November 27, 2003 4:17 PM
Subject: [ntfsd] FileName at Paged Pool

Hi all,

I’m trying build file name from FILE_OBEJCT at
IRP_MJ_SET_INFORMATION. And this works fine, but when I enable
DriverVerifier to check IRQL, I get a BugCheck when I read
pFileObject->FileName.Buffer[0]. With WinDbg I did see that
FileName.Buffer is allocated at paged pool. Is it normal?

Thanks in advance,
Fernando.

Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

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

Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as:
xxxxx@borland.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx>

ObQueryNameString too.
For file objects, it will do exactly this.

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

----- Original Message -----
From: Eugene Lomovsky
Newsgroups: ntfsd
To: Windows File Systems Devs Interest List
Sent: Tuesday, December 02, 2003 12:28 PM
Subject: [ntfsd] Re: FileName at Paged Pool

Building IRP (IRP_MJ_QUERY_INFORMATION) with FileNameInformation class is a right solution?

“Maxim S. Shatskih” wrote in message news:xxxxx@ntfsd…
FileObject->FileName is valid only on CREATE path, and only in CREATE path down. In all other paths, it can be invalid.

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

----- Original Message -----
From: Fernando Roberto da Silva
To: Windows File Systems Devs Interest List
Sent: Thursday, November 27, 2003 4:17 PM
Subject: [ntfsd] FileName at Paged Pool

Hi all,

I’m trying build file name from FILE_OBEJCT at IRP_MJ_SET_INFORMATION. And this works fine, but when I enable DriverVerifier to check IRQL, I get a BugCheck when I read pFileObject->FileName.Buffer[0]. With WinDbg I did see that FileName.Buffer is allocated at paged pool. Is it normal?

Thanks in advance,
Fernando.

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

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

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

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

Yes, neither the IRP nor ObQueryNameString can be called with locks held or in non-top-level-IRP paths.

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

----- Original Message -----
From: Vladimir Chtchetkine
To: Windows File Systems Devs Interest List
Sent: Tuesday, December 02, 2003 6:45 PM
Subject: [ntfsd] Re: FileName at Paged Pool

Not always. There could be cases when you end up deadlocking if you send this IRP down at arbitrary time (I think, you will deadlock within paged i/o paths). Usually you get file path in your filter’s create dispatch (when it’s safe) and keep a map between that path and FILE_OBJECT that you monitor.

-----Original Message-----
From: Eugene Lomovsky [mailto:xxxxx@mail.ru]
Sent: Tuesday, December 02, 2003 1:28 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Re: FileName at Paged Pool

Building IRP (IRP_MJ_QUERY_INFORMATION) with FileNameInformation class is a right solution?

“Maxim S. Shatskih” wrote in message news:xxxxx@ntfsd…

FileObject->FileName is valid only on CREATE path, and only in CREATE path down. In all other paths, it can be invalid.

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

----- Original Message -----

From: Fernando Roberto da Silva

To: Windows File Systems Devs Interest List

Sent: Thursday, November 27, 2003 4:17 PM

Subject: [ntfsd] FileName at Paged Pool

Hi all,

I’m trying build file name from FILE_OBEJCT at IRP_MJ_SET_INFORMATION. And this works fine, but when I enable DriverVerifier to check IRQL, I get a BugCheck when I read pFileObject->FileName.Buffer[0]. With WinDbg I did see that FileName.Buffer is allocated at paged pool. Is it normal?

Thanks in advance,

Fernando.


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

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


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

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