aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/bde/g_bde.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove GBDE source filesPoul-Henning Kamp2024-05-071-296/+0
|
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* GEOM: Remove redundant NULL pointer check before g_free()Zhenlei Huang2022-12-281-2/+1
| | | | | | Reviewed by: melifaro, pjd, imp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D37779
* Make g_attach() return ENXIO for orphaned providers; update variousEdward Tomasz Napierala2020-10-181-1/+7
| | | | | | | | | | | | | classes to add missing error checking. Reviewed by: imp MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26658 Notes: svn path=/head/; revision=366811
* geom: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-2/+0
| | | | Notes: svn path=/head/; revision=365226
* Use explicit_bzero() instead of bzero() for sensitive data.John Baldwin2020-06-251-5/+5
| | | | | | | | | Reviewed by: delphij Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25441 Notes: svn path=/head/; revision=362629
* Annotate geom modules with MODULE_VERSIONKyle Evans2018-04-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | GEOM ELI may double ask the password during boot. Once at loader time, and once at init time. This happens due a module loading bug. By default GEOM ELI caches the password in the kernel, but without the MODULE_VERSION annotation, the kernel loads over the kernel module, even if the GEOM ELI was compiled into the kernel. In this case, the newly loaded module purges/invalidates/overwrites the GEOM ELI's password cache, which causes the double asking. MFC Note: There's a pc98 component to the original submission that is omitted here due to pc98 removal in head. This part will need to be revived upon MFC. Reviewed by: imp Submitted by: op Obtained from: opBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14992 Notes: svn path=/head/; revision=332387
* sys/geom: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326270
* Use g_wither_provider() where applicable.Alexander Motin2016-09-231-1/+1
| | | | | | | | It is just a helper function combining G_PF_WITHER setting with g_orphan_provider(). Notes: svn path=/head/; revision=306279
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.cAllan Jude2015-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | cperciva's libmd implementation is 5-30% faster The same was done for SHA256 previously in r263218 cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation Extend sbin/md5 to create sha384(1) Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h} Reviewed by: cperciva, des, delphij Approved by: secteam, bapt (mentor) MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3929 Notes: svn path=/head/; revision=292782
* Translate the errno to gctl_error() texts.Poul-Henning Kamp2014-11-091-0/+17
| | | | | | | Spotted by: mwlucas Notes: svn path=/head/; revision=274313
* - Don't pass geom and provider names as format strings.Jaakko Heinonen2012-11-201-1/+1
| | | | | | | | | | - Add __printflike() attributes. - Remove an extra argument for the g_new_geomf() call in swapongeom_ev(). Reviewed by: pjd Notes: svn path=/head/; revision=243333
* Remove unneeded G_PF_CANDELETE flag.Ed Schouten2012-08-281-8/+0
| | | | | | | | This flag is only used by GEOM so it can be propagated to the character device's SI_CANDELETE. Unfortunately, SI_CANDELETE seems to do nothing. Notes: svn path=/head/; revision=239790
* Fix orphan() methods of several GEOM classes to not assume that thereEdward Tomasz Napierala2012-07-071-5/+1
| | | | | | | | | | | | is an error set on the provider. With GEOM resizing, class can become orphaned when it doesn't implement resize() method and the provider size decreases. Reviewed by: mav Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=238198
* Add some FEATURE macros for various GEOM classes.Alexander Leidinger2011-02-251-0/+3
| | | | | | | | | | | | | | No FreeBSD version bump, the userland application to query the features will be committed last and can serve as an indication of the availablility if needed. Sponsored by: Google Summer of Code 2010 Submitted by: kibab Reviewed by: silence on geom@ during 2 weeks X-MFC after: to be determined in last commit with code from this project Notes: svn path=/head/; revision=219029
* Rename the kthread_xxx (e.g. kthread_create()) callsJulian Elischer2007-10-201-1/+1
| | | | | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls. Notes: svn path=/head/; revision=172836
* stop including rijndael-api-fst.h from rijndael.h.Hajimu UMEMOTO2005-03-111-1/+1
| | | | | | | this is required to integrate opencrypto into crypto. Notes: svn path=/head/; revision=143418
* Tag all geom classes in the tree with a version number.Poul-Henning Kamp2004-08-081-0/+1
| | | | Notes: svn path=/head/; revision=133318
* Use default method initialization on geoms.Poul-Henning Kamp2004-08-081-4/+4
| | | | Notes: svn path=/head/; revision=133314
* Do not check error code from closing ->access() calls, we know they succeed.Poul-Henning Kamp2004-02-141-3/+1
| | | | Notes: svn path=/head/; revision=125803
* Remove the absolute count g_access_abs() function since experience hasPoul-Henning Kamp2004-02-121-4/+4
| | | | | | | | | | | | | | | shown that it is not useful. Rename the relative count g_access_rel() function to g_access(), only the name has changed. Change all g_access_rel() calls in our CVS tree to call g_access() instead. Add an #ifndef BURN_BRIDGES #define of g_access_rel() for source code compatibility. Notes: svn path=/head/; revision=125755
* Add a missing error case return.Poul-Henning Kamp2004-02-081-0/+1
| | | | | | | Problem reported by: Flemming Jacobsen <fj@batmule.dk> Notes: svn path=/head/; revision=125590
* We don't need to hold Giant to create the worker kthread.Poul-Henning Kamp2004-02-071-2/+0
| | | | Notes: svn path=/head/; revision=125579
* Simplify the GEOM OAM api: Drop the request type, and let everythingPoul-Henning Kamp2003-06-011-28/+30
| | | | | | | | | | | hinge on the "verb" parameter which the class gets to interpret as it sees fit. Move the entire request into the kernel and move changed parameters back when done. Notes: svn path=/head/; revision=115624
* Remove unused variable.Poul-Henning Kamp2003-05-311-6/+0
| | | | | | | Found by: FlexeLint Notes: svn path=/head/; revision=115507
* Remove the G_CLASS_INITIALIZER, we do not need it anymore.Poul-Henning Kamp2003-05-311-1/+0
| | | | Notes: svn path=/head/; revision=115468
* Re-order the the initialization slightly to improve structure.Poul-Henning Kamp2003-05-051-22/+22
| | | | Notes: svn path=/head/; revision=114720
* Appearantly UFS no longer issues BIO_DELETE requests correctly, andPoul-Henning Kamp2003-04-261-0/+7
| | | | | | | consequently trashes data. Disable BIO_DELETE handling in gbde for now. Notes: svn path=/head/; revision=114087
* Remove all references to BIO_SETATTR. We will not be using it.Poul-Henning Kamp2003-04-031-1/+0
| | | | Notes: svn path=/head/; revision=113032
* Remove the old config interface now that the new OAM is functional.Poul-Henning Kamp2003-04-011-153/+0
| | | | Notes: svn path=/head/; revision=112926
* Add create_geom and destroy_geom methods.Poul-Henning Kamp2003-03-291-0/+159
| | | | Notes: svn path=/head/; revision=112828
* Premptively change initializations of struct g_class to use C99Poul-Henning Kamp2003-03-241-3/+2
| | | | | | | | sparse struct initializations before we extend the struct with new OAM related member functions. Notes: svn path=/head/; revision=112552
* Including <sys/stdint.h> is (almost?) universally only to be able to usePoul-Henning Kamp2003-03-181-1/+0
| | | | | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble. Notes: svn path=/head/; revision=112367
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Typo in last commit.Poul-Henning Kamp2003-02-111-2/+2
| | | | Notes: svn path=/head/; revision=110712
* Better names for struct disk elements: d_maxsize, d_stripeoffsetPoul-Henning Kamp2003-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. Notes: svn path=/head/; revision=110710
* Unconditionally make our provider with G_PF_CANDELETE.Poul-Henning Kamp2003-02-111-0/+1
| | | | Notes: svn path=/head/; revision=110697
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Fix spelling in comment.Poul-Henning Kamp2002-12-131-1/+1
| | | | Notes: svn path=/head/; revision=107831
* Straighten up the geom.ctl config interface definitions.Poul-Henning Kamp2002-11-061-5/+5
| | | | | | | Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=106518
* Run a revision on the GBDE encryption facility.Poul-Henning Kamp2002-11-041-7/+9
| | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=106407
* Now that the sectorsize and mediasize are properties of the provider,Poul-Henning Kamp2002-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. Notes: svn path=/head/; revision=105551
* Make the sectorsize a property of providers so we can include it in the XMLPoul-Henning Kamp2002-10-201-0/+1
| | | | | | | | | output. Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=105542
* Fix a missing initialization.Poul-Henning Kamp2002-10-191-0/+1
| | | | Notes: svn path=/head/; revision=105465
* Add Geom Based Disk Encryption to the tree.Poul-Henning Kamp2002-10-191-0/+282
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. Notes: svn path=/head/; revision=105464