summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add strchrnul(), a GNU function similar to strchr(), except that it returnszeising2013-02-134-5/+81
| | | | | | | a pointer to the end of the string, rather than NULL, if the character was not found. Approved by: theraven
* Make the F_READAHEAD option to fcntl(2) work as documented: a value of zeroian2013-02-131-2/+2
| | | | | | | | now disables read-ahead. It used to effectively restore the system default readahead hueristic if it had been changed; a negative value now restores the default. Reviewed by: kib
* When clang builds libc it may insert calls to __aeabi_* functions. Normallyandrew2013-02-121-0/+19
| | | | | | | | | | this is not a problem as they are resolved by libgcc. The exception is for the __aeabi_mem* functions. These call back into libc to the appropriate function. This causes issues for static binaries as we only link against libc once so there is no way for it to call into libgcc and back. The fix for this is to include these symbols in libc but keep them hidden so binaries use the libgcc version.
* Allow us to build clang for ARM EABI. Clang and llvm use theandrew2013-02-121-1/+9
| | | | | | | arm-gnueabi-freebsd10.0 triple for EABI. Use this when we are on arm or armv6 and are building for EABI. Reviewed by: dim
* Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'.neel2013-02-112-30/+0
| | | | | | | | | | | | | | Prior to this change pinning was implemented via an ioctl (VM_SET_PINNING) that called 'sched_bind()' on behalf of the user thread. The ULE implementation of 'sched_bind()' bumps up 'td_pinned' which in turn runs afoul of the assertion '(td_pinned == 0)' in userret(). Using the cpuset affinity to implement pinning of the vcpu threads works with both 4BSD and ULE schedulers and has the happy side-effect of getting rid of a bunch of code in vmm.ko. Discussed with: grehan
* fts: Use O_DIRECTORY when opening name that might be changed by attacker.jilles2013-02-101-1/+2
| | | | | | | | There are uncommon cases where fts_safe_changedir() may be called with a non-NULL name that is not "..". Do not block or worse if an attacker put (a (symlink to) a fifo or device where a directory used to be. MFC after: 1 week
* Improve code style. No functional change.tuexen2013-02-101-7/+7
| | | | MFC after: 3 days
* sigqueue(2): Fix typo (EEPERM -> EPERM).jilles2013-02-101-1/+1
| | | | MFC after: 3 days
* Fix logic inversion.eadler2013-02-091-1/+1
| | | | | | PR: docs/174966 Submitted by: Christian Ullrich <chris+freebsd@chrullrich.net> Approved by: bcr (mentor)
* mdoc: Remove EOL whitespace.joel2013-02-091-1/+1
|
* Document the detail of interaction between vfork and PT_TRACEME.kib2013-02-071-1/+11
| | | | MFC after: 2 weeks
* Document the ERESTART translation to EINTR for devfs nodes.kib2013-02-071-1/+12
| | | | | Based on the submission by: jilles MFC after: 2 weeks
* Add the __aeabi_mem* functions to compiler-rt as clang uses them.andrew2013-02-061-0/+4
|
* * Add the integer div & mod functions and ARM EABI support functions toandrew2013-02-051-0/+13
| | | | | | libstand. * Stop linking the ARM U-Boot loader against libgcc now libstand has the required symbols.
* Sort by MK_* knob like the comment saysdes2013-02-041-5/+5
| | | | MFC after: 1 week
* Add several missing symbols to libcxxrt's symbol version map, and removedim2013-02-031-14/+12
| | | | | | | | | a few duplicates. This should fix building world with -stdlib=libc++ after r246028. Submitted by: Yamaya Takashi <yamayan@kbh.biglobe.ne.jp> MFC after: 1 week X-MFC-With: r246028
* Pull in r170135 from upstream clang trunk:dim2013-02-0264-8/+147
| | | | | | | | | | | | | | | | Dont use/link ARCMT, StaticAnalyzer and Rewriter to clang when the user specifies not to. Dont build ASTMatchers with Rewriter disabled and StaticAnalyzer when it's disabled. Without all those three, the clang binary shrinks (x86_64) from ~36MB to ~32MB (unstripped). To disable these clang components, and get a smaller clang binary built and installed, set WITHOUT_CLANG_FULL in src.conf(5). During the initial stages of buildworld, those extra components are already disabled automatically, to save some build time. MFC after: 1 week
* - Fix more style(9)-related issues (copyright header, spaces after functiongahr2013-02-011-56/+55
| | | | | | | | | names, unnecessary casts) - Change type of boolean variable from char to bool Suggested by: jhb, zont, jmallett Reviewed by: cognet Approved by: cognet
* Update hwpmc to support the Xeon class of Ivybridge processors.sbruno2013-01-316-1/+938
| | | | | | | | | | | | | | case 0x3E: /* Per Intel document 325462-045US 01/2013. */ Add manpage to document all the goodness that is available in this processor model. No support for uncore events at this time. Submitted by: hiren panchasara <hiren.panchasara@gmail.com> Reviewed by: davide, jimharris, sbruno Obtained from: Yahoo! Inc. MFC after: 2 weeks
* - Remove underscores from the internal structure name, as it doesn't collidegahr2013-01-312-32/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with the user's namespace. - Correct size and position variables type from long to size_t. - Do not set errno to ENOMEM on malloc failure, as malloc already does so. - Implement the concept of "buffer data length", which mandates what SEEK_END refers to and the allowed extent for a read. - Use NULL as read-callback if the buffer is opened in write-only mode. Conversely, use NULL as write-callback when opened in read-only mode. - Implement the handling of the ``b'' character in the mode argument. A binary buffer differs from a text buffer (default mode if ``b'' is omitted) in that NULL bytes are never appended to writes and that the "buffer data length" equals to the size of the buffer. - Remove shall from the man page. Use indicative instead. Also, specify that the ``b'' flag does not conform with POSIX but is supported by glibc. - Update the regression test so that the ``b'' functionality and the "buffer data length" concepts are tested. - Minor style(9) corrections. Suggested by: jilles Reviewed by: cognet Approved by: cognet
* Add fmemopen(3), an interface to get a FILE * from a buffer in memory, alonggahr2013-01-304-7/+224
| | | | | | | | with the respective regression test. See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fmemopen.html Reviewed by: cognet Approved by: cognet
* Rework the __vdso_* symbols attributes to only make the symbols weak,kib2013-01-3016-5/+325
| | | | | | | | | | but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions. Reported by: bde Tested by: marius (sparc64) MFC after: 2 weeks
* Remove unused file.glebius2013-01-291-261/+0
|
* - Compute the correct size to reallocate when doubling the size of thejhb2013-01-281-1/+2
| | | | | | | | | array of loaded objects to avoid a buffer overrun. - Use reallocf() to avoid leaking memory if the realloc() fails. PR: kern/175648 Submitted by: yuri@rawbw.com (1) MFC after: 1 week
* Fix some symbol version mismatches between libstdc++ and libsupc++/libcxxrttheraven2013-01-281-56/+46
| | | | | | | | | | | | | | | | | that were causing the runtime and STL libraries to see different versions of various classes and functions when libstdc++ is used as a filter. Note: This changes the ABI for libcxxrt, but libcxxrt is currently only in -STABLE for testing and is not used by anything unless explicitly enabled by the end user. No default compiler configurations use it. libc++ will need to be recompiled after this change. make buildworld will do this automatically, but make in lib/libc++ will not necessarily work unless the new libcxxrt is installed first. PR: kern/171610, stand/175453 Reviewed by: kib MFC after: 1 week
* Only install manpages and html documentation in the ncurses/*w (wchar)brooks2013-01-244-4/+16
| | | | | builds so that it is only installed once. This is consistent with the existing decision to only install headers in the that case.
* Remove several MLINKS that were listed twice.brooks2013-01-231-7/+0
|
* posix_fadvise(2) first appeared in FreeBSD 9.1glebius2013-01-231-1/+1
|
* Note that SIGCHLD is special and if ignored, won't be recorded by the filter.pjd2013-01-211-2/+4
|
* Add the required __aeabi_* functions to libc.andrew2013-01-197-0/+361
| | | | | The floating point functions are here rather than compiler-rt because the libc softfloat code allows us to set the rounding mode.
* Merge projects/bhyve to head.neel2013-01-195-0/+1027
|\ | | | | | | | | | | | | | | | | 'bhyve' was developed by grehan@ and myself at NetApp (thanks!). Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their support and encouragement. Obtained from: NetApp
| * IFC @ r245509neel2013-01-178-30/+38
| |\
| * \ IFC @ r245178neel2013-01-099-30/+17
| |\ \
| * \ \ IFC @ r244983.neel2013-01-0483-5837/+2005
| |\ \ \
| * \ \ \ IFC @r243836neel2012-12-0444-134/+284
| |\ \ \ \
| * \ \ \ \ IFC @ r243164neel2012-11-1715-59/+403
| |\ \ \ \ \
| * \ \ \ \ \ IFC @ r242940neel2012-11-139-5/+93
| |\ \ \ \ \ \
| * \ \ \ \ \ \ IFC @ r242684neel2012-11-11253-7496/+4868
| |\ \ \ \ \ \ \
| * | | | | | | | Remove mptable generation code from libvmmapi and move it to bhyve.grehan2012-10-265-528/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firmware tables require too much knowledge of system configuration, and it's difficult to pass that information in general terms to a library. The upcoming ACPI work exposed this - it will also livein bhyve. Also, remove code specific to NetApp from the mptable name, and remove the -n option from bhyve. Reviewed by: neel Obtained from: NetApp
| * | | | | | | | Add an api to map a vm capability type into a string to be used for displayneel2012-10-122-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | purposes.
| * | | | | | | | The ioctl VM_GET_MEMORY_SEG is no longer able to return the host physicalneel2012-10-042-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | address associated with the guest memory segment. This is because there is no longer a 1:1 mapping between GPA and HPA. As a result 'vmmctl' can only display the guest physical address and the length of the lowmem and highmem segments.
| * | | | | | | | Change vm_malloc() to map pages in the guest physical address space in 4KBneel2012-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chunks. This breaks the assumption that the entire memory segment is contiguously allocated in the host physical address space. This also paves the way to satisfy the 4KB page allocations by requesting free pages from the VM subsystem as opposed to hard-partitioning host memory at boot time.
| * | | | | | | | Add ioctls to control the X2APIC capability exposed by the virtual machine toneel2012-09-252-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the guest. At the moment this simply sets the state in the 'vcpu' instance but there is no code that acts upon these settings.
| * | | | | | | | Add sysctls to display the total and free amount of hard-wired mem for VMsgrehan2012-08-262-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # sysctl hw.vmm hw.vmm.mem_free: 2145386496 hw.vmm.mem_total: 2145386496 Submitted by: Takeshi HASEGAWA hasegaw at gmail com
| * | | | | | | | Allow the 'bhyve' process to control whether or not the virtual machine sees anneel2012-08-044-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ioapic. Obtained from: NetApp
| * | | | | | | | API to map an apic id to the vcpu.neel2012-08-042-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment this is a simple mapping because the numerical values are identical.
| * | | | | | | | There is no need to explicitly specify the CR4_VMXE bit when writing to guestneel2012-08-042-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CR4. This bit is specific to the Intel VTX and removing it makes the library more portable to AMD/SVM. In the Intel VTX implementation, the hypervisor will ensure that this bit is always set. See vmx_fix_cr4() for details. Suggested by: grehan
| * | | | | | | | IFC @ r238370grehan2012-07-11312-2782/+6821
| |\ \ \ \ \ \ \ \
| * | | | | | | | | MSI-x interrupt support for PCI pass-thru devices.grehan2012-04-282-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes instruction emulation for memory r/w access. This opens the door for io-apic, local apic, hpet timer, and legacy device emulation. Submitted by: ryan dot berryhill at sandvine dot com Reviewed by: grehan Obtained from: Sandvine
| * | | | | | | | | IFC @ r234692grehan2012-04-26489-5606/+9813
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sys/amd64/include/cpufunc.h sys/amd64/include/fpu.h sys/amd64/amd64/fpu.c sys/amd64/vmm/vmm.c - Add API to allow vmm FPU state init/save/restore. FP stuff discussed with: kib
OpenPOWER on IntegriCloud