summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r328430,r328431:eadler2018-03-171-1/+1
| | | | | | devd: minor nits - mark usage as noreturn
* MFC r305857,r305858,r305859:eadler2018-03-151-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbin/rcorder/rcorder.8: Amend HISTORY rcorder appeared in FreeBSD 5.0. Address issues raised by igor. PR: 212547 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk> ------------------------------------------------------------------------ r305858 | allanjude | 2016-09-16 04:11:04 +0000 (Fri, 16 Sep 2016) | 10 lines sbin/reboot/reboot.8: Amend HISTORY A standalone reboot utility showed up in 4.0BSD, in AT&T UNIX init has a case for reboot and is present in the version shipped with V5 either way, current entry is incorrect. PR: 212548 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk> ------------------------------------------------------------------------ r305859 | allanjude | 2016-09-16 04:12:32 +0000 (Fri, 16 Sep 2016) | 8 lines sbin/umount/umount.8: Amend HISTORY umount first appeared in V1, confirmed using TUHS archive http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/man/man1/umount.1 PR: 212554 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk>
* Partial merge of the SPDX changeseadler2018-03-14130-103/+368
| | | | | | | These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg
* MFC r323314, r323338, r328849asomers2018-03-1010-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r323314: Audit userspace geom code for leaking memory to disk Any geom class using g_metadata_store, as well as geom_virstor which duplicated g_metadata_store internally, would dump sectorsize - mdsize bytes of userspace memory following the metadata block stored. This is most or all geom classes (gcache, gconcat, geli, gjournal, glabel, gmirror, gmultipath, graid3, gshsec, gstripe, and geom_virstor). PR: 222077 (comment #3) Reported by: Maxim Khitrov <max AT mxcrypt.com> Reviewed by: des Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12269 r323338: Fix information leak in geli(8) integrity mode In integrity mode, a larger logical sector (e.g., 4096 bytes) spans several physical sectors (e.g., 512 bytes) on the backing device. Due to hash overhead, a 4096 byte logical sector takes 8.5625 512-byte physical sectors. This means that only 288 bytes (256 data + 32 hash) of the last 512 byte sector are used. The memory allocation used to store the encrypted data to be written to the physical sectors comes from malloc(9) and does not use M_ZERO. Previously, nothing initialized the final physical sector backing each logical sector, aside from the hash + encrypted data portion. So 224 bytes of kernel heap memory was leaked to every block :-(. This patch addresses the issue by initializing the trailing portion of the physical sector in every logical sector to zeros before use. A much simpler but higher overhead fix would be to tag the entire allocation M_ZERO. PR: 222077 Reported by: Maxim Khitrov <max AT mxcrypt.com> Reviewed by: emaste Security: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12272 r328849: geom: don't write stack garbage in disk labels Most consumers of g_metadata_store were passing in partially unallocated memory, resulting in stack garbage being written to disk labels. Fix them by zeroing the memory first. gvirstor repeated the same mistake, but in the kernel. Also, glabel's label contained a fixed-size string that wasn't initialized to zero. PR: 222077 Reported by: Maxim Khitrov <max@mxcrypt.com> Reviewed by: cem X-MFC-With: 323314 X-MFC-With: 323338 Differential Revision: https://reviews.freebsd.org/D14164
* MFC r330085:dab2018-03-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dhclient violates RFC2131 when sending early DHCPREQUEST message to re-obtain old IP When dhclient first starts, if an old IP address exists in the dhclient.leases file, dhclient(8) sends early DHCPREQUEST message(s) in an attempt to re-obtain the old IP address again. These messages contain the old IP as a requested-IP-address option in the message body (correct) but also use the old IP address as the packet's source IP (incorrect). RFC2131 sec 4.1 states: DHCP messages broadcast by a client prior to that client obtaining its IP address must have the source address field in the IP header set to 0. The use of the old IP as the packet's source address is incorrect if (a) the computer is now on a different network or (b) it is on the same network, but the old IP has been reallocated to another host. Fix dhclient to use 0.0.0.0 as the source IP in this circumstance without removing any existing functionality. Any previously-used old IP is still requested in the body of an early DHCPREQUEST message. PR: 199378 Submitted by: J.R. Oldroyd <fbsd@opal.com> Reported by: J.R. Oldroyd <fbsd@opal.com> Sponsored by: Dell EMC
* MFC r303539:eadler2018-03-081-2/+2
| | | | Use nitems() from sys/param.h.
* MFC r326820:eadler2018-03-081-10/+4
| | | | Tone down the description for the growfs "-y" flag.
* MFC r329930: route(8): make it possible to manually delete pinned routeeugen2018-03-051-1/+3
| | | | | Reported by: Andreas Longwitz <longwitz@incore.de> Approved by: avg (mentor)
* MFC r313979:eadler2018-03-051-1/+1
| | | | [ifconfig] fix a memory leak!
* MFC r313978:eadler2018-03-051-0/+1
| | | | [ifconfig] fix a memory leak.
* MFC r306836:eadler2018-03-051-2/+2
| | | | [ifconfig] correctly display RSSI.
* MFC r326276:eadler2018-03-05171-45/+389
| | | | | | | | | | | | | | | | various: general adoption of SPDX licensing ID tags. 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. No functional change intended.
* MFC r314181:eadler2018-03-051-0/+8
| | | | | | | | | | | | | [ifconfig] handle illegal WPS frames Some APs broadcast WPS IE frames with totally broken data. Ifconfig's printwpsie() loops through WPS frames printing the attributes out; if the frame's data is bad, printwpsie() can end up looking at out-of-bounds addresses causing ifconfig to bus error. Thanks to Takashi Inoue at Nihon U for his efforts in debugging this. PR: bin/217312
* MFC r306896:eadler2018-03-052-2/+2
| | | | | | | | Fix spurious white space introduced in r301059 r301059 accidently introduced a subtle change for point to point interfaces where an extra space is inserted before the netmask. This can cause issues for scripts that parse ifconfig output.
* MFC r323645:eadler2018-03-031-1/+1
| | | | | | kern.osreldate is an integer, not a string PR: 217501
* MFC r329362:silby2018-02-261-0/+7
| | | | Prevent savecore from reading bounds from the current directory.
* MFC of 329749.mckusick2018-02-231-1/+3
| | | | Fix a read past the end of a buffer in fsck.
* MFC r328108:asomers2018-02-222-2/+7
| | | | | | | | gnop(8): add the ability to set a nop provider's physical path While I'm here, expand the existing tests a bit. Differential Revision: https://reviews.freebsd.org/D13579
* Merge rev. 329197 from HEAD:n_hibma2018-02-201-22/+22
| | | | DSCP values passed to setdscp need to be lowercase.
* MFC Loader Fixes 2017q3: r320547,r320553,r321621,r321844,r321969,r321991,kevans2018-02-112-12/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r322037,r322038,r322039,r322040,r322056,r322074,r322542,r322592,r322593, r322896,r322923,r323671,r322930,r322931,r322932,r322933,r322934,r322935, r322936,r322937,r322938,r322939,r322941,r323062,r323063,r323064,r323065, r323100,r323131,r323174,r323258,r323261,r323272,r323367,r323379,r323389, r323407,r323428,r323436,r323494,r323496,r323497,r323541,r323554,r323589, r323707,r323867,r323885,r323886,r323895,r323896,r323897,r323905,r323906, r323907,r323908,r323909,r323952,r323991,r324099,r324558,r326445,r326609, r326610 This batch includes a special kludge to fix powerpc loader build; <stdlib.h> was included after <stand.h> there, causing problems with DEBUG_MALLOC bits. Include <stdlib.h> a little bit earlier to fix the build with the intention of removing this when eventually libsa silently replaces stdlib.h with stand.h. r320547: Link EFI/uboot loaders with -znotext r320553: Integer underflow in efipart_realstrategy when I/O starts after end of disk r321621: Always set the receive mask in loader.efi. r321844: Clean up style in print_state(..) and pager_printf(..) r321969: Fix the return types for printf and putchar to match their libc r321991: Revert r321969 r322037: Add stpcpy and stpncpy to libstand r322038: Add definitions and utilities for EFI drivers r322039: Move EFI ZFS functions to libefi r322040: Add EFI utility functions to libefi r322056: Move EFI fmtdev functionality to libefi r322074: libefi/time.c cstyle cleanup r322542: loader.efi: repace XXX with real comments in trap.c r322592: Remove unused defines. r322593: Define proposed GUID for FreeBSD boot loader variables. r322896: Make spinconsole platform independent and hook it up into EFI loader r322923: Hide length of geli passphrase during boot. r323671: Fix language used in the r322923. r322930: Move efi_main into efi/loader r322931: Cleanup efi_main return type r322932: Use the loader.efi conventions for the various EFI tables. r322933: No need for MK_ZFS around these: they are by their nature only active when MK_ZFS is true. r322934: _STAND is sometimes defined on the command line. Make the define here match. r322935: Fix warnings due to type mismatch. r322936: Remove useless 'static' for an enum definition. r322937: Forward declare struct dsk to avoid warnings when building libi386. r322938: Link in libefi for boot1 r322939: Use efi_devpath_str for debug path info. r322941: Eliminate redunant device path matching. r323062: Make efichar.c routines available to libefi. r323063: boot1.efi: print more info about where boot1.efi is loaded from r323064: Exit rather than panic for most errors. r323065: Save where we're booted from r323100: libstand: nfs_readlink() should return proper return code r323131: Revert r322941: Eliminate redundant device matching functions r323174: Fix loader bug causing too many pages allocation when bootloader is U-Boot r323258: ucs2len r323261: Fix armv6 build r323272: Be consistent and do return (1); r323367: Mark init_chroot and init_script variables as deprecated. r323379: It's been pointed out that init_script at least is useful w/o r323389: loader.efi: chain loader should provide proper device handle r323407: boot1 generate-fat: generate all templates at once r323428: r323389 breaks the kernel build when WITHOUT_ZFS is defined in src.conf r323436: boot1: remove BOOT1_MAXSIZE default value r323494: loader should support large_dnode r323496: libstand: tftp_open() can leak pkt on error r323497: libefi: efipart_open should check the status from disk_open r323541: libefi: efipart_realstrategy rsize pointer may be NULL r323554: Increase EFI boot file size frok 128k to 384k r323589: loader: biosmem.c cstyle cleanup r323707: loader: biosmem allocate heap just below 4GB r323867: libefi: devicename.c cleanups r323885: libefi: efi_devpath_match() should return bool r323886: libefi: efipart.c should use calloc() r323895: libefi: efi_devpath_match local len should be unsigned r323896: r323885 did miss efilib.h update r323897: efilib.h: typo in structure member description r323905: libefi: pdinfo_t pd_unit and pd_open should be unsigned r323906: libefi: efipart_strategy() should return ENXIO when there is no media r323907: libefi: efipart.c cstyle fix for efipart_print_common() r323908: libefi: efipart_hdinfo_add_filepath should check strtol result r323909: libefi: define EISA PNP constants r323952: After the r317886 support for TFTP and NFS can be enable simultaneously. r323991: libefi: efipart_floppy() will should not pass acpi pointer if the HID test fails r324099: Compile loader as Little-Endian on PPC64/POWER8 r324558: Define prototype for exit and ensure references r326445: Fix random() and srandom() prototypes to match the standard. r326609: Make putenv and getenv match the userland definition r326610: Fix random() prototype to match the system. PR: 219000 221001 222215 Relnotes: yes ("The length of the geli passphrase is hidden during boot")
* MFC r303725 (oshogbo): Fix misleading description of the -b option in thekevans2018-02-101-2/+2
| | | | geli init command.
* MFC r324978: Report only the valid slots in the firmware log page.mav2018-02-011-2/+7
| | | | | | | Printing the entire log page is causing confusion over available slots. Report only those slots that are valid. In the case where the firmware download isn't supported, assume that only the first slot is valid (I have no hardware to test this assumption though)
* MFC r324977 (by imp):mav2018-02-011-15/+23
| | | | | | | Add nvme_controller_data argument to all print functions. It's desirable to access controler data to inform printing log pages (such as limiting the printing to valid ranges).
* MFC r322992 (by imp): Print the controller's ID in identify.mav2018-02-011-1/+2
|
* MFC r320522 (by imp):mav2018-02-011-2/+2
| | | | | | Fix sign of resid and add a mostly useless cast to cope with signed vs unsigned check warnings from traditional unix code construsts bogusly flagged as potentially unsafe.
* MFC r320483 (by imp): Improve wdc error log pulling.mav2018-02-011-175/+29
| | | | | | | | After review by the WDC engineers, improve how we pull down the so-called 'e6' logs. The 'c6' logs are obsolete and support for them has been removed because FreeBSD needed to pull them in chunks, which is incompatible with the 0xc6 opcode implementation. Rather than leave the code in place that produces bad log pulls, remove it.
* MFC r320425 (by imp):mav2018-02-011-2/+15
| | | | | Report some aspects of namespaces and namespace support in identify command.
* MFC r320423 (by imp):mav2018-02-014-49/+82
| | | | | Move 128-bit integer routines to util.c so they can be used by more than just the log page code.
* MFC r316105 (by ngie): Don't use K&R style prototypes; ANSIfy themmav2018-02-011-3/+3
| | | | This fixes several -Wold-style-definition warnings.
* MFC r314230 (by imp):mav2018-02-013-24/+60
| | | | | | | | Make nvmecontrol logpage -p help list known pages. Make -p help and -v help list all the pages we know about. Add -v to usage. Update the man page.
* MFC r314229 (by imp):mav2018-02-011-0/+5
| | | | | | Exit with usage if argv[1] is NULL in dispatch. This fixes core dumps when a command has subcommands, but the user doesn't give the parameters on the command line.
* MFC r314228 (by imp): Fix typos in output.mav2018-02-011-3/+3
|
* MFC r313259 (by imp):mav2018-02-011-1/+2
| | | | | | Use ssize_t instead of uint32_t to prevent warnings about a comparison with different signs. Due to the promotion rules, this would only happen on 32-bit platforms.
* MFC r313258 (by imp):mav2018-02-012-4/+27
| | | | | | Add the ability to dump log pages directly in binary to stdout. Update man page to include this flag, and an example of dumping a vendor-specific page while I'm here.
* MFC r313257 (by imp):mav2018-02-012-1/+24
| | | | | | Add some descriptions to the man page for the supported log pages as well as the new wdc commands. Make wdc be an alias for hgst when specifying the vendor to use to interpret the page.
* MFC r313252 (by imp):mav2018-02-011-1/+1
| | | | Fix off by one error that truncated the serial number for filenames.
* MFC r313251 (by imp):mav2018-02-011-1/+1
| | | | Fix a typo in usage string for unimplemented command.
* MFC r313191 (by imp):mav2018-02-015-1/+365
| | | | | | | Implement 5 wdc-specific nvme control options for their HGST drives: wdc cap-diag Capture diagnostic data from drive wdc drive-log Capture drive history data from drive wdc get-crash-dump Retrieve firmware crash dump from drive
* MFC r313190 (by imp):mav2018-02-012-20/+30
| | | | Move the usage and command name lookup into functions.
* MFC r313188 (by imp):mav2018-02-011-1/+1
| | | | Put the arguments to aligned_alloc in the right order.
* MFC r313111 (by imp):mav2018-02-011-1/+1
| | | | | | | | Use aligned buffer for the firmware data. Otherwise, when loading a MAXPHYS bytes of data, the I/O would require MAXPHYS + PAGE_SIZE worth of pages to do the I/O and we'd hit an assertion in vm_fault_quick_hold_pages unless MAXPHYS was larger than 1M + PAGE_SIZE.
* MFC r309777 (by imp):mav2018-02-011-2/+47
| | | | | Implement Intel's log page 0xc1 (Read Command Latency Log) and page 0xc1 (Write Command Latency Log).
* MFC r309684 (by imp): Fix Typomav2018-02-011-1/+1
|
* MFC r309413 (by imp):mav2018-02-011-20/+27
| | | | | | Flag the vendor specific pages as such. This allows different decoding for the same page number as different vendors encode vendor specific pages differently.
* MFC r308869 (by imp):mav2018-02-011-1/+9
| | | | | | | | | i386 turns out to not have __uint128_t. So confusingly use 64-bit math instead. Since we're little endian, we can get away with it. Also, since the counters in quesitons would require billions of iops for tens of billions of seconds to overflow, and since such data rates are unlikely for people using i386 for a while, that's OK. The fastest cards today can't do even a million IOPs.
* MFC r308856 (by imp):mav2018-02-011-1/+80
| | | | | | | | | | Decode the Intel-specific Additional SMART data page (0xca) and print it in human readable form. Include a pointer to the public spec that was followed to implement this in the code. Samsung also implements page 0xca on some of their drives, but the format is slighly different, so the code skips printing zero keys. Samsung's log page has additional, unknown data after the end of Intel defined data which isn't displayed.
* MFC r308848 (by imp):mav2018-02-011-8/+0
| | | | | | | Remove check for valid log pages. Let the drive tell us which pages are valid or not. While many pages are reserved in the standard, that doesn't make them invalid and future versions of the standard may define then.
* MFC r308855 (by imp):mav2018-02-011-0/+420
| | | | | Implement HGST Log page 0xc1, as documented in the HGST SN100 and SN150 product manuals. Subpage 0x32 is documented, but not implemented.
* MFC r308854 (by imp): Print Intel's expanded Temperature log page.mav2018-02-011-1/+32
|
* MFC r308849 (by imp):mav2018-02-011-19/+15
| | | | | Use a table for pages we know the size of. We have a special case for the error log since it isn't a fixed size.
OpenPOWER on IntegriCloud