GNU bug report logs - #15633
dd and host protected area

Previous Next

Package: coreutils;

Reported by: "Peter D." <0123peter <at> gmail.com>

Date: Wed, 16 Oct 2013 16:39:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15633 in the body.
You can then email your comments to 15633 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#15633; Package coreutils. (Wed, 16 Oct 2013 16:39:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Peter D." <0123peter <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 16 Oct 2013 16:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Peter D." <0123peter <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: dd and host protected area
Date: Wed, 16 Oct 2013 18:19:54 +1100
[Message part 1 (text/plain, inline)]
Hi,

Is it deliberate that dd can not read from, or write to the host protected
area?  Or is it a bug?

It is sensible the the OS does not normally access the HPA, but dd is  not
a normal tool.

Personally I would expect it to be able to read from the HPA and to write
to  it with a suitable flag like, "--yes-I-am-reckless".

Some jurisdictions require that hard drives be blanked before disposal.  Dd
is the obvious tool for that.

I have two 80GB drives in this machine one with HPA, the other without.
Hear is a cut'n'paste from my console...

psd <at> psd-System-Product-Name:~$
psd <at> psd-System-Product-Name:~$
psd <at> psd-System-Product-Name:~$
psd <at> psd-System-Product-Name:~$ sudo hdparm -N /dev/sdb

/dev/sdb:
 max sectors   = 156299375/156301488, HPA is enabled
psd <at> psd-System-Product-Name:~$ sudo dd count=1 if=/dev/sdb of=junk
skip=156299376
dd: `/dev/sdb': cannot skip: Invalid argument
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000515987 s, 0.0 kB/s
psd <at> psd-System-Product-Name:~$ sudo dd count=1 if=/dev/sdb of=junk
skip=156299375
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000105041 s, 0.0 kB/s
psd <at> psd-System-Product-Name:~$ sudo hdparm -N /dev/sda

/dev/sda:
 max sectors   = 156301488/156301488, HPA is disabled
psd <at> psd-System-Product-Name:~$ sudo dd count=1 if=/dev/sda of=junk
skip=156299376
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.0182093 s, 28.1 kB/s
psd <at> psd-System-Product-Name:~$
psd <at> psd-System-Product-Name:~$ dd --version
dd (coreutils) 8.13
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie and Stuart Kemp.
psd <at> psd-System-Product-Name:~$

Thank you.

-- 
Peter D.
Sig goes here...
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Wed, 16 Oct 2013 18:26:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 15633 <at> debbugs.gnu.org and "Peter D." <0123peter <at> gmail.com> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Wed, 16 Oct 2013 18:26:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#15633; Package coreutils. (Wed, 16 Oct 2013 20:26:02 GMT) Full text and rfc822 format available.

Message #12 received at 15633 <at> debbugs.gnu.org (full text, mbox):

From: Phillip Susi <psusi <at> ubuntu.com>
To: "Peter D." <0123peter <at> gmail.com>
Cc: 15633 <at> debbugs.gnu.org
Subject: Re: bug#15633: dd and host protected area
Date: Wed, 16 Oct 2013 16:24:51 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/16/2013 3:19 AM, Peter D. wrote:
> Hi,
> 
> Is it deliberate that dd can not read from, or write to the host
> protected area?  Or is it a bug?

The HPA is a feature of the drive, not the OS or software, so dd has
no idea whether or not there is one and can not "get around" it.  To
unlock the full capacity of the drive you have to send commands to the
drive.  You can have the libata driver do this by setting
libata.ignore_hpa=1.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSXvYTAAoJEJrBOlT6nu75nbIH/3fbuqzWpJWKFr9ngYvHcMcB
FkMNDF7Up0JrmaT/7/uXwfGVjUYiGiPdGI9EzmizpKhunfdxc5qkmiM8bD1M2+NW
Nk8dJp/Pc2gw4N++w7IsqQ4U5vPPlqLYRDmYGecC7HOSpRLecHRKXd8V3vMJYvDd
/Tw463Jk/svlZOBGUmtQZnlZnIsjRgcxWqDfMx+4yskjDTVYy7dPjxEa8OEqkBmB
X75N2RN+k7KS/CHtXLMdZ/RwqovSvpbQPuc8WoTgq35GA+IDhFNT/iLExgSooLp+
ijE4JmWsUg867ZxVgYFqKzjARBxYwxxt2sTBk9tFG9AxbZEGldvSGW7PeRgwIjw=
=d4XP
-----END PGP SIGNATURE-----




Information forwarded to bug-coreutils <at> gnu.org:
bug#15633; Package coreutils. (Wed, 16 Oct 2013 20:31:01 GMT) Full text and rfc822 format available.

Message #15 received at 15633 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 15633 <at> debbugs.gnu.org
Subject: Re: bug#15633: dd and host protected area
Date: Wed, 16 Oct 2013 21:30:02 +0100
tag 15633 notabug
close 15633
stop

On 10/16/2013 08:19 AM, Peter D. wrote:
> Hi,
> 
> Is it deliberate that dd can not read from, or write to the host protected
> area?  Or is it a bug?

Deliberate.

dd is a high level tool (the d is for data not disk).
Consequently dd just requests the OS to read/write etc.

> It is sensible the the OS does not normally access the HPA, but dd is  not
> a normal tool.
> 
> Personally I would expect it to be able to read from the HPA and to write
> to  it with a suitable flag like, "--yes-I-am-reckless".
> 
> Some jurisdictions require that hard drives be blanked before disposal.  Dd
> is the obvious tool for that.

shred is more appropriate actually.

I would think a specialized tool (when the OS is allowed access),
or settings in the BIOS to disable this area is more appropriate.

thanks,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#15633; Package coreutils. (Wed, 16 Oct 2013 20:50:02 GMT) Full text and rfc822 format available.

Message #18 received at 15633 <at> debbugs.gnu.org (full text, mbox):

From: SciFi <sci-fi <at> hush.ai>
To: Phillip Susi <psusi <at> ubuntu.com>, "Peter D." <0123peter <at> gmail.com>
Cc: 15633 <at> debbugs.gnu.org
Subject: Re: bug#15633: dd and host protected area
Date: Wed, 16 Oct 2013 15:49:23 -0500
[Message part 1 (text/plain, inline)]
On 2013/10/16 15:24, Phillip Susi wrote:
> On 10/16/2013 3:19 AM, Peter D. wrote:
>> Hi,
> 
>> Is it deliberate that dd can not read from, or write to the host
>> protected area?  Or is it a bug?
> 
> The HPA is a feature of the drive, not the OS or software, so dd has
> no idea whether or not there is one and can not "get around" it.  To
> unlock the full capacity of the drive you have to send commands to the
> drive.  You can have the libata driver do this by setting
> libata.ignore_hpa=1.

Pardon me for jumping in here, but is there an option in OSX that can do
similarly?  (I know, wrong list & all that jazz, maybe I can get lucky)


[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Nov 2013 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.