Problem with STATUS_INVALID_DEVICE_OBJECT_PARAMETER

Hi, guys!

I got a problem:

I have two minifilter drivers, called A and B. A is above B. B is a redirector filter, which redirect objects from c:\xxx\yyy\zzz to d:\cache\xxx\yyy\zzz.

Here is the problem:

A called FltCreateFile to open ‘c:\1.txt’, when this request arrived B, B redirect it to ‘d:\cache\1.txt’, that means a FO in ‘d:’ device stack was returned while A specified a ‘c:’ device_object as a hint. So A got a ‘STATUS_INVALID_DEVICE_OBJECT_PARAMETER’ status.

The stack is like this:

kd> kv
ChildEBP RetAddr Args to Child
b8d9b330 808ee689 b8d9b3fc 846639c8 00000000 nt!IopCheckTopDeviceHint+0x56
b8d9b424 809241d1 84b2d2c8 00000000 84747a18 nt!IopParseDevice+0x417
b8d9b4a4 80920538 00000000 b8d9b4e4 00000240 nt!ObpLookupObjectName+0x5a7
b8d9b4f8 808e1119 00000000 00000000 d9b5b800 nt!ObOpenObjectByName+0xe8
b8d9b574 808e3242 b8d9b710 00000000 b8d9b6f8 nt!IopCreateFile+0x447
b8d9b5bc f732f6ae b8d9b710 00000000 b8d9b6f8 nt!IoCreateFileSpecifyDeviceObjectHint+0x50
b8d9b668 f732f828 84684ad8 84894888 b8d9b710 fltMgr!FltCreateFileEx+0x114
b8d9b6ac b8a3a506 84684ad8 84894888 b8d9b710 fltMgr!FltCreateFile+0x36
b8d9b71c b8a2fb84 84894888 b8d9b784 00000000 A!OpenObject+0xf6
b8d9b758 b8a30151 84894888 b8d9b784 00000001 A!ObjectExists+0xd4
b8d9b78c b8a30f8c 84857f14 8556abc8 b8d9b7ff A!ParentExistsInOriginalPath+0x101
b8d9b87c b8a31a40 84857f14 8556abc8 b8d9b8cb A!PreCreateOfPuppet+0x32c
b8d9b908 b8a4cb48 84857f14 b8d9b92c 00000000 A!UrPreCreate+0x270
b8d9b934 f7337465 84857f14 b8d9b980 b8d9b99c A!FltPreOperationCallback+0x158
b8d9b960 f731d4e8 00000009 00000000 b8d9b99c fltMgr!FltvPreOperation+0x3f
b8d9b9c0 f731ef48 00d9ba04 84857eb8 86200fd8 fltMgr!FltpPerformPreCallbacks+0x2d4
b8d9b9d4 f732d0ad b8d9ba04 f732b540 00000000 fltMgr!FltpPassThroughInternal+0x32
b8d9b9ec f732d59d b8d9ba04 00000000 80a45be4 fltMgr!FltpCreateInternal+0x63
b8d9ba20 809ab1d2 846605c8 86200e48 8490c340 fltMgr!FltpCreate+0x229
b8d9ba50 8081f881 808eeca7 b8d9bb44 808eeca7 nt!IovCallDriver+0x110

The next instruction is :
808edda0 b8690300c0 mov eax,0C0000369h <status_invalid_device_object_parameter>
Is this logical?
If this is by design. A redirector filter, like B, will let all other filters above work incorrectly, right?

Thanks in advance!

Alex.</status_invalid_device_object_parameter>

I’m sorry, I didnot convey the situation properly.

There situation is :
A called FltCreateFile to open ‘c:\1.txt’, when this request arrived B, B
redirect it to ‘d:\cache\1.txt’, that means it returns STATUS_REPARSE with
FO->FileName set to’‘d:\cache\1.txt’ while A specified a ‘c:’ device_object
as a hint. Then ObjMgr reparse the new path and called IopCheckTopDeviceHint
which returned the value ‘STATUS_INVALID_DEVICE_OBJECT_PARAMETER’.

Thanks!

Alex.

It appears that IopCheckTopDeviceHint is not available and hence not used in XP SP3, so you encountered some new implementation. Have you checked on XP, how it is working.

Hi adi,
I have checked on xpSp3 and win2003, the situation is same as above.

