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.

Full log


View this message in rfc822 format

From: "Peter D." <0123peter <at> gmail.com>
To: 15633 <at> debbugs.gnu.org
Subject: bug#15633: 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)]

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

Previous Next


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