Bug 159833 - camcontrol(8): [patch] add ATA security options to camcontrol including secure erase
Summary: camcontrol(8): [patch] add ATA security options to camcontrol including secur...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steven Hartland
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 10:10 UTC by Steven Hartland &
Modified: 2013-06-07 15:58 UTC (History)
0 users

See Also:


Attachments
file.diff (34.23 KB, patch)
2011-08-17 10:10 UTC, Steven Hartland &
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Hartland & 2011-08-17 10:10:09 UTC
With increase in use of both SSD's and ZFS and the lack of TRIM support under ZFS SSD's need to be secure erased periodically to return performance to that when they are new.

The attached patch adds the relavent options to camcontrol that enables an admin to perform all the ATA security options on a disk, including the ability to secure erase a disk.

Given the dangerous nature of the commands added, the patch also adds long option support to camcontrol so that command line options used are understandable instead of random letters with little or no correspondence to the options they represent.

This patch has been discussed on the fs mailing list here, where some changes where suggested an implemented:-
http://lists.freebsd.org/pipermail/freebsd-fs/2011-August/012148.html

Some more examples and info can also be found here:-
http://blog.multiplay.co.uk/2011/08/freebsd-security-support-for-ata-devices-via-camcontrol/

Much credit to Daniel Roethlisberger for his work on adding security support to atacontrol, detailed in PR bin/127918 which was the basis of this code.
http://www.roe.ch/ATA_Security
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/127918

Fix: N/A

Patch attached with submission follows:
How-To-Repeat: N/A
Comment 1 Jeremy Chadwick 2012-11-08 18:54:44 UTC
This incredibly useful PR/patch has been neglected for over a year.

SSDs are mainstream now and being used commonly by FreeBSD users.  This
greatly increases the want for secure erase.  Sure, we have TRIM for
UFS, and HEAD/CURRENT has TRIM for ZFS, and that's good at keeping
the FTL optimal on an SSD, but let's be reasonable here.

Alexander and Andriy, I know you're both busy, but can either of you
review this?

If you need/want an updated patch (specifically for 8.3 and 9.x), I can
provide updated ones (will take me some time of course).

Thanks guys.

-- 
| Jeremy Chadwick                                   jdc@koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Mountain View, CA, US                                            |
| Making life hard for others since 1977.             PGP 4BD6C0CB |
Comment 2 Steven Hartland & 2012-11-09 00:19:48 UTC
----- Original Message ----- 
From: "Jeremy Chadwick" <jdc@koitsu.org>


> This incredibly useful PR/patch has been neglected for over a year.
> 
> SSDs are mainstream now and being used commonly by FreeBSD users.  This
> greatly increases the want for secure erase.  Sure, we have TRIM for
> UFS, and HEAD/CURRENT has TRIM for ZFS, and that's good at keeping
> the FTL optimal on an SSD, but let's be reasonable here.
> 
> Alexander and Andriy, I know you're both busy, but can either of you
> review this?
> 
> If you need/want an updated patch (specifically for 8.3 and 9.x), I can
> provide updated ones (will take me some time of course).
> 
> Thanks guys.

I have an updated version of this patch which is waiting on finishing
off some cam related patches that I'm working with mav@ on.

So for now lets hold off on this one and I'll get the updated across once
the dependencies are all place :)

    Regards
    Steve

================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster@multiplay.co.uk.
Comment 3 Steven Hartland freebsd_committer freebsd_triage 2012-12-11 14:12:28 UTC
Responsible Changed
From-To: freebsd-bugs->smh

I'll take it.
Comment 4 Steven Hartland freebsd_committer freebsd_triage 2013-04-25 17:24:11 UTC
State Changed
From-To: open->patched

Awaiting MFC of r249115
Comment 5 Steven Hartland freebsd_committer freebsd_triage 2013-06-07 15:58:33 UTC
State Changed
From-To: patched->closed

Committed. Thanks!