aboutsummaryrefslogtreecommitdiff
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Fix dhclient heap overflow.Gordon Tetlow2020-09-021-0/+2
| | | | | | | | | Approved by: so Security: FreeBSD-SA-20:26.dhclient Security: CVE-2020-7461 Notes: svn path=/releng/12.1/; revision=365257
* MFS r352872: MFC r351802:Xin LI2019-09-301-9/+13
| | | | | | | | | | Correct overflow logic in fullpath(). Obtained from: OpenBSD Approved by: re (gjb) Notes: svn path=/releng/12.1/; revision=352902
* MFS r352750:Mark Johnston2019-09-261-6/+6
| | | | | | | | | ping6: Use caph_rights_limit(3) for STDIN_FILENO Approved by: re (gjb) Notes: svn path=/releng/12.1/; revision=352765
* MFC r351318, r351330, r351393, r351398, r351440, r351461, r351548, r352226, ↵Alan Somers2019-09-167-107/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r352229 r351318: ping: Add tests of the Internet checksum function Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21340 r351330: ping: do reverse DNS lookup of the target address When printing replies, ping will now attempt a reverse DNS lookup of the target. That can be suppressed by using the "-n" option. Curiously, ping has always done reverse lookups in certain error paths, but never in the success path. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21351 r351393: ping: add a basic functional test Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21289 r351398: ping: By default, don't reverse lookup IP addresses ping's default is now not to attempt reverse DNS lookups. The -H flag will enable them. This change is not quite a reversion of r351330. That change made the happy path and error path do reverse lookups consistently; this change changes the default for both paths. Submitted by: Ján Sučan <sucanjan@gmail.com> Discussed with: cem MFC-With: 351330 Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21364 r351440: ping: Fix alignment errors This fixes -Wcast-align errors when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21327 r351461: ping: fix unaligned access to ancillary data Use CMSG_FIRSTHDR rather than assume that an array is correctly aligned. Fixes warnings on sparc64 and powerpcspe. Submitted by: Ján Sučan <sucanjan@gmail.com> MFH: 2 weeks Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21406 r351548: ping: raise WARNS level to 6 Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21405 r352226: ping: fix a string in an error message r352229: ping: Verify whether a datagram timestamp was actually received. ping(8) uses SO_TIMESTAMP, which attaches a timestamp to each IP datagram at the time it's received by the kernel. Except that occasionally it doesn't. Add a check to see whether such a timestamp was actually set before trying to read it. This fixes segfaults that can happen when the kernel doesn't attach a timestamp. The bug has always existed, but prior to r351461 it manifested as an implausible round-trip-time, not a segfault. Reported by: pho MFC-With: 351461 Notes: svn path=/stable/12/; revision=352371
* MFC 351064Doug Moore2019-09-152-3/+14
| | | | | | | | | | Don't let swapon trimming wipe the bsd label. Reviewed by: alc Approved by: markj (mentor, implicit) Notes: svn path=/stable/12/; revision=352365
* MFC r352258: Remove Tagged Command Queuing feature reporting.Alexander Motin2019-09-151-10/+0
| | | | | | | | I never saw those devices myself, FreeBSD never supported them, and it is officially obsolete since ACS-2 specification. Notes: svn path=/stable/12/; revision=352359
* MFC r350994, r350998, r351030, r351033, r351171, r351223, r351226, r351424Alan Somers2019-09-154-109/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r350994: ping: fix data type of a variable for a packet sequence number Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21244 r350998: ping: use the monotonic clock to measure durations Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21245 r351030: ping: fix triptime calculation after r350998 That revision changed the internal clock to the monotonic, but neglected to change the datagram's timestamp source. Reported by: Oliver Hartmann, Michael Butler Reviewed by: Ján Sučan <sucanjan@gmail.com>, allanjude MFC-With: r350998 Differential Revision: https://reviews.freebsd.org/D21258 r351033: ping: Make in_cksum() operate on u_char buffer This fixes -Wcast-align errors for in_cksum() calls when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21261 r351171: ping: Move in_cksum() to a separate source file This is a preparation step for adding ATF tests of in_cksum(), which has been modified to operate on unaligned data. ping.o cannot be linked to the test executable because both of them contain 'main' symbol. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21288 r351223: ping: fix -Wformat-truncating warning with GCC Increase buffer size for the string representation of n_time ICMP timestamp is a 32-bit number. In pr_ntime(), number of minutes and seconds is always 2 characters wide. Max. number of hours is 4 characters wide. The buffer size should be at least: 4 + 2 + 2 + 1 (':') + 1 (':') + 1 ('\0') = 11 Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21325 r351226: Fix uninitialized variable warnings when MK_CASPER=no Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21322 r351424: ping: fix include guard symbol name to reflect the header file name Submitted by: Ján Sučan <sucanjan@gmail.com> MFC-With: 351171 Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21374 Notes: svn path=/stable/12/; revision=352357
* MFC the new fusefs driverAlan Somers2019-09-152-55/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r350665, r350990, r350992, r351039, r351042, r351061, r351066, r351113, r351560, r351961, r351963, r352021, r352025, r352230 r350665: fusefs: merge from projects/fuse2 This commit imports the new fusefs driver. It raises the protocol level from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and adds many new features. New features include: * Optional kernel-side permissions checks (-o default_permissions) * Implement VOP_MKNOD, VOP_BMAP, and VOP_ADVLOCK * Allow interrupting FUSE operations * Support named pipes and unix-domain sockets in fusefs file systems * Forward UTIME_NOW during utimensat(2) to the daemon * kqueue support for /dev/fuse * Allow updating mounts with "mount -u" * Allow exporting fusefs file systems over NFS * Server-initiated invalidation of the name cache or data cache * Respect RLIMIT_FSIZE * Try to support servers as old as protocol 7.4 Performance enhancements include: * Implement FUSE's FOPEN_KEEP_CACHE and FUSE_ASYNC_READ flags * Cache file attributes * Cache lookup entries, both positive and negative * Server-selectable cache modes: writethrough, writeback, or uncached * Write clustering * Readahead * Use counter(9) for statistical reporting PR: 199934 216391 233783 234581 235773 235774 235775 PR: 236226 236231 236236 236291 236329 236381 236405 PR: 236327 236466 236472 236473 236474 236530 236557 PR: 236560 236844 237052 237181 237588 238565 Reviewed by: bcr (man pages) Reviewed by: cem, ngie, rpokala, glebius, kib, bde, emaste (post-commit review on project branch) Relnotes: yes Sponsored by: The FreeBSD Foundation Pull Request: https://reviews.freebsd.org/D21110 r350990: fusefs: add SVN Keywords to the test files Reported by: SVN pre-commit hooks MFC-With: r350665 Sponsored by: The FreeBSD Foundation r350992: fusefs: skip some tests when unsafe aio is disabled MFC-With: r350665 Sponsored by: The FreeBSD Foundation r351039: fusefs: fix intermittency in the default_permissions.Unlink.ok test The test needs to expect a FUSE_FORGET operation. Most of the time the test would pass anyway, because by chance FUSE_FORGET would arrive after the unmount. MFC-With: 350665 Sponsored by: The FreeBSD Foundation r351042: fusefs: Fix the size of fuse_getattr_in In FUSE protocol 7.9, the size of the FUSE_GETATTR request has increased. However, the fusefs driver is currently not sending the additional fields. In our implementation, the additional fields are always zero, so I there haven't been any test failures until now. But fusefs-lkl requires the request's length to be correct. Fix this bug, and also enhance the test suite to catch similar bugs. PR: 239830 MFC-With: 350665 Sponsored by: The FreeBSD Foundation r351061: fusefs: fix the 32-bit build after 351042 Reported by: jhb MFC-With: 351042 Sponsored by: The FreeBSD Foundation r351066: fusefs: fix conditional from r351061 The entirety of r351061 was a copy/paste error. I'm sorry I've been comitting so hastily. Reported by: rpokala Reviewed by: rpokala MFC-With: 351061 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21265 r351113: fusefs: don't send the namespace during listextattr The FUSE_LISTXATTR operation always returns the full list of a file's extended attributes, in all namespaces. There's no way to filter the list server-side. However, currently FreeBSD's fusefs driver sends a namespace string with the FUSE_LISTXATTR request. That behavior was probably copied from fuse_vnop_getextattr, which has an attribute name argument. It's been there ever since extended attribute support was added in r324620. This commit removes it. Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21280 r351560: fusefs: Fix some bugs regarding the size of the LISTXATTR list * A small error in r338152 let to the returned size always being exactly eight bytes too large. * The FUSE_LISTXATTR operation works like Linux's listxattr(2): if the caller does not provide enough space, then the server should return ERANGE rather than return a truncated list. That's true even though in FUSE's case the kernel doesn't provide space to the client at all; it simply requests a maximum size for the list. We previously weren't handling the case where the server returns ERANGE even though the kernel requested as much size as the server had told us it needs; that can happen due to a race. * We also need to ensure that a pathological server that always returns ERANGE no matter what size we request in FUSE_LISTXATTR won't cause an infinite loop in the kernel. As of this commit, it will instead cause an infinite loop that exits and enters the kernel on each iteration, allowing signals to be processed. Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21287 r351961: Coverity fixes in fusefs(5) CID 1404532 fixes a signed vs unsigned comparison error in fuse_vnop_bmap. It could potentially have resulted in VOP_BMAP reporting too many consecutive blocks. CID 1404364 is much worse. It was an array access by an untrusted, user-provided variable. It could potentially have resulted in a malicious file system crashing the kernel or worse. Reported by: Coverity Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21466 r351963: fusefs: coverity cleanup in the tests Address the following defects reported by Coverity: * Structurally dead code (CID 1404366): set m_quit before FAIL, not after * Unchecked return value of sysctlbyname (CID 1404321) * Unchecked return value of stat(2) (CID 1404471) * Unchecked return value of open(2) (CID 1404402, 1404529) * Unchecked return value of dup(2) (CID 1404478) * Buffer overflows. These are all false positives caused by the fact that Coverity thinks I'm using a buffer to store strings, when in fact I'm really just using it to store a byte array that happens to be initialized with a string. I'm changing the type from char to uint8_t in the hopes that it will placate Coverity. (CID 1404338, 1404350, 1404367, 1404376, 1404379, 1404381, 1404388, 1404403, 1404425, 1404433, 1404434, 1404474, 1404480, 1404484, 1404503, 1404505) * False positive file descriptor leak. I'm going to try to fix this with Coverity modeling, but I'll also change an EXPECT to ASSERT so we don't perform meaningless assertions after the failure. (CID 1404320, 1404324, 1404440, 1404445). * Unannotated file descriptor leak. This will be followed up by a Coverity modeling change. (CID 1404326, 1404334, 1404336, 1404357, 1404361, 1404372, 1404391, 1404395, 1404409, 1404430, 1404448, 1404451, 1404455, 1404457, 1404458, 1404460) * Uninitialized variables in C++ constructors (CID 1404327, 1404346). In the case of m_maxphys, this actually led to part of the FUSE_INIT's response being set to stack garbage during the WriteCluster::clustering test. * Uninitialized sun_len field in struct sockaddr_un (CID 1404330, 1404371, 1404429). Reported by: Coverity Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21457 r352021: fusefs: suppress some Coverity resource leak CIDs in the tests The fusefs tests deliberately leak file descriptors. To do otherwise would add extra complications to the tests' mock FUSE server. This annotation should hopefully convince Coverity to shut up about the leaks. Reviewed by: uqs Sponsored by: The FreeBSD Foundation r352025: mount_fusefs: fix a segfault on memory allocation failure Reported by: Coverity Coverity CID: 1354188 Sponsored by: The FreeBSD Foundation r352230: fusefs: Fix iosize for FUSE_WRITE in 7.8 compat mode When communicating with a FUSE server that implements version 7.8 (or older) of the FUSE protocol, the FUSE_WRITE request structure is 16 bytes shorter than normal. The protocol version check wasn't applied universally, leading to an extra 16 bytes being sent to such servers. The extra bytes were allocated and bzero()d, so there was no information disclosure. Reviewed by: emaste MFC-With: r350665 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21557 Notes: svn path=/stable/12/; revision=352351
* MFC r352211: bectl(8): Add a "check" commandKyle Evans2019-09-152-27/+53
| | | | | | | | | | | | | | | | | | This command simply returns 0 at the moment and explicitly takes no arguments. This should be used by utilities wanting to see if bectl can operate on the system they're running, or with a specific root (`bectl -r`). It may grow more checks than "will libbe successfully init" in the future, but for now this is enough as that checks for the dataset mounted at "/" and that it looks capable of being a BE root (e.g. it's not a top-level dataset) bectl commands can now specify if they want to be silent, and this will turn off libbe_print_on_error so they can control the output as needed. This is already used in `bectl check`, and may be turned on in the future for some other commands where libbe errors are better suppressed as the failure mode may be obvious. Notes: svn path=/stable/12/; revision=352348
* MFC r351813, r352092: bectl(8) list sortingKyle Evans2019-09-153-40/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r351813: bectl(8): implement sorting for 'bectl list' output Allow 'bectl list' to sort output by a given property name. The property name is passed in using a command-line flag, '-c' for ascending order and '-C' for descending order. The properties allowed to sort by are: - name (the default output, even if '-c' or '-C' are not used) - creation - origin - used - usedds - usedsnap - usedrefreserv The default output for 'bectl list' is now ascending alphabetical order of BE name. To sort by creation time from earliest to latest, the command would be 'bectl list -c creation' MFC r352092: bectl(8): initialize reverse earlier This turns into a warning in GCC 4.2 that 'reverse' may be used uninitialized in this function. While I don't immediately see where it's deciding this from (there's only two paths that make column != NULL, and they both set reverse), initializing reverse earlier is good for clarity. Notes: svn path=/stable/12/; revision=352344
* MFC r352257: Report Trusted Computing feature set support.Alexander Motin2019-09-131-0/+3
| | | | | | | It practically means the device is SED. Notes: svn path=/stable/12/; revision=352296
* MFC r352200: Remove struct ata_res_pass16, unneeded after r352082.Alexander Motin2019-09-131-16/+0
| | | | Notes: svn path=/stable/12/; revision=352294
* MFC r352111: Initialize page/subpage in case of `modepage -d`.Alexander Motin2019-09-131-6/+7
| | | | | | | | | Previously without -m parameter it worked mostly by concodence. While there, make page/subpage values validation more strict. Notes: svn path=/stable/12/; revision=352292
* MFC r352082, r352103: Fix number of problems found while testing on SAT devices.Alexander Motin2019-09-131-314/+269
| | | | | | | | | | | | | | | | | | - Remove incomplete and dangerous ata_res decoding from ata_do_cmd(). Instead switch all functions that need the result to use get_ata_status(), doing the same, but more careful, also reducing code duplication. - Made get_ata_status() to also decode fixed format sense. In many cases it is still not enough to make it useful, since it can only report results of 28-bit command, but it is slightly better then nothing. - Organize error reporting in ata_do_cmd(), so that if caller specified AP_FLAG_CHK_COND, it is responsible for command errors (non-ioctl ones). - Make HPA/AMA errors not fatal for `identify` subcommand. - Fix reprobe() not being called on HPA/AMA when in quiet mode. - Remove not very useful messages from `format` and `sanitize` commands with -y flag. Once they started, they often can't be stopped any way. Notes: svn path=/stable/12/; revision=352290
* MFC r352018: Unify cam_send_ccb() error reporting.Alexander Motin2019-09-133-126/+17
| | | | | | | | | Error there mean that command was not even executed, and all information we have about it is errno, and cam_error_print() call is not very useful. Plus it is most likely a programmatic error, that shoud not happen. Notes: svn path=/stable/12/; revision=352287
* MFC r352011: Supply SAT layer with valid transfer sizes.Alexander Motin2019-09-132-171/+135
| | | | | | | | | | | | | | | | | This is a rework of r344701, that noticed that number of bytes passes to 8 bit sector count field gets truncated. First decision was to not pass anything, since ATA specs define the field as N/A. But it appeared to be a problem for some SAT devices, that require information about data transfer to operate properly. Some additional investigation shown that it is quite a common practice to set unused fields of ATA commands (fortunately ATA specs formally allow it) to supply the information to SAT layer. I have found SAS-SATA interposer that does not allow pass-through without it. As side effect, reduce code duplication by removing ata_do_28bit_cmd() function, replacing it with more universal ata_do_cmd(). Notes: svn path=/stable/12/; revision=352285
* MFC r352119-r352124, r352130Baptiste Daroussin2019-09-132-1/+2
| | | | | | | Stop linking to libl by specifying we do not need yywrap Notes: svn path=/stable/12/; revision=352276
* MFC r351172:Alan Somers2019-09-121-1/+0
| | | | | | | | | | | ping6: Raise WARNS level to 6 Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21260 Notes: svn path=/stable/12/; revision=352252
* MFC r350993, r350997, r351079-r351080, r351082, r351090, r351101-r351102Alan Somers2019-09-111-100/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r350993: Consistently use the byteorder functions in the correct direction Though ntohs and htons are functionally identical, they have different meanings.Using the correct one helps to document the code. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21219 r350997: ping6: use the monotonic clock to measure durations Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21226 r351079: ping6: quiet warning about unused copyright variable Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21270 r351080: ping6: quiet an undefined variable warning GCC 4.2 isn't smart enough to know that this variable is already defined by the time it's used. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21269 r351082: ping6: fix uninitialized variable warning for intvl GCC isn't smart enough to realize that this variable was always initialized. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21271 r351090: ping6: Fix data type of the buffer for ancillary data of a received message The old code worked, but wasted some stack space. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21275 r351101: ping6: fix uninitialized variable warnings when MK_CASPER=no Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21273 r351102: ping6: Fix alignment errors This fixes -Wcast-align errors when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21217 Notes: svn path=/stable/12/; revision=352232
* MFCr340363:Mariusz Zaborski2019-09-101-3/+3
| | | | | | | | | libcasper: Change the name of limits in cap_dns so the intentions are obvious. Reported by: pjd Notes: svn path=/stable/12/; revision=352188
* Back out r352087 for nowKyle Evans2019-09-093-147/+39
| | | | | | | | | | The ancient-gcc -Wno-error series hasn't been MFC'd yet to this branch and some GCC builds seem to have raised a false-positive that wasn't caught due to -Wno-error on head. Back it out for now, will reapply when r352092 becomes eligible for MFC... Notes: svn path=/stable/12/; revision=352093
* bectl(8): fix mis-mergeKyle Evans2019-09-091-0/+4
| | | | | | | | | r348296 ("add description for create subcommand") apparently failed to merge in the SYNOPSIS addition somehow... correct this mistake now. This is a direct commit to stable/12 for a misfire on previous MFC. Notes: svn path=/stable/12/; revision=352090
* MFC r351813: bectl(8): implement sorting for 'bectl list' outputKyle Evans2019-09-093-39/+147
| | | | | | | | | | | | | | | | | | | | | | | Allow 'bectl list' to sort output by a given property name. The property name is passed in using a command-line flag, '-c' for ascending order and '-C' for descending order. The properties allowed to sort by are: - name (the default output, even if '-c' or '-C' are not used) - creation - origin - used - usedds - usedsnap - usedrefreserv The default output for 'bectl list' is now ascending alphabetical order of BE name. To sort by creation time from earliest to latest, the command would be 'bectl list -c creation' Notes: svn path=/stable/12/; revision=352087
* MFC r345845-r345846: bectl(8) manpage clarityKyle Evans2019-09-091-60/+79
| | | | | | | | | | | | | | | | | r345845: bectl.8: Clean up & clarify the create subcommand - Improve formatting - Use consistent variable names - Improve the description of the create subcommand (1) PR: 235850 r345846: bectl.8: Bump date after r345845 Notes: svn path=/stable/12/; revision=352086
* MFC r350858-r350859, r350987, r351170Alan Somers2019-09-061-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r350858: ping6: Add missing static keyword for a global variable This fixes -Wmissing-variable-declarations error when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21214 r350859: ping6: Remove unnecessary level of indirection from dnsdecode() parameter The `sp' pointer doesn't need to be modified in the caller of dnsdecode(). This fixes -Wcast-qual error (`must have all intermediate pointers const qualified to be safe') when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21215 r350987: ping6: Fix data type of a variable for a packet sequence number Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21218 r351170: ping6: Fix dnsdecode() bug introduced by r350859 Revision 350859 removed level of indirection that was needed for setting the caller's `cp' pointer. dnsdecode() uses return value to indicate error or success. It returns pointer to a buffer holding a decompressed DNS name or NULL. The caller uses that value only to find out the result, not for accessing the buffer. We use the return value to propagate the new value of `cp' pointer to the caller instead of using an output argument. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC-With: 350859 Sponsored by: Google, Inc (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21266 Notes: svn path=/stable/12/; revision=351964
* MFC r350556:Alan Somers2019-09-062-47/+147
| | | | | | | | | | | | | | Capsicumize ping6 Add capsicum support to ping6, mostly copying the strategy used for ping. Submitted by: Ján Sučan <jansucan@gmail.com> Reviewed by: markj Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21050 Notes: svn path=/stable/12/; revision=351962
* MFC r350225:Alan Somers2019-09-062-50/+1
| | | | | | | | | | | | | | Remove the USE_RFC2292BIS option and reap dead code This option was imported as part of the KAME project in r62627 (in 2000). It was turned on unconditionally in r121472 (in 2003) and has been on ever since. The old alternative code has bitrotted. Reap the dead code. Reported by: Ján Sučan <jansucan@gmail.com> Differential Revision: https://reviews.freebsd.org/D20938 Notes: svn path=/stable/12/; revision=351941
* MFC r345350, r346441, r346765Alan Somers2019-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r345350: Rename fuse(4) to fusefs(4) This makes it more consistent with other filesystems, which all end in "fs", and more consistent with its mount helper, which is already named "mount_fusefs". Reviewed by: cem, rgrimes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19649 r346441: Use symlinks for kernel modules rather than hardlinks When aliasing a kernel module to a different name (ie if_igb for if_em), it's better to use symlinks than hard links. kldxref will omit entries for the links, ensuring that the loaded module has the correct name. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19979 r346765: Don't symlink fusefs.ko to fuse.ko on PPC Some PPC systems (PowerNV) use msdosfs for /boot, which can't handle either symlinks or hardlinks. So on PPC, copy the module instead. This change fixes installkernel on such systems after r345350. Reported by: Brandon Bergren <git_bdragon.rtk0.net> Reviewed by: jhibbits, rgrimes MFC-With: 345350, 346441 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19993 Notes: svn path=/stable/12/; revision=351940
* MFC r343755:Warner Losh2019-09-057-13/+7
| | | | | | | Regularize the Netflix copyright Notes: svn path=/stable/12/; revision=351913
* Revert r351902 ... it didn't properly exclude rack.c changesWarner Losh2019-09-057-7/+13
| | | | Notes: svn path=/stable/12/; revision=351912
* MFC r343755:Warner Losh2019-09-057-13/+7
| | | | | | | Regularize the Netflix copyright Notes: svn path=/stable/12/; revision=351902
* MFC r351205: Use calloc().Xin LI2019-09-031-12/+12
| | | | Notes: svn path=/stable/12/; revision=351737
* MFC r351204:Xin LI2019-09-031-19/+3
| | | | | | | | | | Remove redundant check and wrong fix: fat.c checks already take care about cluster chains. Obtained from: OpenBSD Notes: svn path=/stable/12/; revision=351735
* MFC r351038: Print few more useful identify fields.Alexander Motin2019-08-272-20/+34
| | | | Notes: svn path=/stable/12/; revision=351533
* MFC r350676, r350677: Make `camcontrol modepage` support block descriptors.Alexander Motin2019-08-274-46/+273
| | | | | | | | | | | | | | | | | | | It allows to read and write block descriptors alike to mode page parameters. It allows to change block size or short-stroke HDDs or overprovision SSDs. Depenting on -P parameter the change can be either persistent or till reset. In case of block size change device may need reformat after the setting. In case of SSD overprovisioning format or sanitize may be needed to really free the flash. During implementation appeared that csio_encode_visit() can not handle integers of more then 4 bytes, that makes 8-byte LBA handling awkward. I had to split it into two 4-byte halves now. Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/stable/12/; revision=351530
* MFC r350457: Make `camcontrol modepage` to use 10 byte commands.Alexander Motin2019-08-274-120/+184
| | | | | | | | | | | While old devices may not support 10 byte MODE SENSE/MODE SELECT commands, new ones may not be able to report all mode pages with 6 byte commands. This patch makes camcontrol by default start with 10 byte commands and fall back to 6 byte on ILLEGAL REQUEST error, or 6 byte can be forced. Notes: svn path=/stable/12/; revision=351529
* MFC r350424: Use present now scsi_mode_sense_subpage().Alexander Motin2019-08-271-9/+2
| | | | Notes: svn path=/stable/12/; revision=351528
* MFC r350393: Decode some more IDENTIFY DEVICE bits.Alexander Motin2019-08-271-15/+31
| | | | Notes: svn path=/stable/12/; revision=351527
* MFC r350779:Mark Johnston2019-08-211-1/+1
| | | | | | | | | Fix formatting. PR: 239726 Notes: svn path=/stable/12/; revision=351335
* MFC r350576: ipfw: fix jail option after r348215Kyle Evans2019-08-151-3/+18
| | | | | | | | | | | | | | | | r348215 changed jail_getid(3) to validate passed-in jids as active jails (as the function is documented to return -1 if the jail does not exist). This broke the jail option (in some cases?) as the jail historically hasn't needed to exist at the time of rule parsing; jids will get stored and later applied. Fix this caller to attempt to parse *av as a number first and just use it as-is to match historical behavior. jail_getid(3) must still be used in order for name arguments to work, but it's strictly a fallback in case we weren't given a number. Notes: svn path=/stable/12/; revision=351094
* MFC r350652 (by imp): Fix mismerge.Alexander Motin2019-08-122-6/+22
| | | | | | | | I merged passthru.c from the wrong branch (it was a branch that went further in a direction I wound up not taking). Fix the mismerge and turn passthru on. Notes: svn path=/stable/12/; revision=350954
* MFC r350599, r350609: Add `nvmecontrol resv` to handle NVMe reservations.Alexander Motin2019-08-124-5/+564
| | | | | | | | | | NVMe reservations are quite alike to SCSI persistent reservations and can be used in clustered setups with shared multiport storage. Relnotes: yes Notes: svn path=/stable/12/; revision=350952
* MFC r350563: Add `nvmecontrol sanitize` command.Alexander Motin2019-08-124-5/+296
| | | | | | | | | | | | | It allows to delete all user data from NVM subsystem in one of 3 methods. It is a close equivalent of SCSI SANITIZE command of `camcontrol sanitize`, so I tried to keep arguments as close as possible. While there, fix supported sanitize methods reporting in `identify`. MFC after: yes Notes: svn path=/stable/12/; revision=350951
* MFC r350555: Fix parameter check broken at r350057.Alexander Motin2019-08-121-1/+1
| | | | Notes: svn path=/stable/12/; revision=350950
* MFC r350541: Decode few more NVMe log pages.Alexander Motin2019-08-124-14/+292
| | | | | | | | | | In particular: Changed Namespace List, Commands Supported and Effects, Reservation Notification, Sanitize Status. Add few new arguments to `nvmecontrol log` subcommand. Notes: svn path=/stable/12/; revision=350948
* MFC r350529, r350530: Add more new fields and values from NVMe 1.4.Alexander Motin2019-08-121-0/+7
| | | | Notes: svn path=/stable/12/; revision=350947
* MFC r350523, r350524: Add IOCTL to translate nvdX into nvmeY and NSID.Alexander Motin2019-08-1212-109/+156
| | | | | | | | | | | | While very useful by itself, it also makes `nvmecontrol` not depend on hardcoded device names parsing, that in its turn makes simple to take nvdX (and potentially any other) device names as arguments. Also added IOCTL bypass from nvdX to respective nvmeYnsZ makes them interchangeable for management purposes. Notes: svn path=/stable/12/; revision=350946
* MFC r350477: Feature-complete NVMe Namespace Management.Alexander Motin2019-08-126-39/+442
| | | | | | | | | | | | | | This adds several previously missed but important subcommands to list namespaces and controllers. It also fixes few previously added but just found with real testing to be broken subcommands. Also while there, add possibility to explicitly specify nsid for `nvmecontrol identify` subcommand. It may be useful to specify nsids not having own devices, for example 0xffffffff, or just newly created ones. Notes: svn path=/stable/12/; revision=350945
* MFC r350462: Tune some commands desctiption.Alexander Motin2019-08-125-12/+12
| | | | Notes: svn path=/stable/12/; revision=350943
* MFC r350461: Fix usage printing for nested subcommands.Alexander Motin2019-08-121-2/+15
| | | | | | | Instead of `nvmecontrol create` should be `nvmecontrol ns create`, etc. Notes: svn path=/stable/12/; revision=350942