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