Need Windows 7 RamDisk Driver Assistance

Developed a Windows 7 driver that allows a 1MB battery-backed RAM to appear as a hard drive to the system. Started with the WDK RamDisk sample and made the necessary changes. The driver works fine as long as I am the adminsitrator.

If I log in as a user, the drive is not accessible. I tried to change the properties of the drive but nothing I change sticks. Is there something I am missing that controls the security of the device?

Thanks in advance.

Did you use the IoCreateDeviceSecure to make the device object, and if
so did you use an SDDL that allows reads and writes by all users.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@winsystems.com” wrote in message
news:xxxxx@ntdev:

> Developed a Windows 7 driver that allows a 1MB battery-backed RAM to appear as a hard drive to the system. Started with the WDK RamDisk sample and made the necessary changes. The driver works fine as long as I am the adminsitrator.
>
> If I log in as a user, the drive is not accessible. I tried to change the properties of the drive but nothing I change sticks. Is there something I am missing that controls the security of the device?
>
> Thanks in advance.

Presumably, this device has an interface, such as iSCSI, PCI, USB, etc.
It might help if you mentioned this.

For example, my multi-terabyte RAID array has an iSCSI interface, but
every time the server boots, the device is inaccessible except to
administrators. I’ve been told it has something to do with the iSCSI
initiator coming up at the wrong time. Nobody seems to know how to fix
this. Each time I have to go in and reset the permissions. Fortunately,
I run Windows Server so it only gets rebooted about four times a year.
joe

Developed a Windows 7 driver that allows a 1MB battery-backed RAM to

appear as a hard drive to the system. Started with the WDK RamDisk sample
and made the necessary changes. The driver works fine as long as I am the
adminsitrator.

If I log in as a user, the drive is not accessible. I tried to change the
properties of the drive but nothing I change sticks. Is there something I
am missing that controls the security of the device?

Thanks in advance.


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

It is actually a proprietary interface through a FPGA. The FPGA is accessed through the LPC bus via an Intel ICH8 device.

Maybe the answer is you must be the adminsitrator to use the device.

Thanks for the input.

As I asked before, are you using IoCrreateDeviceSecure?

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@winsystems.com” wrote in message
news:xxxxx@ntdev:

> It is actually a proprietary interface through a FPGA. The FPGA is accessed through the LPC bus via an Intel ICH8 device.
>
> Maybe the answer is you must be the adminsitrator to use the device.
>
> Thanks for the input.

No I do not use this function.

Is this a WDF driver? By default, KMDF will use a restrictive SDDL for the device

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@winsystems.com
Sent: Monday, February 06, 2012 1:46 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Need Windows 7 RamDisk Driver Assistance

No I do not use this function.


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

If you are using IoCreateDevice it will restrict things to administrator
only, and as Doron mentioned the default action of WDF is similar. If
this is a WDM driver change IoCreateDevice to IoCreateDeviceSecure with
an appropriate SDDL string, if this is WDF driver use
WdfDeviceInitAssignSDDLString assign the SDDL string.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@winsystems.com” wrote in message
news:xxxxx@ntdev:

> No I do not use this function.

Yes, the creation function used is WdfDeviceCreate. How can I alter the SDDL?

As don suggested, call WdfDeviceInitAssignSDDLString

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@winsystems.com
Sent: Monday, February 06, 2012 1:56 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Need Windows 7 RamDisk Driver Assistance

Yes, the creation function used is WdfDeviceCreate. How can I alter the SDDL?


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

@Joe M:

I suppose your iSCSI device is registered as a persistent target? You can make the system startup wait for it to come up. The iSCSI control panel has the necessary settings.

This worked perfectly!! Thanks.

If you don’t mind I am going to ask another question in this thread. When I right-click on this drive and select “Format…”, nothing happens. How do I redirect this command to my driver’s format function? Is this an IOCTL_DISK call?

Are you supporting the various IOCTL_DISK_XXX and IOCTL_STORAGE_XXX
calls? You should be taking a look at the disk.sys sample code in the
WDK, since if that driver supports it you should.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

xxxxx@winsystems.com” wrote in message
news:xxxxx@ntdev:

> This worked perfectly!! Thanks.
>
> If you don’t mind I am going to ask another question in this thread. When I right-click on this drive and select “Format…”, nothing happens. How do I redirect this command to my driver’s format function? Is this an IOCTL_DISK call?

I think you need to interact with the mount manager and its set of IOCTLs vs exposing a fully baked disk with a drive letter that you pick.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@winsystems.com
Sent: Monday, February 06, 2012 3:45 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Need Windows 7 RamDisk Driver Assistance

This worked perfectly!! Thanks.

If you don’t mind I am going to ask another question in this thread. When I right-click on this drive and select “Format…”, nothing happens. How do I redirect this command to my driver’s format function? Is this an IOCTL_DISK call?


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

> It is actually a proprietary interface through a FPGA. The FPGA is accessed through the LPC bus via

an Intel ICH8 device.

What is the real need in a ramdisk on such slow a bus?


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

>select “Format…”, nothing happens. How do I redirect this command to my driver’s format function?

Disk drivers has no format calls, except the low-level format which has nothing to do with the Format feature of Windows (and IIRC actually used for some DVD-RW and BluRay media only).

For Windows Format to work, you must properly support all sizing IOCTLs (“get length info” and such) in your code.


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