summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the PC98 platform to the ATA driver.sos2002-12-031-0/+4
| | | | | | | | | | | | | | | | This mostly consists of functionality to serialize accesses to the two ATA channels (which can also be used to "fix" certain PCI based controllers). Add support for Acard controllers. Enable the ATA driver in PC98 GENERIC, and add device hints. Update man page with latest support. The PC98 core team has kindly provided me with a PC98 machine that made this all possible, thanks to all that contributed to that effort, without that this would probably newer have been possible.. Approved by: re@
* Use the hotspot code to prevent people from overwriting their disklabelphk2002-12-021-11/+90
| | | | | | with stuff which would ruin the day for any open parititons. Approved by: re
* Add a simplified version of the hot-spot code to enable us to protectphk2002-12-022-8/+95
| | | | | | in-band disklabels from in-band vandalism. Approve by: re
* Use more mnemonic argument names in the access functions.phk2002-12-011-2/+2
| | | | | Sponsored by: DARPA & NAI Labs Approved by: re (blanket)
* Fix a cut&past-o.phk2002-12-011-1/+1
| | | | | Spotted by: yar Approved by: re (blanket)
* 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).
* Remember to update the providers idea of its size when we reconfigurephk2002-11-201-0/+1
| | | | | | a slice child. Approved by: re
* Do not call the dumpconf method unless there is one.phk2002-11-201-4/+5
| | | | | | | Compare pointers with NULL. Partially submitted by: Christian Carstensen <cc@gate5.de> Approved by: re
* Save a slice name on the disk and print it at g_pc98_dumpconf().nyan2002-11-171-14/+26
|
* Remove harmless but irritating printf.phk2002-11-081-2/+0
|
* Always recalculate the SRM checksum if the label is at 64 bytes offset.phk2002-11-081-3/+13
| | | | Tested by: jhb
* Fix to support pc98.nyan2002-11-072-52/+120
| | | | | | It is mostly merged from MBR specific part. Reviewed by: phk
* Straighten up the geom.ctl config interface definitions.phk2002-11-064-46/+84
| | | | Sponsored by: DARPA & NAI Labs
* Polish a bit here and there.phk2002-11-042-10/+18
| | | | | | Reenable the geom.ctl device so people can play with gbde. 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.
* Reject slices where begin == end.phk2002-11-041-11/+11
| | | | | | Remove clause 3 from the license with NAI Labs consent. Sponsored by: DARPA & NAI Labs
* Remove clause 3 in the license with NAI's consent.phk2002-11-041-6/+6
| | | | | | | Reject slices with type==0. Diddle the bootverbose printfs. Sponsored by: DARPA & NAI Labs
* Remove the GEOM_GPT hack. We now check for partition type 0xEE andmarcel2002-11-021-25/+23
| | | | | | | | | | | | | | skip those. This handles the Protective MBR (PMBR) which consists of a single partition of type 0xEE that covers the whole disk and as such protects the GPT partitioning. We allow other partitions to be present besides partitions of type 0xEE and as such interpret partition type 0xEE as a "hands-off" partition only. While here, fix g_mbrext_dumpconf to test if indent is NULL and dump the data in a form that libdisk can grok. Change the logic in g_mbr_dumpconf to match that of g_mbrext_dumpconf. This does not change the output, but prevents a NULL-pointer dereference when indent == NULL && pp == NULL.
* Fix dumpconf so libdisk can grok its output. We weren't checkingmarcel2002-11-021-2/+6
| | | | if indent was NULL. Consequently we always emitted the XML format.
* malloc(9) with M_NOWAIT seems to return NULL a lot more than I would havephk2002-11-021-0/+14
| | | | | | | | | | | | | | | | | expected under -current. This is a problem for GEOM because the up/down threads cannot sleep waiting for memory to become free. The reason they cannot sleep is that paging things out to disk may be the only way we can clear up some RAM. Nice catch-22 there. Implement a rudimentary ENOMEM recovery strategy: If an I/O request fails with an error code of ENOMEM, schedule it for a retry, and tell the down-thread to sleep hz/10 to get other parts of the system a chance to free up some memory, in particular the up-path in GEOM. All caches should probably start to monitor malloc(9) failures using the new malloc_last_fail() function, and release when it indicates congestion. Sponsored by: DARPA & NAI Labs.
* Make this compile in the userland shims again.phk2002-11-011-0/+1
| | | | Sponsored by: DARPA & NAI Labs
* Add KASSERT for bio_cmd validity here as well. Various hacks stillphk2002-11-011-0/+4
| | | | bypass specfs.
* Spruce up bootverbose output a bit.phk2002-10-311-17/+8
| | | | Allow extended partitions to have flag=0x80
* Change the kkey generation cherry-picker to use MD5.phk2002-10-303-42/+26
| | | | Sponsored by: DARPA & NAI Labs
* Add the remaning part of the new libdisk interaction.phk2002-10-285-2/+79
| | | | | | | WARNING: This is not a published interface, it is a stopgap measure for WARNING: libdisk so we can get 5.0-R out of the door. Sponsored by: DARPA & NAI Labs
* Add support for the new libdisk interaction.phk2002-10-281-2/+15
| | | | 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.
* Add more compatibility junk.phk2002-10-282-11/+34
|
* Don't truncate on large disks.phk2002-10-271-1/+6
|
* Make geom_mbr.c optional on PC98, use GEOM_MBR option to include it.phk2002-10-261-0/+6
| | | | | Disable check for supposedly magic "IPL1" string for PC98 labels, its thaumaturgical power is in doubt.
* Reduce the GEOM verbosity under bootverbose to something more sufferable.phk2002-10-255-11/+26
| | | | | | | This is not quite the set of information I would want, but the tree where I have the "correct" version is messed up with conflicts. Sponsored by: DARPA & NAI Labs.
* Add a g_dev_print() function which prints all the /dev entries GEOMphk2002-10-252-0/+17
| | | | know about.
* Loose the g_dev_clone() noise.phk2002-10-251-1/+0
|
* Use a better test to prevent tasting geom.ctl so we don't screw thephk2002-10-241-1/+1
| | | | regression tests.
* Don't taste the first provider, it's /dev/geom.ctl and it's not goingphk2002-10-241-1/+2
| | | | to taste like anything we like anyway.
* No need to specify CTLTYPE_INT when we use SYSCTL_INT.phk2002-10-201-7/+7
|
* Now that the sectorsize and mediasize are properties of the provider,phk2002-10-2011-87/+38
| | | | | | | | | | | 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.
* The g_id*() functions are not needed in the userland test-suite sophk2002-10-201-0/+2
| | | | | | #ifdef _KERNEL them rather than deal with a copyin simulation. Sponsored by: DARPA & NAI Labs
* Make the sectorsize a property of providers so we can include it in the XMLphk2002-10-2011-7/+24
| | | | | | output. Sponsored by: DARPA & NAI Labs
* Use %jd instead of %lld now that we have it.phk2002-10-205-19/+26
|
* It makes more sense for the fwheads and fwsectors properties to be inphk2002-10-201-1/+1
| | | | the provider stanza rather than the geom stanza.
* Include fwsectors and gfwheads in the XML output for the disks we know.phk2002-10-201-0/+15
| | | | 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.
* Don't track bio allocation in debug output.phk2002-10-201-5/+7
| | | | Sponsored by: DARPA & NAI Labs.
* Style(9) and english(9) fixes.phk2002-10-201-55/+54
| | | | Submitted by: schweikh
* Make it possible to specify also via geom_t ID in the geom.ctl config ioctl.phk2002-10-202-7/+11
| | | | 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