summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* MFC r269016:pfg2014-07-261-1/+1
| | | | Fix mismatch.
* MFC r261530ian2014-07-254-8/+25
| | | | | | Set the malloc alignment to 64 bytes on platforms that use the U-Boot API device drivers. Recent versions of u-boot run with the MMU enabled, and require DMA-based I/O to be aligned to cache line boundaries.
* MFC r268985, r269001:pfg2014-07-254-5/+5
| | | | | | | | | Avoid possible cast degradation. Assign iov_len first, avoiding the cast to uio_resid (int in stdio) from degrading the value. Small cosmetical fix while here.
* MFC r268643:kevlo2014-07-241-1/+4
| | | | Document that listen(2) can fail with EDESTADDRREQ.
* MFC r262528: Update LLDB snapshot to upstream r202189emaste2014-07-235-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Highlights include (upstream revs in parens): - Improvements to the remote GDB protocol client (r196610, r197579, r197857, r200072, and others) - Bug fixes for big-endian targets (r196808) - Initial support for libdispatch (GCD) queues in the debuggee (r197190) - Add "step-avoid-libraries" setting (r199943) - IO subsystem improvements (including initial work on a curses gui) (r200263) - Support hardware watchpoints on FreeBSD (r201706) - Improved unwinding through hand-written assembly functions (r201839) - Handle DW_TAG_unspecified_parameters for variadic functions (r202061) - Fix Ctrl+C interrupting a running inferior process (r202086, r202154) - Various bug fixes for memory leaks, LLDB segfaults, the C++ demangler, ELF core files, DWARF debug info, and others. Sponsored by: DARPA, AFRL
* MFC r261799: Add bounds check for pteindex / pdeindex to amd64 kvm_minidumpemaste2014-07-231-0/+4
|
* MFC r268928:pfg2014-07-231-1/+1
| | | | | | Const-ify a character string. Obtained from: Apple Inc. (Libc 997.90.3)
* MFC 266424,266476,266524,266573,266595,266626,266627,266633,266641,266642,jhb2014-07-222-0/+119
| | | | | | | | 266708,266724,266934,266935,268521: Emulation of the "ins" and "outs" instructions. Various fixes for translating guest linear addresses to guest physical addresses.
* MFC 266125:jhb2014-07-222-0/+16
| | | | | Implement a PCI interrupt router to route PCI legacy INTx interrupts to the legacy 8259A PICs.
* MFC r268644:pfg2014-07-213-22/+14
| | | | | | | | libc/stdlib: Minor cleanups to code originating in NetBSD Mostly ANSIfication and typos. Obtained from: NetBSD
* MFC r268642:pfg2014-07-212-19/+8
| | | | | | | | | | | | | | | | | | | | libc/gen: small updates to code originating at OpenBSD arc4random.c - CVS rev. 1.22 Change arc4random_uniform() to calculate ``2**32 % upper_bound'' as ``-upper_bound % upper_bound''. Simplifies the code and makes it the same on both ILP32 and LP64 architectures, and also slightly faster on LP64 architectures by using a 32-bit remainder instead of a 64-bit remainder. - CVS rev. 1.23 Spacing readpassphrase.c -CVS rev. v 1.24 most obvious unsigned char casts for ctype Obtained from: OpenBSD
* MFC 264353,264509,264768,264770,264825,264846,264988,265114,265165,265365,jhb2014-07-212-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 265941,265951,266390,266550,266910: Various bhyve fixes: - Don't save host's return address in 'struct vmxctx'. - Permit non-32-bit accesses to local APIC registers. - Factor out common ioport handler code. - Use calloc() in favor of malloc + memset. - Change the vlapic timer frequency to be in the ballpark of contemporary hardware. - Allow the guest to read the TSC via MSR 0x10. - A VMCS is always inactive when it exits the vmx_run() loop. Remove redundant code and the misleading comment that suggest otherwise. - Ignore writes to microcode update MSR. This MSR is accessed by RHEL7 guest. Add KTR tracepoints to annotate wrmsr and rdmsr VM exits. - Provide an alias for the userboot console and name it 'comconsole'. - Use EV_ADD to create an mevent and EV_ENABLE to enable it. - abort(3) the process in response to a VMEXIT_ABORT. - Don't include the guest memory segments in the bhyve(8) process core dump. - Make the vmx asm code dtrace-fbt-friendly. - Allow vmx_getdesc() and vmx_setdesc() to be called for a vcpu that is in the VCPU_RUNNING state. - Enable VMX in the IA32_FEATURE_CONTROL MSR if it not enabled and the MSR isn't locked.
* MFC 263780,264516,265062,265101,265203,265364:jhb2014-07-212-0/+11
| | | | | | | | | | | | Add an ioctl to suspend a virtual machine (VM_SUSPEND). Add logic in the HLT exit handler to detect if the guest has put all vcpus to sleep permanently by executing a HLT with interrupts disabled. When this condition is detected the guest with be suspended with a reason of VM_SUSPEND_HALT and the bhyve(8) process will exit. This logic can be disabled via the tunable 'hw.vmm.halt_detection'.
* MFC: r267376bapt2014-07-202-0/+18
| | | | | | Add a zlib pkg-config file (more and more ports requires it) Approved by: delphij
* MFC: r267131, r267132, r267133, r268493, r268671bapt2014-07-204-8/+46
| | | | | | | | | | Use NULL instead of 0 (Patch by Sascha Wildner <saw at online.de> for Dragonfly) Remove unnecessary semicolons (Patch by Sascha Wildner <saw at online.de> for Dragonfly) Add support for arbitrary http requests [1] Support EAGAIN in fetch_writev Submitted by: Alex Hornung <alex at alexhornung.com> [1] Reviewed by: des
* MFC: r263648, r264789, r266636bapt2014-07-191-0/+1
| | | | | | | | This brings: - schema validation - xpath-like interface for ucl objects Adapt pkg(7) to the new libucl API
* MFC 259942,262274,263035,263054,263211,263744,264179,264324,264468,264631,jhb2014-07-192-0/+38
| | | | | 264648,264650,264651,266572,267558: Flesh out the AT PIC and 8254 PIT emulations and move them into the kernel.
* MFC r268569:pfg2014-07-191-5/+3
| | | | | | | | strfmon: reduce unnecessary snprintf. No need for the snprintf/asprintf dance; use fixed width formats. Obtained from: NetBSD (CVS rev. 1.8)
* MFC r268502:pfg2014-07-1712-39/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sync some (mostly cosmetical) changes from NetBSD Makefile,v 1.37 tc1.c v 1.3 Rename TEST/test.c tc1.c common.c,v 1.23 pass lint on _LP64. emacs.c,v 1.22 pass lint on _LP64. filecomplete.h,v 1.8 mv NetBSD ID back from 1.9 as we don't have the widecharacter support. prompt.c,v 1.14 prompt.h,v 1.9 term.h,v 1.20 read.h,v 1.6 Update NetBSD version strings sys.h,v 1.12 Misc sun stuff. tty.c 1.31 handle EINTR in the termios operations Allow a single process to control multiple ttys (for pthreads using _REENTRANT) using multiple EditLine objects. pass lint on _LP64. Don't depend on side effects inside an assert Obtained from: NetBSD
* MFC r268463:dim2014-07-162-18/+21
| | | | | | | | | | In libproc, avoid calling __cxa_demangle(), and thus depending on either libcxxrt or libsupc++, if WITHOUT_CXX is defined. [1] Noticed by: sbruno [1] However, on stable/10 this is more accurately described by WITHOUT_GNUCXX, so I've changed the test to that instead.
* MFC r268467:kib2014-07-161-3/+9
| | | | Implement sysconf(_SC_GETGR_R_SIZE_MAX) and sysconf(_SC_GETPW_R_SIZE_MAX).
* MFC r267618:wblock2014-07-151-1/+1
| | | | Fix syntax error.
* MFC r268272:pfg2014-07-121-19/+10
| | | | | | | | | | | minor perf enhancement for UTF-8 Reduce some duplicate code. Reference: https://www.illumos.org/issues/628 Obtained from: Illumos
* MFC r267897: MFV r267843:delphij2014-07-112-62/+127
| | | | Update file/libmagic to 5.19.
* MFC r268212:kib2014-07-101-46/+20
| | | | | Note that most errors are possible for all syscalls from utimes(2) family. Minor wording corrections.
* MFC r268393: [mdoc] Fix previous.pluknet2014-07-081-1/+1
|
* MFC 267756:ache2014-07-071-18/+12
| | | | | Merge intermediate OpenBSD v1.25 changes (almost identical to ours) to reduce diff and bump OpenBSD patch level to v1.26.
* MFC r267745, r268268:pfg2014-07-073-8/+22
| | | | | | | | | | | | getopt(3): recognize option:: as GNU extension for "optional options". Also ANSIfy a function declaration. While here update the OpenBSD patch level in getopt_long.c as we already have the corresponding change. Obtained from: NetBSD MFC after: 2 weeks
* MFC r267909: Document EINVAL.pluknet2014-07-032-2/+10
| | | | PR: 191382
* MFC r267912, r267915:ume2014-07-031-13/+29
| | | | | | | - Exclude loopback address rather than loopback interface. - style(9) Spotted by: melifaro
* MFC r267800:ume2014-06-301-1/+2
| | | | | Exclude IPv4 address from doing longest match. It prevented DNS based load balancing.
* MFC r267378:delphij2014-06-301-0/+2
| | | | | Fix path for zlib examples, this have no runtime effect and was overlooked when I was doing zlib update.
* MFC r267627:pfg2014-06-301-38/+20
| | | | | | | | | | | | | | | | | strptime: add support for %t and %n Posix strptime() requires support for %t and %n, which were added to the illumos port. Curiously we were skipping white spaces by default in most other cases making %t meaningless. We now skip spaces in the case of the %e specifier as strftime(3) explicitly adds a space for the single digit case. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html PR: 173421 Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2)
* MFC r261140:pluknet2014-06-271-1/+2
| | | | Add MLINK for fdclosedir.3 to directory.3 and sort fdopendir(3) entry.
* MFC r267630:kib2014-06-261-6/+27
| | | | Add MAP_EXCL flag for mmap(2).
* MFC r267629:kib2014-06-261-11/+6
| | | | Tidy up code of the wrapper.
* MFC r267616, 267640:ume2014-06-251-29/+62
| | | | | | | | | | | | | | | Retooling addrconfig() to exclude addresses on loopback interfaces when looking for configured addresses. This change is based upon the code from the submitter, and made following changes: - Exclude addresses assigned on interfaces which are down, like NetBSD does. - Exclude addresses assigned on interfaces which are ifdisabled. Use SOCK_CLOEXEC. PR: 190824 Submitted by: Justin McOmie
* MFC r267601:pfg2014-06-233-184/+186
| | | | | | stdtime: style(9) fixes. Obtained from: illumos
* MFC r267544:pfg2014-06-201-28/+5
| | | | | | | | | | | | | | | | | | | | | Update license to strptime(3) implementation. Our strptime(3) implementation was the base for the illumos implementation and after contacting the author, Kevin Rudy stated the code is under a 2-Clause BSD License [1] After reviewing our local changes to the file in question, the FreeBSD Foundation has agreed that their contributions to this file are not required to carry clause 3 or 4 so the file can be relicensed as in Illumos [2]. References: [1] https://www.illumos.org/issues/357 [2] Illumos Revision: 13222:02526851ba75 Approved: core (jhb) Approved: FreeBSD Foundation (emaste)
* MFC r267436-267439:tijl2014-06-204-11/+7
| | | | | | | | | | | | | | | | | | - Replace malloc+memset with calloc. - iconv_open(3): initialise ci_ilseq_invalid field of _citrus_iconv_shared struct after allocation with malloc. - iconvlist(3): reduce a memory leak by copying strings only once. - iconv(1): - Make invalids variable local to do_conv such that it prints the number of invalid characters of the current file instead of an accumulated value. - Make do_conv return an error when invalid characters have been found. Return EXIT_FAILURE from main if any file contained invalid characters. This matches the behaviour of GNU iconv. - Mark usage with __dead2 attribute. - Make the long_options array const. Tested by: Pavel Timofeev <timp87@gmail.com>
* MFC r267062:kib2014-06-181-1/+45
| | | | Disable existing uncore hwpmc code for Nehalem and Westmere EX.
* MFC r267335:dim2014-06-141-32/+43
| | | | | | | | | In some scenarios, when generating llvm/clang .inc.h files, multiple source files could be passed to tblgen or clang-tblgen, leading to a "Too many positional arguments specified" error message. Fix this by replacing the too-generic ${.ALLSRC} sources with explicit paths. Reported by: rysto32@gmail.com, rodrigc
* MFC r266865;pfg2014-06-141-2/+2
| | | | | | | | | | | | | | | | Fix strcasecmp_l() and strncasecmp_l() POSIX 2008 compliance. POSIX.1-2008 specifies that those two functions should be declared by including <strings.h>, not <string.h> (the latter only has strcoll_l() and strxfrm_l()): http://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html Bump __FreeBSD_version for ports that may be using the non-standard reference. Obtained from: DragonFlyBSD Reviewed by: theraven
* MFC r263191:hselasky2014-06-131-0/+13
| | | | Add libusb_log_level enum.
* MFC 261638,262144,262506,266765:jhb2014-06-122-20/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Add virtualized XSAVE support to bhyve which permits guests to use XSAVE and XSAVE-enabled features like AVX. - Store a per-cpu guest xcr0 register and handle xsetbv VM exits by emulating the instruction. - Only expose XSAVE to guests if XSAVE is enabled in the host. Only expose a subset of XSAVE features currently supported by the guest and for which the proper emulation of xsetbv is known. Currently this includes X87, SSE, AVX, AVX-512, and Intel MPX. - Add support for injecting hardware exceptions into the guest and use this to trigger exceptions in the guest for invalid xsetbv operations instead of potentially faulting in the host. - Queue pending exceptions in the 'struct vcpu' instead of directly updating the processor-specific VMCS or VMCB. The pending exception will be delivered right before entering the guest. - Rename the unused ioctl VM_INJECT_EVENT to VM_INJECT_EXCEPTION and restrict it to only deliver x86 hardware exceptions. This new ioctl is now used to inject a protection fault when the guest accesses an unimplemented MSR. - Expose a subset of known-safe features from leaf 0 of the structured extended features to guests if they are supported on the host including RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM. Aside from AVX-512, these features are all new instructions available for use in ring 3 with no additional hypervisor changes needed.
* MFC 261504:jhb2014-06-122-2/+167
| | | | Add support for FreeBSD/i386 guests under bhyve.
* MFC 260239,261268,265058:jhb2014-06-122-0/+8
| | | | | | Expand the support for PCI INTx interrupts including providing interrupt routing information for INTx interrupts to I/O APIC pins and enabling INTx interrupts in the virtio and AHCI backends.
* MFC r260913,266895:nwhitehorn2014-06-081-0/+35
| | | | | | | | | | Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles
* MFC r266609:kib2014-06-072-4/+30
| | | | Change the _rtld_atfork() to lock the bind lock in write mode.
* MFC r264417: realpath(): Properly fail "." or ".." components afterjilles2014-06-061-20/+6
| | | | | | | | | | | | | | non-directories. If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..", it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as they should. Also, put the check for non-directories after lstatting the previous component instead of when the empty component (consecutive or trailing slashes) is detected, saving an lstat() call and some lines of code. PR: 82980
OpenPOWER on IntegriCloud