Bug 47011 - /dev/one character device
Summary: /dev/one character device
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-04 12:54 UTC by Robin Bankhead
Modified: 2012-09-04 14:56 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.5.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Patch to drivers/char/mem.c to create a /dev/one device (1.83 KB, patch)
2012-09-04 12:54 UTC, Robin Bankhead
Details | Diff

Description Robin Bankhead 2012-09-04 12:54:25 UTC
Created attachment 79221 [details]
Patch to drivers/char/mem.c to create a /dev/one device

Apologies if this has been discussed and vetoed already, couldn't find anything here or on LKML.

I think it would be useful for the kernel to have a /dev/one device (supplying a stream of binary 1) to complement /dev/zero. The primary use-case would be for implementation of certain state- and guru-endorsed disk erasure algorithms, including

- Canadian RCMP TSSIT OPS-II (7 passes)
- German VSITR (7 passes)
- Bruce Schneier (7 passes)

Other uses may present themselves, but this alone seems compelling.

The attached patch is only minimally my work, I adapted it from an old one I found here:
http://www.linuxquestions.org/questions/linux-newbie-8/is-there-a-dev-one-like-dev-zero-619626/

Hope this is of some interest.
Comment 1 Alan 2012-09-04 14:56:22 UTC
This was rejected - you can do it lots of other ways. The zero on the other hand is very useful for mappings when handling memory allocation so has a kernel side use.

Also note that because of bad sector remapping on any vaguely modern rotating disk , and because SSDs work entirely differently no number of passes of writing data are guaranteed to erase a disk. You should be using the disk level secure erase feature and command set via hdparm or similar tools. Your drive vendor should be able to confirm the certifications they meet.

Note You need to log in before you can comment on or make changes to this bug.