summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r310092:brooks2016-12-212-0/+15
| | | | | | | | | | | | Add a free_iovec() function to reset iovec's. The primary purpose is to call nmount() in a loop with new iovec's so free_iovec takes arguments by reference and resets their values. Reviewed by: cem MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513
* MFC r310132:pfg2016-12-211-1/+1
| | | | | | | | | libbfd: make sure variables are initialized before using them. Initialize l_sec_contents to make sure that free(l_sec_contents) is called on valid pointers. Obtained from: OpenBSD (partial CVS rev 1.18)
* MFC r310205:kib2016-12-211-1/+1
| | | | Fix typo.
* MFC r310098:kib2016-12-211-0/+10
| | | | Provide introductory description of the default pager.
* MFC r308708: Reduce verbosity of warnings about truncating NFS fileids tocperciva2016-12-201-4/+21
| | | | 32-bit inode numbers.
* MFC r309650:ed2016-12-202-2/+9
| | | | | | | | | Properly sign extend the result of jrand48() and mrand48(). These functions are supposed to return a value between [-2^31, 2^31). This doesn't seem to work on 64-bit systems, where we return a value between [0, 3^32). Patch up the function to use proper casts to int32_t. While there, fix some other style bugs.
* MFC: r309566rmacklem2016-12-191-3/+28
| | | | | | | | | | | | | Fix the NFSv4.1 server for Open reclaim after a reboot. The NFSv4.1 server failed to update the nfs-stablerestart file for a client when the client was issued its first Open. As such, recovery of Opens after a server reboot failed with NFSERR_NOGRACE. This patch fixes this. It also changes the code so that it malloc()'s the 1024 byte array instead of allocating it on the kernel stack for both NFSv4.0 and NFSv4.1. Note that this bug only affected NFSv4.1 and only when clients attempted to reclaim Opens after a server reboot.
* MFC r310160lifanov2016-12-191-1/+0
| | | | | | | | | | | | retain cc.4.gz man page for Chelsio T6 NICs This man page was removed in r225583 when cc.4 was renamed to mod_cc.4 With reintroduction of cc.4 "make installworld; make delete-old" was no longer convergent. Reviewed by: matthew Approved by: jhb (implicit), matthew (mentor) Differential Revision: https://reviews.freebsd.org/D8829
* MFC r307902:trasz2016-12-191-4/+5
| | | | | | Make the USB attach strings in dmesg include product name. MFC after: 1 month
* MFC r307774:trasz2016-12-191-2/+2
| | | | | | Fix libusb20_dev_get_desc(3) to use the "vendor product" order, not "product vendor". This is consistent with how it's generally done. The ordering is visible eg in usbconfig(8) output.
* MFC r309284-r309294kadesai2016-12-194-202/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r309294 This patch upgrades driver version to 06.712.04.00-fbsd r309293 This patch will add code to refire IOCTL commands after OCR. r309292 This patch will unblock SYNCHRONIZE_CACHE command to firmware, i.e. don't block the SYNCHRONIZE_CACHE command at driver instead of passing it to firmware for all Gen3 controllers. r309291 Wait for AEN task to be completed(if in queue) before resetting the controller and return without processing event in AEN thread, if controller reset is in progress. r309290 This patch will add task management support in driver. Below is high level description: If a SCSI IO times out, then before initiating OCR, now the driver will try to send a target reset to the particular target for which the IO is timed out. If that also fails, then the driver will initiate OCR. r309289 Process outstanding reply descriptors from all the reply descriptor post queues before initiating OCR. r309288 Clean up reference to AEN command if abort AEN is succesful as the command is aborted. Did the same by setting sc->aen_cmd = NULL when aborting AEN is successful. r309287 Update controller properties(read OCR capability bit) when MR_EVT_CTRL_PROP_CHANGED recieved. r309286 Add sanity check in IO and IOCTL path not to process command further if controller is in HW_CRITICAL_ERROR. r309285 Use a variable to indicate Gen3 controllers and remove all PCI ids based checks used for gen3 controllers. r309284 High level description of new solution - Free MFI and MPT command from same context. Free both the command either from process (from where mfi-mpt pass-through was called) or from ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which will do MFI/MPT list.
* MFC r309400:hselasky2016-12-191-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for endless recursion in the ACPI GPE handler during boot. When handling a GPE ACPI interrupt object the EcSpaceHandler() function can be called which checks the EC_EVENT_SCI bit and then recurse on the EcGpeQueryHandler() function. If there are multiple GPE events pending the EC_EVENT_SCI bit will be set at the next call to EcSpaceHandler() causing it to recurse again via the EcGpeQueryHandler() function. This leads to a slow never ending recursion during boot which prevents proper system startup, because the EC_EVENT_SCI bit never gets cleared in this scenario. The behaviour is reproducible with the ALASKA AMI in combination with a newer Skylake based mainboard in the following way: Enter BIOS and adjust the clock one hour forward. Save and exit the BIOS. System fails to boot due to the above mentioned bug in EcGpeQueryHandler() which was observed recursing multiple times. This patch adds a simple recursion guard to the EcGpeQueryHandler() function and also also adds logic to detect if new GPE events occurred during the execution of EcGpeQueryHandler() and then loop on this function instead of recursing. Reviewed by: jhb
* MFC r309404:hselasky2016-12-191-1/+5
| | | | | | | | | | | Fix return value from ng_uncallout(). callout_stop() recently started returning -1 when the callout is already stopped, which is not handled by the netgraph code. Properly filter the return value. Netgraph callers only want to know if the callout was cancelled and not draining or already stopped. Discussed with: julian, glebius
* MFC r309406:hselasky2016-12-192-19/+0
| | | | | | | | | | Remove useless NULL checks. NULL is not returned when allocating memory passing the M_WAITOK flag. Submitted by: trasz @ Differential Revision: https://reviews.freebsd.org/D5772 Sponsored by: Mellanox Technologies
* MFC r310155:kib2016-12-191-1/+1
| | | | Fix typo.
* MFC r310013 (by cperciva):dim2016-12-181-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that blkfront devices have a non-zero number of sectors and a non-zero sector size. Such a device would be a virtual disk of zero bytes; clearly not useful, and not something we should try to attach. As a fortuitous side effect, checking that these values are non-zero here results in them not *becoming* zero later on the function. This odd behaviour began with r309124 (clang 3.9.0) but is challenging to debug; making any changes to this function whatsoever seems to affect the llvm optimizer behaviour enough to make the unexpected zeroing of the sector_size variable cease. PR: 215209 Security: The potential for variables to unexpectedly become zero has worrying consequences for security in general, but not so much in this particular context. MFC r310086: In xbd_connect(), use correct scanf conversion specifiers for the feature_barrier and feature_flush variables. Otherwise, adjacent variables on the stack, such as sector_size, may be overwritten, with disastrous results. Note that I did not see a good reason to revert the addition of zero checks introduced in r310013. Better safe than sorry. PR: 215209 Tested by: royger
* MFC r296775 (by gibbs):kib2016-12-161-17/+42
| | | | | | Provide high precision conversion from ns,us,ms -> sbintime in kevent. Tested by: ian
* MFC r308806asomers2016-12-165-2/+5
| | | | | | | | | | Speed up pw operations that edit /etc/group or /etc/passwd r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group corruption on power loss. However, it fixed it by opening those files with O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC with appropriately placed fsync()s instead, which is much faster. Using a ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s.
* MFC 309274:jhb2016-12-161-1/+1
| | | | Use the correct name for the GCC macro indicating max_align_t is defined.
* MFC 308690: Sync instruction cache's after writing user breakpoints on MIPS.jhb2016-12-161-4/+10
| | | | | | Add an implementation for pmaps_sync_icache() on MIPS that sync's the instruction cache on all CPUs via smp_rendezvous() after a debugger inserts a breakpoint via ptrace(PT_IO).
* MFstable/11 r310126:ngie2016-12-151-0/+4
| | | | | | MFC r309602: Remove svn[lite]{bench,fsfs} if either MK_SVN == no or MK_SVNLITE == no
* MFC r309676vangyzen2016-12-1512-33/+59
| | | | | | | | | | | | | Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC
* MFC r309709:kib2016-12-151-3/+3
| | | | Move map_generation snapshot value into struct faultstate.
* MFC r309708:kib2016-12-151-10/+4
| | | | Style.
* MFC 309714: Fix spa_alloc_tree sorting by offset in r305331.mav2016-12-151-2/+17
| | | | | | | | | | | | | | | Original commit "7090 zfs should improve allocation order" declares alloc queue sorted by time and offset. But in practice io_offset is always zero, so sorting happened only by time, while order of writes with equal time was completely random. On Illumos this did not affected much thanks to using high resolution timestamps. On FreeBSD due to using much faster but low resolution timestamps it caused bad data placement on disks, affecting further read performance. This change switches zio_timestamp_compare() from comparing uninitialized io_offset to really populated io_bookmark values. I haven't decided yet what to do with timestampts, but on simple tests this change gives the same peformance results by just making code to work as declared.
* MFC r309460vangyzen2016-12-151-2/+5
| | | | | | | | | | | | | | | thr_set_name(): silently truncate the given name as needed Instead of failing with ENAMETOOLONG, which is swallowed by pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1 bytes. This is more likely what the user wants, and saves the caller from truncating it before the call (which was the only recourse). The man page changes were not merged because thr_set_name.2 does not exist on stable/10. Sponsored by: Dell EMC
* MFC r309563: pflog: Correctly initialise subrulenrkp2016-12-141-1/+1
| | | | | | | | | | | | | subrulenr is considered unset if it's set to -1, not if it's set to 1. See contrib/tcpdump/print-pflog.c pflog_print() for a user. This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0): rule 0..16777216(match) instead of the correct output of rule 0/0(match) PR: 214832 Submitted by: andywhite@gmail.com
* Merge r309860 from stable/9, as this also applies to stable/10:dim2016-12-141-1/+1
| | | | | | Fix libllvmanalysis build failure after r309857: on stable/9, llvm is compiled by gcc, and without -std=c++11, so the nullptr keyword is unknown. Use the old-school plain zero syntax instead.
* MFC r277511: Fix remote DMA based firewire debugging when targetingavg2016-12-141-8/+16
| | | | systems with more than 4GB of physical memory.
* MFC r309119: virtio_pci: fix announcement of MSI-X interrupts for queuesavg2016-12-141-1/+2
|
* MFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc()avg2016-12-141-0/+1
|
* MFC r308529: intpm: clean up intsmb_bread and intsmb_pcallavg2016-12-141-37/+2
|
* MFC r309092: fwohci: report whether PhysicalUpperBound register is implementedavg2016-12-141-0/+10
|
* MFC r306589: Implement iicbus_write_ivar and impelemnt the NOSTOP ivaravg2016-12-141-0/+21
| | | | in both read and write.
* MFC r308985: revert r304520, set canmount=on is not supposed to mountavg2016-12-141-8/+3
| | | | the filesystem
* MFC r308887,309090: fix unsafe modification of zfs_vnodeops whenavg2016-12-142-23/+7
| | | | DIAGNOSTIC is enabled
* MFC r308480: pmc_process_csw_out: ignore deleted countersavg2016-12-141-2/+2
|
* make smbus_get_addr() an ivar accessoravg2016-12-141-2/+9
| | | | | | | | | | | | | | | This is a direct commit to this branch. smbus_get_addr() was declared as a funciton prototype, but the function was never defined. read_ivar and write_ivar methods were unused. This was exposed after jedec_ts driver was imported to this branch as that driver turned out to be the first user of smbus_get_addr(). This change is a small subset of a larger change in r281985. Reported by: jhb Pointyhat to: avg
* MFH (r308996, r309051, r309738): refactor, avoid repeating DNS requestsdes2016-12-143-54/+124
|
* MFC r309625vangyzen2016-12-131-0/+52
| | | | | | | | | | | This is imported from NetBSD. The author--Joerg Sonnenberger--agreed to apply a two-clause BSD license, just so the license was clear. This source tree location matches NetBSD, and is the first place someone might look for such a tool. Obtained from: Joerg Sonnenberger via NetBSD Sponsored by: Dell EMC
* MFC r309364 r309367 r309624vangyzen2016-12-132-35/+35
| | | | | | | | | | | | | | | locale: fix buffer management Also, handle signed and unsigned chars, and more gracefully handle invalid input. locale: enable more warnings; fix them Do not set WARNS, so it gets the current default of 6. Fix the warnings by sprinkling static, const, or strdup. Make some constant data tables const. Fix whitespace. Sponsored by: Dell EMC
* MFC r307684, r307747ken2016-12-121-53/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r307684 | ken | 2016-10-20 13:42:26 -0600 (Thu, 20 Oct 2016) | 13 lines For CCBs allocated on the stack, we need to clear the entire CCB, not just the header. Otherwise stack garbage can lead to random flags getting set. This showed up as 'camcontrol rescan all' failing with EINVAL because the address type wasn't CAM_DATA_VADDR. sbin/camcontrol/camcontrol.c: In rescan_or_reset_bus(), bzero the stack-allocated CCBs before use instead of clearing the body. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r307747 | ken | 2016-10-21 12:54:56 -0600 (Fri, 21 Oct 2016) | 27 lines Fix a problem in camcontrol(8) that cropped up with r307684. In r307684, I changed rescan_or_reset_bus() to bzero stack-allocated CCBs before sending them to the kernel because there was stack garbage in there that wound up meaning that bogus CCB flags were set. While this fixed the 'camcontrol rescan all' case (XPT_DEV_MATCH CCBs were failing previously), it broke the 'camcontrol rescan 0' (or any other number) case when INVARIANTS are turned on. Rescanning a single bus reliably produced an assert in cam_periph_runccb(): panic: cam_periph_runccb: ccb=0xfffff80044ffe000, func_code=0x708, flags=0xffffdde0 The flags values don't make sense from the code. Changing the CCBs in rescan_or_reset_bus() from stack to heap allocated avoids the problem. It would be better to understand why userland stack allocated CCBs don't work properly, since there may be other code that breaks if stack allocated CCBs don't work. sbin/camcontrol/camcontrol.c: In rescan_or_reset_bus(), allocate the CCBs using malloc(3) instead of on the stack to avoid an assertion in cam_periph_runccb(). Sponsored by: Spectra Logic ------------------------------------------------------------------------ Sponsored by: Spectra Logic
* MFC r307402: Guard against bad service name argument(s) to load_rc_config()dteske2016-12-121-1/+3
|
* MFC: r309060brueffer2016-12-121-1/+1
| | | | | | | Fix comment typo. PR: 208484 Submitted by: madpilot
* MFC r309803:bapt2016-12-121-1/+1
| | | | | | | Fix pw groupshow <gid> PR: 204676 Submitted by: longwitz@incore.de
* MFC r309796:bapt2016-12-122-2/+2
| | | | | | | | Perl is not available in base fix scripts depending on it to use the version from ports PR: 215159 Reported by: Anatoly Kamchatnov <akamch@gmail.com>
* MFC r309795:bapt2016-12-121-22/+161
| | | | Update pci ids database to 2016.11.21
* MFC r308350:markj2016-12-121-2/+2
| | | | Fix WITNESS hints for pagequeue locks.
* MFC r309241,309243:delphij2016-12-121-1/+4
| | | | Plug memory leaks.
* MFC r309238,309239:delphij2016-12-121-12/+12
| | | | | r309238: Plug a potential memory leak. r309239: style(9).
OpenPOWER on IntegriCloud