summaryrefslogtreecommitdiffstats
path: root/sys/geom/bde
Commit message (Collapse)AuthorAgeFilesLines
...
* Do an explicit retry after we have dumped the cache, rather than aphk2003-04-251-4/+3
| | | | (potential) tail recursion.
* If on a BIO_READ request, we failed to allocate the bio for readingphk2003-04-251-6/+13
| | | | | | | | our key-sector, we would end up returning the read without an error, despite the fact that the data was not correctly decrypted. This would result in data corruption on read, but intact data still on the media.
* Fix a problem and slightly improve the ENOMEM handling:phk2003-04-251-11/+12
| | | | | | | | | | | | | Give up the entire bio as soon as we detect a problem. When we detect a problem, give up the bio by contributing the remainder with ENOMEM, rather than kicking the bio back right away. If we failed on a non-first iteration we previously could end up modifying fields in the bio after we delivered it. This could account for memory corruption (none directly reported) on machines with GBDE.
* Don't count a sector in the cache unless we manage to create it.phk2003-04-251-2/+2
|
* Rename g_bde_release_sector() to g_bde_release_keysector() and pick upphk2003-04-251-7/+9
| | | | the sector from the work item.
* Rename g_bde_read_sector() to g_bde_read_keysector() pick up the offsetphk2003-04-251-5/+5
| | | | in the work structure.
* Remove all references to BIO_SETATTR. We will not be using it.phk2003-04-031-1/+0
|
* Use sys/endian.h instead of geom_enc.c for endian-agnostfication.phk2003-04-032-17/+19
|
* Remove the old config interface now that the new OAM is functional.phk2003-04-011-153/+0
|
* Add create_geom and destroy_geom methods.phk2003-03-291-0/+159
|
* Forward compatibility: NULL check the passed in meta argument.phk2003-03-251-1/+1
|
* Premptively change initializations of struct g_class to use C99phk2003-03-241-3/+2
| | | | | sparse struct initializations before we extend the struct with new OAM related member functions.
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-184-4/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* Limit our requests to DFLTPHYS, this is generally a good idea forphk2003-03-071-0/+5
| | | | | | memory-allocation purposes. Right now it is also a very good idea because we hit a Giant assertion in the free(9) processing if we free something larger than 64k.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Typo in last commit.phk2003-02-111-2/+2
|
* Better names for struct disk elements: d_maxsize, d_stripeoffsetphk2003-02-111-0/+2
| | | | | | | | | | | and d_stripesisze; Introduce si_stripesize and si_stripeoffset in struct cdev so we can make the visible to clustering code. Add stripesize and stripeoffset to providers. DTRT with stripesize and stripeoffset in various places in GEOM.
* Unconditionally make our provider with G_PF_CANDELETE.phk2003-02-111-0/+1
|
* Move the g_stat struct to its own .h file, we will export it to other code.phk2003-02-082-2/+0
| | | | | | | | | | | | | | | | | | Insted of embedding a struct g_stat in consumers and providers, merely include a pointer. Remove a couple of <sys/time.h> includes now unneeded. Add a special allocator for struct g_stat. This allocator will allocate entire pages and hand out g_stat functions from there. The "id" field indicates free/used status. Add "/dev/geom.stats" device driver whic exports the pages from the allocator to userland with mmap(2) in read-only mode. This mmap(2) interface should be considered a non-public interface and the functions in libgeom (not yet committed) should be used to access the statistics data.
* Add the new statistics structure, put one in consumers and providers.phk2003-02-071-0/+1
| | | | include <sys/time.h> as necessary.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Optimize the size of the work-items by letting the mapping functionphk2003-01-023-48/+66
| | | | | decide the largest size which stays inside the zone and does not collide with a lock sector.
* Solve another bug in the mapping code: correctly skip lock sectors.phk2002-12-181-2/+2
| | | | | | | | | Make sure sector zero is protected if it contains metadata. Lower WARNS for gbde to 3 on non-i386 archs. rijndael-fst is evil but appearntly does the right thing and passes the test-vectors. MFC Candidate.
* Fix two blunders in the mapping functions which can lead to corrupt data,phk2002-12-183-44/+15
| | | | | | | | for request sizes larger than the sectorsize or for multi-key setups. See warning mailed to current@ for details of recovery. Found by: Marcus Reid <marcus@blazingdot.com>
* Fix spelling in comment.phk2002-12-131-1/+1
|
* Conceiveably, there may exist an algorithm which can tell if a sequence of bytesphk2002-12-011-0/+7
| | | | | | | | are the output of AES/128/CBC or ARC4RANDOM. Encrypt the random data with which we wipe when we get a BIO_DELETE to make such an algorithm useful. Sponsored by: DARPA & NAI Labs Approved by: re (blanket)
* Use unsigned for an index.phk2002-12-011-6/+7
| | | | | Sponsored by: DARPA & NAI Labs. Approved by: re (blanket).
* Straighten up the geom.ctl config interface definitions.phk2002-11-061-5/+5
| | | | Sponsored by: DARPA & NAI Labs
* Run a revision on the GBDE encryption facility.phk2002-11-045-244/+429
| | | | | | | | | | | | | | | | | | | | Replace ARC4 with SHA2-512. Change lock-structure encoding to use random ordering rather for obscurity. Encrypt lock-structure with AES/256 instead of AES/128. Change kkey derivation to be MD5 hash based. Watch for malloc(M_NOWAIT) failures and ditch our cache when they happen. Remove clause 3 of the license with NAI Labs consent. Many thanks to "Lucky Green" <shamrock@cypherpunks.to> and "David Wagner" <daw@cs.berkeley.edu>, for code reading, inputs and suggestions. This code has still not been stared at for 10 years by a gang of hard-core cryptographers. Discretion advised. NB: These changes result in the on-disk format changing: dump/restore needed. Sponsored by: DARPA & NAI Labs.
* Change the kkey generation cherry-picker to use MD5.phk2002-10-303-42/+26
| | | | Sponsored by: DARPA & NAI Labs
* Fix a bug in the cherry-picker kkey generator routine.phk2002-10-281-0/+1
| | | | | | | WARNING: You need to backup and restore the _unencrypted_ contents WARNING: of your GBDE disks when you take this update! Sponsored by: DARPA & NAI Labs.
* Now that the sectorsize and mediasize are properties of the provider,phk2002-10-201-10/+2
| | | | | | | | | | | don't take the detour over the I/O path to discover them using getattr(), we can just pick them out directly. Do note though, that for now they are only valid after the first open of the underlying disk device due compatibility with the old disk_create() API. This will change in the future so they will always be valid. Sponsored by: DARPA & NAI Labs.
* Make the sectorsize a property of providers so we can include it in the XMLphk2002-10-201-0/+1
| | | | | | output. Sponsored by: DARPA & NAI Labs
* Be consistent about functions being static.phk2002-10-201-2/+2
| | | | Spotted by: FlexeLint
* Constify input to the arc4 seed function.phk2002-10-202-9/+52
| | | | | | Implement the lockfile hunting in sector zero. Sponsored by: DARPA & NAI Labs.
* Fix a missing initialization.phk2002-10-191-0/+1
|
* Add Geom Based Disk Encryption to the tree.phk2002-10-195-0/+1830
This is an encryption module designed for to secure denial of access to the contents of "cold disks" with or without destruction activation. Major features: * Based on AES, MD5 and ARC4 algorithms. * Four cryptographic barriers: 1) Pass-phrase encrypts the master key. 2) Pass-phrase + Lock data locates master key. 3) 128 bit key derived from 2048 bit master key protects sector key. 3) 128 bit random single-use sector keys protect data payload. * Up to four different changeable pass-phrases. * Blackening feature for provable destruction of master key material. * Isotropic disk contents offers no information about sector contents. * Configurable destination sector range allows steganographic deployment. This commit adds the kernel part, separate commits will follow for the userland utility and documentation. This software was developed for the FreeBSD Project by Poul-Henning Kamp and NAI Labs, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS research program. Many thanks to Robert Watson, CBOSS Principal Investigator for making this possible. Sponsored by: DARPA & NAI Labs.
OpenPOWER on IntegriCloud