bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15633: dd and host protected area


From: Peter D.
Subject: bug#15633: dd and host protected area
Date: Wed, 16 Oct 2013 18:19:54 +1100

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...

address@hidden:~$
address@hidden:~$
address@hidden:~$
address@hidden:~$ sudo hdparm -N /dev/sdb

/dev/sdb:
 max sectors   = 156299375/156301488, HPA is enabled
address@hidden:~$ 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
address@hidden:~$ 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
address@hidden:~$ sudo hdparm -N /dev/sda

/dev/sda:
 max sectors   = 156301488/156301488, HPA is disabled
address@hidden:~$ 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
address@hidden:~$
address@hidden:~$ 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.
address@hidden:~$

Thank you.

-- 
Peter D.
Sig goes here...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]