This is a limitation of IoCreateFileSpecifyDeviceObjectHint, it doesn’t deal
with cross volume reparses if you specify a DO hint. The only options are to
retry without a DO hint (which effectively creates recursive I/O, though to
a different stack) or know that you’ll see the reparsed create in your
filter instance on the other stack and delay your processing until then.

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

“Alex” wrote in message news:xxxxx@ntfsd…
Hi adi,
I have checked on xpSp3 and win2003, the situation is same as above.

> This is a limitation of IoCreateFileSpecifyDeviceObjectHint, it doesn’t

deal with cross volume reparses if you specify a DO hint

Pet peeve: why does IoCreateFileSpecifyDeviceObjectHint (or FltCreate or
any of that crowd) not have the ability to return the reparse buffer?

And (other pet peeve) why do they silently succeed if the device works.
This has all sorts of unfortunate side effects if you are not aware that it
is doing that for you…

Seriously, it would be fantastic if that family of APIs could grow versions
which could be asked to not follow ‘same device’ links and which could also
be asked to supply the reparse information in case of STATUS_REPARSE.

Rod

“Scott Noone” wrote in message news:xxxxx@ntfsd…
> This is a limitation of IoCreateFileSpecifyDeviceObjectHint, it doesn’t
> deal with cross volume reparses if you specify a DO hint. The only options
> are to retry without a DO hint (which effectively creates recursive I/O,
> though to a different stack) or know that you’ll see the reparsed create
> in your filter instance on the other stack and delay your processing until
> then.
>
> -scott
>
> –
> Scott Noone
> Consulting Associate
> OSR Open Systems Resources, Inc.
> http://www.osronline.com
>
>
> “Alex” wrote in message news:xxxxx@ntfsd…
> Hi adi,
> I have checked on xpSp3 and win2003, the situation is same as above.
>
>

> Seriously, it would be fantastic if that family of APIs could grow

versions which could be asked to not follow ‘same device’ links and which
could also be asked to supply the reparse information in case of
STATUS_REPARSE.

An emphatic +1…Of course, that doesn’t help us on legacy platforms like
Windows 7 :slight_smile:

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

“Rod Widdowson” wrote in message
news:xxxxx@ntfsd…
>> This is a limitation of IoCreateFileSpecifyDeviceObjectHint, it doesn’t
>> deal with cross volume reparses if you specify a DO hint
>
> Pet peeve: why does IoCreateFileSpecifyDeviceObjectHint (or FltCreate or
> any of that crowd) not have the ability to return the reparse buffer?
>
> And (other pet peeve) why do they silently succeed if the device works.
> This has all sorts of unfortunate side effects if you are not aware that
> it is doing that for you…
>
> Seriously, it would be fantastic if that family of APIs could grow
> versions which could be asked to not follow ‘same device’ links and which
> could also be asked to supply the reparse information in case of
> STATUS_REPARSE.
>
> Rod
>
> “Scott Noone” wrote in message news:xxxxx@ntfsd…
>> This is a limitation of IoCreateFileSpecifyDeviceObjectHint, it doesn’t
>> deal with cross volume reparses if you specify a DO hint. The only
>> options are to retry without a DO hint (which effectively creates
>> recursive I/O, though to a different stack) or know that you’ll see the
>> reparsed create in your filter instance on the other stack and delay your
>> processing until then.
>>
>> -scott
>>
>> –
>> Scott Noone
>> Consulting Associate
>> OSR Open Systems Resources, Inc.
>> http://www.osronline.com
>>
>>
>> “Alex” wrote in message news:xxxxx@ntfsd…
>> Hi adi,
>> I have checked on xpSp3 and win2003, the situation is same as above.
>>
>>
>
>

We are aware of the problem and are working on this. The intention is to make it available to all downlevel supported OSes (even old ones like Win7 :stuck_out_tongue: ) but we’ll see how that goes.

Regards,
Alex.
This posting is provided “AS IS” with no warranties, and confers no rights.

Thanks, all.

It looks like I have to change my cache storage to system partition :frowning:

Thanks very much!

Alex.

Alex

This is great news.

Yet again I need to thank you for the work that you are doing for the
community.

Rod

“Alexandru Carp” wrote in message
news:xxxxx@ntfsd…
We are aware of the problem and are working on this. The intention is to
make it available to all downlevel supported OSes (even old ones like Win7
:stuck_out_tongue: ) but we’ll see how that goes.

Regards,
Alex.
This posting is provided “AS IS” with no warranties, and confers no rights.