From a lower disk filter I sent a request with LBA > disk capacity and I noticed that port drivers (iastor.sys and ataport.sys) do not flag error and let the request go to disk. Is there any reason why they do not do this? Just curious.
Also I noticed the following code and comment in disk.c::DiskReadWriteVerification
//
// This failed because we think the physical disk is too small.
// Send it down to the drive and let the hardware decide for
// itself.
//
Why not fail the request in class driver or port driver? Any history behind this reasoning will be useful. Thanks.
I observed the same behavior if I send the read/write with LBA > disk capacity from a upper disk filter. Can somebody enlighten me why class/port driver are not failing this request and are letting it go the disk device hardware. Thanks.
Who defined the disk capacity? There is “hidden” real estate on HDDs that is used by the manufacturer for it’s own logs and diagnostics. A few years ago Seagate used a “magic” LBA to implement its secure read/write functionality on their first trusted drive. LBAs beyond the “capacity” printed on the label do exist.
Gary G. Little
----- Original Message -----
From: “cool 2k7”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 14, 2010 6:21:38 AM
Subject: [ntdev] read/write LBA beyond disk capacity…
From a lower disk filter I sent a request with LBA > disk capacity and I noticed that port drivers (iastor.sys and ataport.sys) do not flag error and let the request go to disk. Is there any reason why they do not do this? Just curious.
Also I noticed the following code and comment in disk.c::DiskReadWriteVerification
//
// This failed because we think the physical disk is too small.
// Send it down to the drive and let the hardware decide for
// itself.
//
Why not fail the request in class driver or port driver? Any history behind this reasoning will be useful. Thanks.
—
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
Thanks Gary.
I was talking about the capacity that is reported by IDENTIFY DATA for an ata disk. So if I understand you correctly, there are LBAs beyond this IDENTIFY DATA reported capacity and if ones try to access them none of the device drivers in the storage stack is going to complain.
I do believe it will depend upon your access level, as admin access or as a user. In XP and above you have to be an admin to open a handle to a physical disk to use LBA addressing in the first place and typically admin has sufficient rights. The manufacturer may also implement vendor defined functions added to the SCSI or ATA command set to get their diagnostic data from that extra real estate. I don’t recall any code in the class drivers that I have looked at that checks to see if a given LBA is beyond the capacity, but then I’ve never looked for that code either. I do know those areas do exist and you can get to them given the proper set of privileges.
Gary G. Little
----- Original Message -----
From: “cool 2k7”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 14, 2010 8:10:40 AM
Subject: RE:[ntdev] read/write LBA beyond disk capacity…
Thanks Gary.
I was talking about the capacity that is reported by IDENTIFY DATA for an ata disk. So if I understand you correctly, there are LBAs beyond this IDENTIFY DATA reported capacity and if ones try to access them none of the device drivers in the storage stack is going to complain.
—
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
In my experiments I was trying to access those LBAs from kernel mode only and was surprised to see that none of the drivers class/port etc ever complained and let the request go all the way to the physical disk hardware.
Experimenting is fine, that space may look enticing for something really really cool and special, but it really tain’t for consumption.
Gary G. Little
----- Original Message -----
From: “cool 2k7”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 14, 2010 8:42:11 AM
Subject: RE:[ntdev] read/write LBA beyond disk capacity…
In my experiments I was trying to access those LBAs from kernel mode only and was surprised to see that none of the drivers class/port etc ever complained and let the request go all the way to the physical disk hardware.
—
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
Thanks for the advice. The disk is proprietary and I need to access some LBAs beyond the advertised capacity and want to make sure that I’m not making any storage driver unhappy.
By proprietary do you mean you are an HDD/SSD manufacturer, and consequently control the FW of the HDD/SSD for that matter and can guarantee that those “magic” LBAs will never ever under any circumstance be used for FW housekeeping? If the answer to that is “NO”, then you really never have control of those LBAs and using them could result in you blowing your foot off.
Gary G. Little
----- Original Message -----
From: “cool 2k7”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 14, 2010 8:56:41 AM
Subject: RE:[ntdev] read/write LBA beyond disk capacity…
Thanks for the advice. The disk is proprietary and I need to access some LBAs beyond the advertised capacity and want to make sure that I’m not making any storage driver unhappy.
—
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
Yes those LBAs shall never be used for FW housekeeping. hw/fw is not an issue - my primary concern is windows storage drivers.
Ok, you really didn’t answer the question, and your gmail address doesn’t give me any warm and fuzzy’s about your proprietorship or your ability to control those LBAs. If you don’t control the FW, or have a working agreement with the FW developers to allow you to use those LBAs you can’t control those LBAs, and obviously you limit yourself to that HDD/SSD manufacturer.
Gary G. Little
----- Original Message -----
From: “cool 2k7”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 14, 2010 9:28:31 AM
Subject: RE:[ntdev] read/write LBA beyond disk capacity…
Yes those LBAs shall never be used for FW housekeeping. hw/fw is not an issue - my primary concern is windows storage drivers.
—
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
Back in 1967, my officemate said “I wonder what happens if I do THIS…?”
and wrote a program to open a file which turned out to be the master file
directory for the disk. He was successful in opening and reading it. Then
he wondered, “I wonder if it is write-protected…?” and wrote a program to
open it in write mode. Since he didn’t want to do any harm, he immediately
closed the descriptor. Unfortunately, what this did was truncate the size
of the disk directory to 0, which did not actually take effect until the
system was rebooted(we’re talking a US$10,000,000 IBM mainframe here,
serving the entire University). When it rebooted, it couldn’t find any of
its critical files, and went into a death spiral. It took hours to locate
the problem. My officemate ended up in serious trouble, and was nearly
expelled from the Ph.D. program. He was later told that he was an idiot to
think that IBM actually protected the master file directory against
arbitrary users…(well, my view was the idiocy was IBM’s). So reading and
writng high LBAs is not exactly a safe thing to do.
Even just seeking to certain LBAs might have consequences.
joe
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
Sent: Tuesday, December 14, 2010 9:54 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] read/write LBA beyond disk capacity…
Experimenting is fine, that space may look enticing for something really
really cool and special, but it really tain’t for consumption.
Gary G. Little
----- Original Message -----
From: “cool 2k7”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 14, 2010 8:42:11 AM
Subject: RE:[ntdev] read/write LBA beyond disk capacity…
In my experiments I was trying to access those LBAs from kernel mode only
and was surprised to see that none of the drivers class/port etc ever
complained and let the request go all the way to the physical disk hardware.
—
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
—
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
–
This message has been scanned for viruses and
dangerous content by http:</http:> MailScanner, and is
believed to be clean.