summaryrefslogtreecommitdiff
path: root/sys/dev/softraidvar.h
AgeCommit message (Collapse)Author
2009-12-31Add support for key disks. This allows a crypto volume to be constructedJoel Sing
without using a passphrase - instead the encryption mask key is stored on the specified key disk partition (ideally being one on a removable device). This also enables automatic assembly of crypto volumes at boot time. ok marco@
2009-12-15Factor out discipline specific create/assemble code.Joel Sing
"in, in, in!" marco@
2009-12-07Cleanup discipline initialisation.Joel Sing
ok marco@
2009-12-07Define discipline capabilities using a set of flags.Joel Sing
"shiny!!" marco@
2009-11-24Allow the passphrase to be changed on softraid crypto volumes. Ensure thatJoel Sing
you backup your data and lock up your pets prior to using this. Tested by todd@ ok marco@
2009-11-23Improve discipline specific ioctl framework and attach to softraid ioctl.Joel Sing
ok marco@
2009-11-22Add a framework for discipline specific ioctls.Joel Sing
ok marco@
2009-08-09Switch softraid to vnodes to prevent bad things from happening when usingMarco Peereboom
d_open/d_close. tested by many, ok jsing, thib, krw
2009-07-23Adding disabled framework for RAID6Jordan Hargrave
ok marco@
2009-07-12Add support for global hotspares to softraid.Joel Sing
ok marco@
2009-06-26Overhaul sr_boot_assembly(). The original code had a number of problems,Joel Sing
including a "chunk id already in use" bug that occurred when assembling more than one volume at boot. Volumes are now kept in order, as are the chunks which they are assembled from. Duplicated chunk IDs are now handled appropriately, with the chunk that has the most recent ondisk metadata being used. Also tested by nicm@ who got bitten by the "chunk id already in use" bug. ok marco@
2009-06-24Abort the current rebuild if the rebuild chunk disappears. Whilst here alsoJoel Sing
rename the abort flag so that it is more generalised. ok marco@
2009-06-17Make openings variable instead of maxwu; needed for more exotic raid sets.Marco Peereboom
ok jordan
2009-06-17Remove __packed from memory structure. No idea what in the wolrd I wasMarco Peereboom
smoking but it sure as heck wasn't good. Issue found by jsing on sparc64; tested by jsing and me on various arches. ok deraadt jsing
2009-06-12Add flag for freeing ccb buffer on I/O completionJordan Hargrave
Needed for RAID4/RAID5 xor buffers ok marco@
2009-06-11Create a hotplug callback mechanism.Marco Peereboom
2009-06-10Add framework for raid 4 & 5 so that we can work in tree.Marco Peereboom
2009-06-03Slay the running out of wu during rebuild dragon and some cleanupMarco Peereboom
2009-06-02Make rebuilds restartable over reboots.Marco Peereboom
Abort rebuild and drain IO when shutting down.
2009-06-02Add an identifier that tells us if we can rebuild this discipline.Marco Peereboom
KNF & spelling too
2009-06-02First bits for rebuild. Disabled for now.Marco Peereboom
2009-05-11Move the discipline initialisation code into discipline specific functions,Joel Sing
rather than initialising everything in softraid.c. This makes a discipline more self-contained and reduces the number of function declarations needed in softraidvar.h. ok marco@
2008-12-24This creates the notion of a non-disk softraid device. The aoe targetMarco Peereboom
is such a beast because it doesn't physically add a device to the OS but exports a RAID partition. It creates a kernel thread for each exported aoe target. Since it reuses all the goodies in softraid upon reboot the metadata is discovered and therefore the partition is exported at boot time. ok tedu dlg
2008-11-25Add generic sr_scsi_done function that does the spl danceMarco Peereboom
2008-11-23softraid support for ata over ethernet (aoe). this includes a client andTed Unangst
part of a server. there's no configuration yet, and several other drawbacks, but it can be hammered into shape. i haven't moved the code forward in a year, and marco wants it in the tree to hack on.
2008-07-29Add rebuild mark so that we can restart a rebuild upon clean shutdown.Marco Peereboom
Fix a typo while here. The rebuild field was appended to the metadata so that we can automatically update from v2 to v3. The only visible difference will be that in the dmesg the SCSI version number will go from 002 to 003. ok deraad.
2008-07-20fill in variant and version components of the UUIDDamien Miller
pretty-print the UUID in RFC4122 form
2008-07-19Full rewrite of metadata handling. This fixes power failures and crashesMarco Peereboom
that caused illegal checksums. The new metadata code is more or less ready to deal with other vendor's metadata formats. While here clean up the name space. Fix thib's pool mess by adding removing bad flags in interrupt context. tested on macppc, amd64, i386, sparc64 & hppa sparc64 has issues with crypto however those do not seem to be softraid specific. help from okan@ ckuethe@ Will Backman and others
2008-06-25use pools for the uio and iovec allocations in sr_crypto_getcryptop()Thordur I. Bjornsson
instead of malloc; OK hshoexer@ and macro@
2008-06-14Use multiple crypto keys per volume. Each key is used to encrypt atDamien Miller
most 0.5TB of disk. This is well below P1619-2007's recommendation for AES-XTS of 1TB/key, but small enough so we can test that we actually use multiple keys with inexpensive hardware. We allocate 32 keys, so this will do for volumes up to 16TB. Fix a crypto session leak in sr_crypto_free_resources() much debugging help mshoexer@; ok hshoexer@ marco@
2008-06-14remove duplicate #defines; ok hshoexer@Damien Miller
2008-06-14implement a check code to determine whether the disk keys haveDamien Miller
been correctly decrypted using the masking key. The check code is a HMAC-SHA1 over the disk keys using a hash of the masking key. It should be slow enough to provide no useful brute force success oracle and should not leak significant data about the masking key or disk keys. ok hshoexer@ marco@
2008-06-13make the disk key masking algorithm a parameter and add some extraDamien Miller
reserved space in case we ever want to support a different scheme ok hshoexer@ marco@
2008-06-13Implement pbkdf2 in in bioctl to derive master key from a passphrase.Hans-Joerg Hoexer
ok marco djm
2008-06-13rearrange on-disk structures to the top of the file, wrap kernel-onlyDamien Miller
parts in #ifdef _KERNEL; makes softraidvar.h usable from userland ok hshoexer@
2008-06-12wrap definitions for softraid crypto "ifdef CRYPTO". Suggested by djmHans-Joerg Hoexer
2008-06-12Get mask keying for on-disk keys from user space and keep a "hint" for keyHans-Joerg Hoexer
generation used by user space in the meta data. Actually use the masking key for encryption and decryption of on-disk key at run time. ok djm marco
2008-06-12Add delete volume functionality.Marco Peereboom
discussed with krw, kettenis & drahn ok hshoexer
2008-06-11Move first pieces of crypto softraid into the tree. Still totallyHans-Joerg Hoexer
disabled, of course, and still work in progress. help by djm@, ok marco@
2008-02-22Propper encryption of on-disk-keys, prodded/suggest by tedu@ and djm@Hans-Joerg Hoexer
also use aes to generate proppper IVs ok marco@
2008-02-17Add "in blocks" to disk size discriptors so that I don't have to readMarco Peereboom
code single time I look at it.
2008-02-17Add propper key encryption.Hans-Joerg Hoexer
ok marco@
2008-02-15Add myself to the copyrights, ok marco@Chris Kuethe
2008-02-14Actually implement the crypto.Chris Kuethe
ok tedu@ marco@
2008-02-07Add optional metadata memebers.Marco Peereboom
Randomize Crypto password and add salt array. Add mock key encryption functions.
2008-02-05Shave off a few more bytes by moving IO collision detection into a genericMarco Peereboom
fucntion. Fix bug in the crypto code that could casuse data corruption as a bonus, bad cut & past tedu!
2008-02-05Create a generic function to validate IO instead of copying and pastingMarco Peereboom
same code in all disciplines. This shaves of a few bytes. crypto 3185 -> 2690 raid 0 2843 -> 2378 raid 1 3474 -> 2689
2008-02-03There is no such thing as RAIDCRYPTO so rename to CRYPTOMarco Peereboom
2008-01-29Improve performance dramatically by preventing severeal context switches.Marco Peereboom
Decrypt only once on entry or exit instead of on in and out regardless of direction. There is still room for improvement but this is the first stab. Tested by many ok tedu
2008-01-26Remove duplicate protosMarco Peereboom