summaryrefslogtreecommitdiffstats
path: root/sbin/geom/class
Commit message (Collapse)AuthorAgeFilesLines
* MFC r314655:ngie2017-05-3017-20/+20
| | | | | | bin: normalize paths using SRCTOP-relative paths or :H when possible This simplifies make logic/output
* MFC r309321:mav2017-05-232-1/+24
| | | | | | | | | | Add `gmirror create` subcommand, alike to gstripe, gconcat, etc. It is quite specific mode of operation without storing on-disk metadata. It can be useful in some cases in combination with some external control tools handling mirror creation and disks hot-plug. Sponsored by: iXsystems, Inc.
* MFC r315112, r315196araujo2017-05-172-1/+37
| | | | | | | | | | | | | | | | | | | | | r315112: Add the capability to refresh the gpart(8) label without need a reboot. gpart(8) has functionality to change the label of an GPT partition. This functionality works like it should, however, after a label change the /dev/gpt/ entries remain unchanged. glabel(8) status output remains unchanged. The change only takes effect after a reboot. PR: 162690 Submitted by: sub.mesa@gmail, Ben RUBSON <ben.rubson@gmail.com>, ae Reviewed by: allanjude, bapt, bcr Differential Revision: https://reviews.freebsd.org/D9935 r315196: After r315112 I broke the tests with eli, instead to pass 0, I should pass M_NOWAIT to g_media_changed() that will call g_post_event() with this flag. Reported by: lwhsu, ngie and ae
* MFC r317246: Always allow setting number of iterations for the first time.mav2017-05-061-1/+3
| | | | | | | | | | Before this change it was impossible to set number of PKCS#5v2 iterations, required to set passphrase, if it has two keys and never had any passphrase. Due to present metadata format limitations there are still cases when number of iterations can not be changed, but now it works in cases when it can. PR: 218512 Sponsored by: iXsystems, Inc.
* MFC r316530, r316535asomers2017-04-261-2/+3
| | | | | | | | | | | | | | | | | | | | | r316530: Fix clearing geom metadata if DIOCGSECTORSIZE fails An unhandled error case would result in passing SIZE_MAX to malloc. While I'm here, remove an unnecessary NULL check before free Reported by: Coverity CID: 1017793 Sponsored by: Spectra Logic Corp r316535: Fix memory leak in "gpart bootcode" Also, annotate that gpart_issue never returns Reported by: Coverity CID: 1007105 Sponsored by: Spectra Logic Corp
* MFH (r303289): update example sectiondes2016-08-051-36/+63
| | | | | PR: 211361 Approved by: re (gjb)
* sbin: ake use of our rounddown() macro when sys/param.h is available.pfg2016-05-011-1/+1
| | | | No functional change.
* MFHgjb2016-04-113-19/+67
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * Fix the problem, when gpart(8) can't write both bootcode and partcodeae2016-04-111-8/+12
| | | | | | | | | | | | | | | | | | in one command due to wrong file size limit. Do not use bootcode size to calculate partsize limit. Also add report message about successful partcode writing. Reported by: Trond Endrestøl MFC after: 2 weeks
| * Create the GELIBOOT GEOM_ELI flagallanjude2016-04-082-11/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | This flag indicates that the user wishes to use the GELIBOOT feature to boot from a fully encrypted root file system. Currently, GELIBOOT does not support key files, and in the future when it does, they will be loaded differently. Due to the design of GELI, and the desire for secrecy, the GELI metadata does not know if key files are used or not, it just adds the key material (if any) to the HMAC before the optional passphrase, so there is no way to tell if a GELI partition requires key files or not. Since the GELIBOOT code in boot2 and the loader does not support keys, they will now only attempt to attach if this flag is set. This will stop GELIBOOT from prompting for passwords to GELIs that it cannot decrypt, disrupting the boot process PR: 208251 Reviewed by: ed, oshogbo, wblock Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D5867
* | Explicitly add more files to the 'runtime' package.gjb2016-02-0916-0/+16
|/ | | | Sponsored by: The FreeBSD Foundation
* Make additional parts of sys/geom/eli more usable in userspaceallanjude2016-01-071-0/+1
| | | | | | | | | | | | | | | | | | The upcoming GELI support in the loader reuses parts of this code Some ifdefs are added, and some code is moved outside of existing ifdefs The HMAC parts of GELI are broken out into their own file, to separate them from the kernel crypto/openssl dependant parts that are replaced in the boot code. Passed the GELI regression suite (tools/regression/geom/eli) Files=20 Tests=14996 Result: PASS Reviewed by: pjd, delphij MFC after: 1 week Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4699
* Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.callanjude2015-12-271-1/+2
| | | | | | | | | | | | | | | | | | 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
* Remove a note about damaged PMBR. Now GPT will be detected automaticallyae2015-12-101-11/+1
| | | | | | with such corruption. MFC after: 1 month
* Don't leak rsector/sector in mp_label(..)ngie2015-12-101-5/+6
| | | | | | | | | | Use calloc instead of malloc + memset(.., 0, ..) when allocating sector Differential Revision: https://reviews.freebsd.org/D4450 MFC after: 1 week Reported by: cppcheck Reviewed by: mav Sponsored by: EMC / Isilon Storage Division
* Remove compatibility shims for legacy ATA device names.mav2015-10-111-3/+0
| | | | | We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely removed old stack at 10.x, so at 11.x it is time to remove compat shims.
* Make geom_nop(4) collect statistics on all types of BIOs, not justtrasz2015-10-101-4/+5
| | | | | | | | | | reads and writes. PR: kern/198405 Submitted by: Matthew D. Fuller <fullermd at over-yonder dot net> MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3679
* Add a way to specify stripesize and stripeoffset to gnop(8). This makestrasz2015-09-152-3/+11
| | | | | | | | | it possible to "simulate" 4K media, to eg test alignment handling. Reviewed by: mav@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3664
* Enable BIO_DELETE passthru in GELI, so TRIM/UNMAP can work as expected whenpjd2015-08-082-15/+82
| | | | | | | | | | | | | | | | | | | GELI is used on a SSD or inside virtual machine, so that guest can tell host that it is no longer using some of the storage. Enabling BIO_DELETE passthru comes with a small security consequence - an attacker can tell how much space is being really used on encrypted device and has less data no analyse then. This is why the -T option can be given to the init subcommand to turn off this behaviour and -t/T options for the configure subcommand can be used to adjust this setting later. PR: 198863 Submitted by: Matthew D. Fuller fullermd at over-yonder dot net This commit also includes a fix from Fabian Keil freebsd-listen at fabiankeil.de for 'configure' on onetime providers which is not strictly related, but is entangled in the same code, so would cause conflicts if separated out.
* lseek() allows an offset to be set beyond the end of file. Usingae2015-07-211-7/+4
| | | | | | | | it to check that partition has enough space to write bootcode doesn't work. Use the known size of provider instead. PR: 201504 MFC after: 1 week
* Fix contraction spotted by igor(1) and remove 2 .Ed spotted by mandoc(1).araujo2015-07-181-7/+5
| | | | | | | | | Also, don't capitalize "module" and remove a redundant phrase introduced in my previous commit. Differential Revision: D3112 Reviewed by: wblock Sponsored by: gandi.net
* Describe how to load gmultipath at boot time.araujo2015-07-171-1/+11
| | | | | | Differential Revision: D3112 Reviewed by: allanjude, bapt Sponsored by: gandi.net
* Add a new option to gpart(8) to fix Lenovo BIOS boot issueallanjude2015-07-151-1/+7
| | | | | | | | | | PR: 184910 Reviewed by: ae, wblock Approved by: marcel MFC after: 3 days Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3065
* Allow to omit keyfile number for the first keyfile.pjd2015-07-021-1/+8
|
* Revert r284417 it is not necessary anymorebapt2015-06-151-1/+1
|
* Enforce overwritting SHLIBDIRbapt2015-06-151-1/+1
| | | | | | | | | Since METAMODE has been added, sys.mk loads bsd.mkopt.mk which ends load loading bsd.own.mk which then defines SHLIBDIR before all the Makefile.inc everywhere. This makes /lib being populated again. Reported by: many
* Add META_MODE support.sjg2015-06-1316-0/+328
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-0816-32/+0
| |
| * Merge sync of headsjg2015-05-2711-27/+41
| |\
| * \ Merge from head@274682sjg2014-11-192-12/+31
| |\ \
| * \ \ Merge head from 7/28sjg2014-08-1917-44/+287
| |\ \ \
| * | | | Updated dependenciessjg2014-05-1616-15/+1
| | | | |
| * | | | Updated dependenciessjg2014-05-1015-0/+30
| | | | |
| * | | | Merge from headsjg2014-05-081-1/+1
| |\ \ \ \
| * \ \ \ \ Merge headsjg2014-04-285-11/+209
| |\ \ \ \ \
| * \ \ \ \ \ Merge head@256284sjg2013-10-133-13/+13
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge from headsjg2013-09-056-77/+45
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ sync from headsjg2013-04-127-66/+27
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Updated dependenciessjg2013-03-1116-0/+32
| | | | | | | | | |
| * | | | | | | | | Updated dependenciessjg2013-02-1616-32/+0
| | | | | | | | | |
| * | | | | | | | | Sync with HEAD.obrien2013-02-085-27/+51
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | Updated/new Makefile.dependsjg2012-11-0816-0/+53
| | | | | | | | | | |
| | | | | | | | | | |
| | \ \ \ \ \ \ \ \ \
| | \ \ \ \ \ \ \ \ \
| | \ \ \ \ \ \ \ \ \
| *---. \ \ \ \ \ \ \ \ \ Sync from headsjg2012-11-047-87/+212
| |\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-2216-0/+275
| | |_|/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | | | | | | | | Add a missing word, should have been in r284290.brueffer2015-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Fabian Keil
* | | | | | | | | | | | | Improve grammar.brueffer2015-06-111-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 200673 Submitted by: Fabian Keil Obtained from: ElectroBSD
* | | | | | | | | | | | | Consistently use trailing whitespace in passphrase prompts.brueffer2015-06-111-1/+1
| |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 193496 Submitted by: Fabian Keil MFC after: 1 week
* | | | | | | | | | | | Fix error in gmountver(8) man pageallanjude2015-05-182-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fixes the usage statement for the binary to use the correct terms (provider and geom name, rather than dev and prov, which is incorrect in the latter case) Sync the man page summary with the new usage statement PR: 199540 Differential Revision: https://reviews.freebsd.org/D2329 Submitted by: Fabian Keil Reviewed by: trasz Approved by: eadler (mentor) Obtained from: ElectroBSD (original) MFC after: 1 week Sponsored by: ScaleEngine Inc.
* | | | | | | | | | | | Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme.ae2015-05-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort DOSPTYP_* entries in diskmbr.h by value. Document these scheme-specific types in gpart(8). MFC after: 1 week
* | | | | | | | | | | | Make GEOM_PART work in presence of previous withered self.mav2015-03-261-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Sponsored by: iXsystems, Inc.
OpenPOWER on IntegriCloud