summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r304055:markj2016-08-312-1/+7
| | | | Fix handling of forward enum declarations in the CTF tools.
* MFC r304184:badger2016-08-301-1/+1
| | | | | | | | | | | | | | sem_post(): wake up the sleeper only after adjusting has_waiters If the caller of sem_post() wakes up a thread sleeping via sem_wait() before it clears the has_waiters flag, the caller of sem_wait() has no way of knowing when it is safe to destroy the semaphore and reuse the memory. This is because the caller of sem_post() may be interrupted between the wake step and the clearing of has_waiters. It will then write into the has_waiters flag in userspace after being preempted for some unknown amount of time. Approved by: vangyzen (mentor) Sponsored by: Dell Inc.
* MFC r304911ache2016-08-301-0/+19
| | | | | | | | | | | | | The formal behavior of qsort is unstable with regard to objects that are equal. Unfortunately, RFC 3484 requires that otherwise equal objects remain in the order supplied by the DNS server. The present code attempts to deal with this by returning -1 for objects that are equal (i.e., returns that the first parameter is less then the second parameter). Unfortunately, the qsort API does not state that the first parameter passed in is in any particular position in the list. PR: 212122 Submitted by: Herbie.Robinson@stratus.com
* MFC r304747:cy2016-08-2926-11664/+75450
| | | | | | | | | | | | Update from sqlite3-3.12.1 (3120100) to sqlite3-3.14.1 (3140100). This commit addresses the tmpdir selection vulnerability fixed in sqlite3-1.13.0. See VuXML entry 546deeea-3fc6-11e6-a671-60a44ce6887b. This MFC was suggested by kib@ in the abandoned D7651. Security: VuXML 546deeea-3fc6-11e6-a671-60a44ce6887b Security: CVE-2016-6153
* MFC r304629:hselasky2016-08-291-0/+4
| | | | | | | | | | Don't separate the status stage of the XHCI USB control transfers into its own job because this breaks the simplified QEMU XHCI TRB parser, which expects the complete USB control transfer as a series of back to back TRBs. The old behaviour is kept under #ifdef in case this change breaks enumeration of any USB devices. PR: 212021
* MFC r304601:hselasky2016-08-291-2/+2
| | | | | | | Increase the maximum RX/TX queue size. This allows for a RX/TX queue size of 16384 mbufs. Previously the limit was 8192. Sponsored by: Mellanox Technologies
* MFC r304597:hselasky2016-08-291-6/+8
| | | | | | | | | | Fix for invalid use of bits in input context. Basically split configuring of EP0 and non-EP0 into xhci_cmd_evaluate_ctx() and xhci_cmd_configure_ep() respectivly. This resolves some errors when using XHCI under QEMU and gets is more in line with the XHCI specification. PR: 212021
* MFstable/11 r304945:ngie2016-08-291-3/+5
| | | | | | | | | | | | | MFC r304034: Initialize `ai` to NULL and test for `ai` with type-appropriate values Depending on the address family and ai_flags containing AI_V4MAPPED, it might not do a proper DNS lookup on the provided DNS address Convert some `ai` boolean true/false checks to NULL/non-NULL while here. PR: 211790
* MFC r303982alc2016-08-281-11/+14
| | | | | | Correct errors and clean up the comments on the active queue scan. Eliminate some unnecessary blank lines.
* MFC r303426:kib2016-08-277-66/+64
| | | | | Rewrite subr_sleepqueue.c use of callouts to not depend on the specifics of callout KPI.
* MFC r303425:kib2016-08-274-59/+177
| | | | | | | Add callout_when(9). MFC r303919: Fix indentation.
* MFC r264388 (by davide):kib2016-08-275-13/+13
| | | | | | | | | | | | | Define SBT_MAX. MFC r267896 (by davide): Improve r264388. MFC note. The SBT_MAX definition already existed on stable/10, but without the refinement from r267896. Also, consumers of SBT_MAX were not converted, since r264388 was not merged properly. Reviewed by: mav
* MFC r304607,r304641,r304819,r304811ache2016-08-274-28/+15
| | | | | | | | | | | | | | | | | 1) Don't forget to set __SERR on __slbexpand() error. 2) Remove "Fast path" from fgetwc()/fputwc() since it can't detect encoding errors and ignores them all. One of affected encoding example: US-ASCII 3) Original fgetln() from 44lite return success for line tail errors, i.e. partial line, but set __SERR and errno in the same time, which is inconsistent. Now both OpenBSD and NetBSD return failure, i.e. no line and set error indicators for such case, so make our fgetln() and fgetwln() (as its wide version) compatible with the rest of *BSD. PR: 212033
* MFC r304810ache2016-08-273-2/+14
| | | | | | | | Don't check for __SERR which may stick from one of any previous stdio functions. __SERR is for user and the rest of stdio code do not check it for error sensing internally, only set it. In vf(w)printf.c here it is more easy to save __SERR, clear and restore it.
* MFC r304779, r304780, r304781, r304782, r304802cy2016-08-272-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304779: Revert r298887 (spelling fix) and remove $FreeBSD$ because text changes to leap-seconds invaldidates validation hash at the end of the file. Remove svn:keywords and replace with fbsd:nokeywords=yes to support this change. r304780: Change the algorithm by which /var/db/leap-seconds is updated. 1. Use the leap-seconds version number (update time) to determine whether to update the file or not. 2. If the version numbers of the files is the same, use the later expiry date to determine which file to use. Suggested by: ian@ r304781: Add logic to replace the working ntp leap-seconds file in /var/db if it contains a $FreeBSD$ header. The header will cause the file to fail checksum of the hash causing ntpd to ignore the file. r304782: Make validation of the leap-seconds file unconditional. r304802: Remove the gratuitous check for $FreeBSD$ and rename the function to ntpd_init_leapfile, to ensure a copy exists in /var/db if a copy isn't already there. Reported by: ache@
* MFC r304721:cy2016-08-271-1/+1
| | | | | | | Fixup man page formatting. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> Discussed with: bjk@
* Bump __FreeBSD_version after LC_*_MASK fixache2016-08-261-1/+1
|
* MFC r304703, r304755ache2016-08-262-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | 1) _locale.h LC_*_MASK bit shifting order was partially broken from the initial commit time at year 2012. Only LC_COLLATE_MASK and LC_CTYPE_MASK are in the right order. The order here should match XLC_* from "xlocale_private.h" which, in turn, match LC_* publicly visible order from <locale.h> which determines how locale components are stored in the structure. LC_*_MASK -> XLC_* translation done as "ffs(mask) - 1" in the querylocale() and equivalent shift loop in the newlocale(), so mapped to some wrong components (excluding two mentioned above). Formally the fix is ABI breakage, but old code using those masks never works properly in any case. Only newlocale() and querylocale() are affected. 2) msgcat.c Use current locale (f.e. set by thread). It was global locale always previously. PR: 211743
* MFC r304342:hselasky2016-08-261-0/+16
| | | | | | | | | Add support for setting blocking and non-blocking mode on /dev/rdma_cm by returning success on FIONBIO and FIOASYNC IOCTLs. The actual flags handling is done by the kern_ioctl() function. Reported by: Alex Bowden <alex.bowden@outlook.com> Sponsored by: Mellanox Technologies
* MFC 303766sephe2016-08-261-4/+32
| | | | | | | | | | | | | | | tcp/lro: If timestamps mismatch or it's a FIN, force flush. This keeps the segments/ACK/FIN delivery order. Before this patch, it was observed: if A sent FIN immediately after an ACK, B would deliver FIN first to the TCP stack, then the ACK. This out-of-order delivery causes one unnecessary ACK sent from B. Reviewed by: gallatin, hps Obtained from: rrs, gallatin Sponsored by: Netflix (rrs, gallatin), Microsoft (sephe) Differential Revision: https://reviews.freebsd.org/D7415
* MFC r295632ache2016-08-252-2/+11
| | | | | | | | | | getln: We cannot expand the buffer beyond INT_MAX (_size overflows). In such cases return ENOMEM. This is a limitation of our implementation, alternatively you may consider getline(3). Differential Revision: https://reviews.freebsd.org/D442 (Partial) Obtained from: Apple Inc. (Libc 997.90.3)
* MFC r304286:kib2016-08-241-6/+1
| | | | Remove duplicated code.
* Fix HA mode configuration on FreeBSD 10.x.mav2016-08-241-0/+2
| | | | | This is direct commit, compensating CTLFLAG_RDTUN difference between FreeBSD 10.x and 11.x branches.
* MFC r301724arybchik2016-08-232-3/+3
| | | | | | | | | | | | | sfxge(4): handle negative ticks difference correctly ticks are signed int and if statistics is not updated for a long time (more than INT_MAX ticks, but less than UINT_MAX) difference becomes negative and less than hz for a long time. Other option to repeat is simply load driver (which initializes timestamps to 0) when ticks are negative. Sponsored by: Solarflare Communications, Inc.
* MFC r304232:kib2016-08-231-4/+4
| | | | | In UFS_BALLOC(), invalidate pages of indirect buffers on failed block allocation unwinding.
* MFC r303763,303791,303869: zfs: honour and make use of vfs vnode locking ↵avg2016-08-2310-2341/+863
| | | | | | protocol PR: 209158
* MFC r304231:kib2016-08-231-0/+34
| | | | | | | | On unwind after failed block allocation in ffs_balloc_ufs{1,2}, assert that recorded allocated blocks numbers match the physical block numbers of dandling buffers which are released. When finally freeing the blocks during unwind, assert that dandling buffers where not re-allocated.
* MFC r304229:kib2016-08-231-2/+4
| | | | | When looking up dandling buffers for unwing after failing block allocation in UFS_BALLOC(), there is no need to map them.
* MFC r304228:kib2016-08-231-4/+4
| | | | | When block allocation fails in UFS_BALLOC(), and the volume does not have SU enabled, there is no point in calling softdep_request_cleanup().
* MFC r304227:kib2016-08-231-0/+12
| | | | | In ffs_balloc_ufs{1,2} routines, assert that unwind records do not overflow local arrays.
* MFC r304521: JMicron JMB361 has only a single SATA portavg2016-08-231-1/+1
|
* Direct commit, equal to MFC part of r295632 which is not planned forache2016-08-231-0/+1
| | | | | MFC at whole. Set __SERR on __slbexpand() errors.
* MFC 302379: Correct locking annotation for p_comm.jhb2016-08-221-1/+1
| | | | p_comm is changed during exec, it is not read-only after fork.
* MFC 304476: Fix various nits in the aio operation manpages.jhb2016-08-224-26/+15
| | | | | | | | | | | | | | | | | | - Avoid double use of "request" in a single sentence. Instead, describe aio_sigevent as being used to request notification of the associated operation's completion. This matches the language used to describe aio_sigevent in aio(4). - Simplify the prohibition on modifying buffers while requests are in flight. - Fix case mismatch. - Drop note about not using stack variables. C programmers should be able to figure out if a stack variable is safe based on the later warning about the life cycle requirements of control blocks. - Remove prohibition on modifying the I/O buffer for aio_fsync() since it does not use an I/O buffer. For aio_mlock(), prohibit modifications to the mapping (e.g. due to mprotect, munmap, mmap, etc.) but do not prohibit modifications to the memory backing the buffer (stores into the pages backing the buffer).
* MFC r304440, r304487:markj2016-08-224-7/+8
| | | | Fix some handling of P2_PTRACE_FSTP.
* MFC r304608:bdrewery2016-08-221-1/+1
| | | | | | Bump __FreeBSD_version for C++11 thread_local support in r303795. PR: 192320
* MFC r304174:kib2016-08-221-1/+0
| | | | VOP_FSYNC() does not take cred as an argument. Correct comment.
* MFC 304251sephe2016-08-222-100/+61
| | | | | | | | | | | | | | | | | | hyperv/storvsc: Deliver CAM_SEL_TIMEOUT upon SRB status error. SRB status is set to 0x20 by the hypervisor, if the specified LUN is unaccessible, and even worse the INQUIRY response will not be set by the hypervisor at all under this situation. Additionally, SRB status is 0x20 too, for TUR on an unaccessible LUN. Deliver CAM_SEL_TIMEOUT to CAM upon SRB status errors as suggested by Scott Long, other values seems improper. This commit fixes the Hyper-V disk hotplug support. Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7521
* MFC r298355:mav2016-08-211-1/+3
| | | | | | | | Don't use SYSDIR to avoid conflicts with existing usage. Also, use SRCTOP to locate the top of the source tree instead of a relative path. PR: 208856
* Unbreak the build when MK_TESTS != no after r304527ngie2016-08-211-2/+3
| | | | | | | | | - src.opts.mk should be bsd.own.mk on ^/stable/10 - LIBADD should be DPADD/LDADD on ^/stable/10 Pointyhat to: kib Reported by: Olivier Pinter <oliver.pinter@hardenedbsd.org> Sponsored by: EMC / Isilon Storage Division
* MFC r303795:kib2016-08-209-2/+458
| | | | Add __cxa_thread_atexit(3) API implementation.
* MFC r303794:kib2016-08-201-1/+5
| | | | Create namespace for the symbols added during 12-CURRENT cycle.
* MFC r303147pfg2016-08-201-1/+1
| | | | | | | | | | | binutils: fix "Bad value" error in bfd for MIPS when using -Bsymbolic. From OpenBSD's log: Inspired by https://sourceware.org/ml/binutils/2010-08/msg00333.html, but expressed differently so there are no GPLv3 issues. Obtained from: OpenBSD (CVS rev. 1.7)
* MFC 298950: Fix an off by one error when remapping MSI-X vectors.jhb2016-08-201-2/+2
| | | | | | | | pci_remap_msix() can be used to alter the mapping of allocated MSI-X vectors to the MSI-X table. The code had an off by one error when adding the IRQ resources after performing a remap. This was fatal for any vectors in the table that used the "last" valid IRQ as those vectors were assigned a garbage IRQ value.
* MFC 304018: Add defines needed to export SMBIOS serial numbersjhb2016-08-191-0/+12
| | | | | | | | Some defines needed for exporting serial numbers from the SMBIOS were missed during integration of SMBIOS support in the EFI boot loader (r281138). This is needed for getting the hostid set from the system hardware UUID. PR: 206031
* MFC 303001: Add PTRACE_VFORK to trace vfork events.jhb2016-08-197-2/+187
| | | | | | | | | First, PL_FLAG_FORKED events now also set a PL_FLAG_VFORKED flag when the new child was created via vfork() rather than fork(). Second, a new PL_FLAG_VFORK_DONE event can now be enabled via the PTRACE_VFORK event mask. This new stop is reported after the vfork parent resumes due to the child calling exit or exec. Debuggers can use this stop to reinsert breakpoints in the vfork parent process before it resumes.
* MFC r304008:bdrewery2016-08-191-0/+2
| | | | Avoid taking PROC_LOCK in syscalls if not being traced.
* MFC r303929,r303930,r303931,r303932,r303933:bdrewery2016-08-191-8/+39
| | | | | | | | | | | | | r303929: Fix -S with -b not atomically updating the destination file. r303930: Support -v for -l. r303931: Fix -S with -l not being atomic. r303932: Fix -b failure not restoring flags on the destination file. r303933: Squelch a false-positive Clang static analyzer warning.
* MFC r304152:kp2016-08-191-6/+6
| | | | | | | | | | pf: Add missing byte-order swap to pf_match_addr_range Without this, rules using address ranges (e.g. "10.1.1.1 - 10.1.1.5") did not match addresses correctly on little-endian systems. PR: 211796 Obtained from: OpenBSD (sthen)
* MFC r304012:kib2016-08-191-0/+4
| | | | Fill phdr and phsize for rtld object.
OpenPOWER on IntegriCloud