summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r308904vangyzen2016-11-303-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error reporting from wcstof() When wcstof() skipped initial space and then parsing failed, it set endptr to the first non-space character. Fix it to correctly report failure by setting endptr to the beginning of the input string. The fix is from theraven@, who fixed this bug in wcstod() and wcstold() in r227753. While I'm here: Move assignments out of declarations in wcstod() and wcstold(). This is against my personal preference, but it is our agreed style(9). Set endptr correctly on malloc() failure in all three functions. Remove an incorrect comment: This is pointer arithmetic, so the code was not actually making that assumption. wcstold() advanced the wcp pointer beyond leading whitespace and then reset it back to the beginning of the string. Do not reset it. This seems to have no functional effect, since strtold_l() also skips leading whitespace. I'm making the change to keep this function consistent with wcstof() and wcstod(), and because the C11 spec prescribes the use of iswspace() to skip leading space. Reported by: libc++ unit test for std::stof(std::wstring) Sponsored by: Dell EMC
* MFC r308824vangyzen2016-11-301-2/+32
| | | | | | | | | | locale: fix display of "grouping" and "mon_grouping" values The "grouping" and "mon_grouping" values are arrays of one-byte integers, not arrays of ASCII characters. Display them in a format similar to GNU and MacOS. Sponsored by: Dell EMC
* MFC r308797-308799,309082dexuan2016-11-304-97/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: sephe (mentor) r308797 update the hv_vmbus(4) manual by adding a dependency on pci We enhanced the vmbus driver to support PCIe pass-through recently. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r308798 remove the hv_ata_pci_disengage(4) manual A few months ago, we removed the driver, which was not necessary any longer. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r308799 fix share/man/man4/Makefile for hv_ata_pci_disengage.4 We need to remove the line since we removed the related manual just now. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r309082 share/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386 We shouldn't install them on the architectures not supported by Hyper-V. And, hv_ata_pci_disengage.4.gz should be removed from all architectures: 1) It should have only applied to Hyper-V; 2) For Hyper-V platforms (amd64 and i386), the related driver was removed by r306426 | sephe | 2016-09-29 09:41:52 +0800 (Thu, 29 Sep 2016), because now we have a better mechanism to disble the ata driver for hard disks when the VM runs on Hyper-V. Reviewed by: sephe, andrew, jhb Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8572
* MFC: 308723-308725,308793-308795,309127dexuan2016-11-308-3/+2087
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Approved by: sephe (mentor) r308723 hyperv/vmbus: add a new method to get vcpu_id vcpu_id is host's representation of guest CPU. We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus driver is loaded. Later, when a driver, like the coming pcib driver, talks to the host and needs to refer to a guest CPU, the driver must use the vcpu_id. Reviewed by: jhb, sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8410 r308724 hyperv/vmbus: add new vmbus methods to support PCIe pass-through The new methods will be used by the coming pcib driver. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8409 r308725 hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment) The feature enables us to pass through physical PCIe devices to FreeBSD VM running on Hyper-V (Windows Server 2016) to get near-native performance with low CPU utilization. The patch implements a PCI bridge driver to support the feature: 1) The pcib driver talks to the host to discover device(s) and presents the device(s) to FreeBSD's pci driver via PCI configuration space (note: to access the configuration space, we don't use the standard I/O port 0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V, which is very similar to the 0xCF8/CFC method). 2) The pcib driver allocates resources for the device(s) and initialize the related BARs, when the device driver's attach method is invoked; 3) The pcib driver talks to the host to create MSI/MSI-X interrupt remapping between the guest and the host; 4) The pcib driver supports device hot add/remove. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8332 r308793 hyperv/pcib: Fix the build for some kernel configs Add the dependency on pci explicitly for the pcib and vmbus drivers. The related Makefiles are updated accordingly too. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r308794 hyperv/vmbus,pcib: Add MODULE_DEPEND on pci We'd better add this dependency explicitly, though usually the pci driver is built into the kernel by default. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r308795 hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c This makes the file name and the variable naming in the file consistent. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft r309127 hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at least shouldn't break build. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft
* MFC r309027:brooks2016-11-301-2/+2
| | | | | | | | | | | | | | | | | Allocate a struct ifreq rather than using a (wrong) computed size for the BIOCSETIF ioctl. The kernel always copies an entire struct ifreq and IPv4 addresses will always fit in an ifreq. On systems with pointers larger than 64-bits, the computed size will be less than the size of struct ifreq, potentially resulting in the kernel attempting to copyin memory from outside the allocation. Reviewed by: jhb Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8445
* MFC 307756: Define max_align_t for C11.jhb2016-11-282-0/+13
| | | | | | | | | | | libc++'s stddef.h includes an existing definition of max_align_t for C++11, but it is only defined for C++, not for C. In addition, GCC and clang both define an alternate version of max_align_t that uses a union of multiple types rather than a plain long double as in libc++. This adds a __max_align_t to <sys/_types.h> that matches the GCC and clang definition that is mapped to max_align_t in <stddef.h>. PR: 210890
* MFC r308730:hselasky2016-11-281-2/+4
| | | | | | Make sure MAC address is reprogrammed when if_init() callback is invoked. Else promiscious mode must be used to pass traffic. While at it fix a debug print macro.
* MFC r308618:kib2016-11-272-2/+24
| | | | | Provide simple mutual exclusion between mount point update and unmount. In the update path in ffs_mount(), drop vfs_busy() reference around namei().
* MFC r308608:mav2016-11-272-27/+40
| | | | Use providergone method to cover race between destroy and g_access().
* MFC r308579: Do not report error on close even if we have no paths left.mav2016-11-261-1/+1
|
* MFC r308808, r308809: Lookup locale when print all keywords as well.ume2016-11-261-1/+2
|
* MFC r308064:mckusick2016-11-261-10/+12
| | | | | Avoid possible overflow when calclating malloc size for auxillary data structure sizes when mounting and reloading UFS/FFS filesystems.
* MFC 307333: Reprogram I/O APIC interrupt pins when registering an I/O APIC.jhb2016-11-251-2/+9
| | | | | | | | | | | | | | | | All I/O APIC pins are masked when an I/O APIC is first probed. The APIC enumerator (MP Table or MADT) then parses its associated tables to configure individual pins to set custom delivery modes or alternate routing (e.g. routing IRQ 0 to intpin 2). Pins for regular interrupt pins are left masked until the first interrupt is assigned. However, pins with unusual settings (e.g. NMI or SMI) are never assigned an interrupt and thus never re-programmed. The I/O APIC code used to reprogram all interrupt pins during registration but this was lost in r151979. In theory, this is mostly a no-op as the ACPI APIC table does not include a way to enumerate NMI or SMI pins for the I/O APIC, so only systems using an MP Table would be affected.
* MFC r286227, r286443:jch2016-11-2415-247/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r286227: Decompose TCP INP_INFO lock to increase short-lived TCP connections scalability: - The existing TCP INP_INFO lock continues to protect the global inpcb list stability during full list traversal (e.g. tcp_pcblist()). - A new INP_LIST lock protects inpcb list actual modifications (inp allocation and free) and inpcb global counters. It allows to use TCP INP_INFO_RLOCK lock in critical paths (e.g. tcp_input()) and INP_INFO_WLOCK only in occasional operations that walk all connections. PR: 183659 Differential Revision: https://reviews.freebsd.org/D2599 Reviewed by: jhb, adrian Tested by: adrian, nitroboost-gmail.com Sponsored by: Verisign, Inc. r286443: Fix a kernel assertion issue introduced with r286227: Avoid too strict INP_INFO_RLOCK_ASSERT checks due to tcp_notify() being called from in6_pcbnotify(). Reported by: Larry Rosenman <ler@lerctr.org> Submitted by: markj, jch
* MFC r308772: crunchide: report explicit error for combined string tableemaste2016-11-241-0/+4
| | | | | | | | | | | Some tools produce objects with a combined strtab and shstrtab. These objects are not supported by crunchide since it rewrites the symtab and strtab to "hide" symbols. This invalidates section header offsets into a combined strtab/shstrtab. In the future we could support these objects (by ensuring that we retain unmodified section name strings in the output .strtab, and then rewriting each section header's sh_name).
* MFC 308056: Fix formatting of tables.jhb2016-11-231-123/+123
| | | | | | | | | | | Specifically, use .Ta instead of tabs to separate column entries. While here fix a few other things: - Use .Sy for all column headers (previously only the first column header was bold) - Use .Dv to markup constants used for MIB names. - Use "1234" and "4321" for the byte order descriptions without thousands separators. - Mark up header files in the first table with .In.
* MFC 307975: Enable EFER_NXE properly on APs.jhb2016-11-231-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | EFER_NXE is set in the EFER MSR by initializecpu() and must be set on all CPUs in the system. When PG_NX support was added to PAE on i386, the block to enable EFER_NXE was placed in a section of initializecpu() that only runs if 'cpu == CPU_686'. During early boot, locore does an initial pass to set cpu that sets it to CPU_686 on all CPUs later than a Pentium. Later, printcpuinfo() adjusts the 'cpu' variable on PII and later CPUs to one of CPU_PII, CPU_PIII, or CPU_P4. However, printcpuinfo() is called after initializecpu() on the BSP, so the BSP would enable EFER_NXE and pg_nx. The APs execute initializecpu() much later after printcpuinfo() has run. The end result on a modern CPU was that cpu was set to CPU_PIII when the APs invoked initializecpu(), so they did not enable EFER_NXE. As a result, the APs would fault when trying to access any pages marked with PG_NX set. When booting a 2 CPU PAE kernel in bhyve this manifested as a hang before single user mode. The attempt to execute /bin/init tried to copy out the exec strings (argv, etc.) to a non-executable mapping while running on the AP. The instruction kept faulting due to invalid bits in the PTE in an infinite loop. Fix this by moving the code to enable EFER_NXE out of the switch statement on 'cpu' and always doing it if 'amd_feature' supports AMDID_NX.
* MFC r308689:kib2016-11-2318-4/+142
| | | | | | | | | | Pass CPUID[1] %edx (cpu_feature), %ecx (cpu_feature2) and CPUID[7].%ebx (cpu_stdext_feature), %ecx (cpu_stdext_feature2) to the ifunc resolvers on x86. MFC r308925: Adjust r308689 to make rtld compilable with either in-tree or (hopefully) stock gcc 4.2.1 on i386 and other arches.
* MFC r308733:kib2016-11-231-30/+50
| | | | | | Move the fast fault path into the separate function. Tested by: pho
* MFC r308425: Add support for EIIOE flag in Additional Element Status.mav2016-11-232-9/+21
| | | | | It was added in SES-3 spec, and its support required to properly link the Additional Element Status page data to the original elements.
* MFC r307584 (partially)asomers2016-11-221-0/+14
| | | | | | | | | | | | | | | | | | | | 307584 added the __min_size macro and replaced some static array sizes with __min_size. However, stable/10 doesn't yet have any static array sizes, so all this MFC does is add the __min_size macro. Original commit message: Fix C++ includability of crypto headers with static array sizes C99 allows array function parameters to use the static keyword for their sizes. This tells the compiler that the parameter will have at least the specified size, and calling code will fail to compile if that guarantee is not met. However, this syntax is not legal in C++. This commit reverts r300824, which worked around the problem for sys/sys/md5.h only, and introduces a new macro: min_size(). min_size(x) can be used in headers as a static array size, but will still compile in C++ mode.
* MFC 306999: Add a missing word.jhb2016-11-221-1/+1
|
* MFC r308957: MFV r308954:delphij2016-11-22183-3780/+7374
| | | | | | ntp 4.2.8p9. Approved by: so
* MFC r308688:kib2016-11-221-1/+1
| | | | Assert that there is no unresolved symbols during rtld linking.
* MFC r308687:kib2016-11-221-1/+1
| | | | Update hint to utilize user variable.
* MFC r307978:mckusick2016-11-221-20/+39
| | | | | | | Bug 180894 reports that rm -rf on a directory causes kernel panic and reboot. Return EINVAL rather than panic for low directory link count. PR: 180894
* MFC r308642:kib2016-11-211-6/+5
| | | | | | Initialize reserved bytes in struct mq_attr. PR: 214488
* MFC r308089: zfsbootcfg: a simple tool to set next boot (one time)avg2016-11-2115-9/+488
| | | | | | | options for zfsboot There is a branch-specific change in sbin/zfsbootcfg/Makefile because of LIBADD vs LDADD/DPADD.
* MFC r307755: swapoff: Remove only late devices with -aL.jilles2016-11-203-2/+12
| | | | | | | | | | | | | | | Currently, '/etc/rc.d/swaplate stop' removes all swap devices. This can be very slow and may not even be possible if there is a lot of swap space in use. However, removing swap devices is only needed for late swap devices that may depend on daemons that subsequent shutdown steps stop. Normal swap devices such as hard disk partitions will remain available throughout the shutdown process and need not be removed. In swapoff, interpret -aL to remove late swap devices only, and use this in etc/rc.d/swaplate. The meaning of -aL in swapon remains unchanged (add all swap devices, both normal and late). PR: 187081
* MFC r306585: swapon(8): Update to reality: swapoff ignores -L and the latejilles2016-11-191-9/+1
| | | | option in fstab.
* MFC r307752asomers2016-11-183-0/+8
| | | | Close some file descriptor leaks in pw
* MFC r306740, r307150: groff: use changelog date in man pagesemaste2016-11-182-1/+10
| | | | | | | | | | | | | | | | | | | | | | r306740: groff: use changelog date rather than file modification date in man pages The source checkout date is not particularly relevant, and this makes groff man pages build reproducibly. r307150: Avoid using 'head' in generating groff doc date It may not be available in certain cross build cases. Note that this is a slight change in functionality, in that now only the first line of the source ChangeLog file is processed. This is acceptable as groff will be retired and we won't encounter a possibly-different ChangeLog format. Sponsored by: The FreeBSD Foundation
* MFC r282824: crunchide: remove EOL whitespaceemaste2016-11-181-3/+3
|
* MFC r308538:kib2016-11-181-1/+1
| | | | Increase the max allowed size of the microcode update blob for x86.
* MFC r308040,308479: nap time between pats is forced to be at most halfavg2016-11-171-9/+14
| | | | | | | of the timeout Note that in this branch the default nap period is 1 second unlike the head where the period is 10 seconds.
* Revert r308753: some unrelated changes were included into the commitavg2016-11-172-30/+25
|
* MFC r308247: MFV r308222: 6051 lzc_receive: allow the caller to read theavg2016-11-172-8/+41
| | | | begin record
* MFC r308218: Add support for microcode update on newer AMD CPUs (10h+)avg2016-11-175-30/+374
|
* MFC r308101: hwpmc: fix a race between amd_stop_pmc and amd_intravg2016-11-171-1/+2
|
* MFC r307195: convert iicsmb to use iicbus_transfer for all operationsavg2016-11-171-168/+142
|
* MFC r308040,308479: nap time between pats is forced to be at most halfavg2016-11-172-25/+30
| | | | | | | of the timeout Note that in this branch the default nap period is 1 second unlike the head where the period is 10 seconds.
* MFC r308464, r308471: Add some device IDs found in my new laptop.mav2016-11-165-0/+16
|
* MFC r308348:hrs2016-11-161-0/+4
| | | | | | Add link-layer address option in RA even for IFT_L2VLAN and IFT_BRIDGE. Reported by: philip
* MFC r308347:hrs2016-11-161-0/+3
| | | | | | | | Fix an infinite loop at an non-responding hop when other echo replies are kept arriving in the waittime time window. Submitted by: Denny Page PR: 210286
* MFC r308416:hselasky2016-11-153-2/+12
| | | | | | | | | | | Add timer to watch the RQ when we are out of mbufs. The firmware/hardware does not generate additional completion events unless we post new buffers. Use a timer to try to post more buffers in case we are temporarily out of mbufs. Else the receive schedule completely stops. Sponsored by: Mellanox Technologies
* MFC r308414:hselasky2016-11-155-43/+467
| | | | | | | Add more firmware related structures and update existing ones in the MLX5 core module. Update the set and query diagnostics counter API. Sponsored by: Mellanox Technologies
* MFC r308413:hselasky2016-11-151-1/+5
| | | | | | | Query flow table capabilities according to the correct capability bit for infiniband. Sponsored by: Mellanox Technologies
* MFC r308412:hselasky2016-11-151-4/+5
| | | | | | | Correct checksum fields in the "mlx5_mini_cqe8" structure. The fields in question are currently not used. Sponsored by: Mellanox Technologies
* MFC r308411:hselasky2016-11-151-5/+5
| | | | | | | | Ensure the firmware is notified of any host memory allocation failures. Else firmware commands may time out waiting for host memory. Sponsored by: Mellanox Technologies
* MFC r308409:hselasky2016-11-151-1/+4
| | | | | | | When a firmware command times out do not free the command structure to avoid use after free. Sponsored by: Mellanox Technologies
OpenPOWER on IntegriCloud