aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* To avoid having to explicitly test COMPILER_TYPE for settingDimitry Andric2013-12-221-3/+1
| | | | | | | | | | | | | | | | | | clang-specific or gcc-specific flags, introduce the following new variables for use in Makefiles: CFLAGS.clang CFLAGS.gcc CXXFLAGS.clang CXXFLAGS.gcc In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for the right compiler. MFC after: 1 week Notes: svn path=/head/; revision=259730
* Fix readdir for the root directory on a FAT32 file system. The rootMarcel Moolenaar2013-12-192-5/+16
| | | | | | | | | | | | | directory is like any subdirectory and as such needs to use a real cluster number. To this end, keep a DE structure for the root in the DOS_FS structure and populate it accordingly. While here: o allow consecutive path separators by skipping them all. o add missing $FreeBSD$ keyword to dosfs.h. Notes: svn path=/head/; revision=259590
* Fix an inappropriate free of a non-dynamic value. While here, make theMarcel Moolenaar2013-12-181-9/+12
| | | | | | | | | | | | | | | | | | | | code more naive and robust: 1. When setting ev_value, also always set ev_flags appropriately 2. Always check ev_value and ev_flags before calling free. Both the value and the EV_DYNAMIC property can come directly from the consumers of the environment functionality, so it's good to be careful. And since this code is typically not looked at for long periods of time, it's good to have it be a little "dumb-looking". Trigger case for the bug: env_setenv("foo", 0, "1", NULL, NULL); env_setenv("foo", 0, "2", NULL, NULL); Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=259561
* shm_open(2): Fixed the history information.Ruslan Ermilov2013-12-181-3/+3
| | | | | | | | | While here, sort xrefs. Reviewed by: jhb Notes: svn path=/head/; revision=259548
* Clear f_rabuf after freeing the memory it points to. This prevents aMarcel Moolenaar2013-12-181-1/+3
| | | | | | | | | possible double free. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=259540
* Support long filenames.Marcel Moolenaar2013-12-181-13/+24
| | | | | | | Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=259539
* Rename the ambiguously named 'vm_setup_msi()' and 'vm_setup_msix()' toNeel Natu2013-12-182-8/+9
| | | | | | | | | 'vm_setup_pptdev_msi()' and 'vm_setup_pptdev_msix()' respectively. It should now be clear that these functions operate on passthru devices. Notes: svn path=/head/; revision=259537
* Add an API to deliver message signalled interrupts to vcpus. This allowsNeel Natu2013-12-162-6/+19
| | | | | | | | | | | callers treat the MSI 'addr' and 'data' fields as opaque and also lets bhyve implement multiple destination modes: physical, flat and clustered. Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) Reviewed by: grehan@ Notes: svn path=/head/; revision=259482
* Enable llvm's integrated assembler for PowerPC, since it should now beDimitry Andric2013-12-164-0/+20
| | | | | | | | | | good enough for typical usage. Requested by: rdivacky MFC after: 1 week Notes: svn path=/head/; revision=259473
* MFp4 @1189139:Pawel Jakub Dawidek2013-12-153-29/+5
| | | | | | | | | | | | | | Get rid of the msg_peek() function, which has a problem. If there was less data in the socket buffer than requested by the caller, the function would busy loop, as select(2) will always return immediately. We can just receive nvlhdr now, because some time ago we splitted receive of data from the receive of descriptors. MFC after: 1 week Notes: svn path=/head/; revision=259430
* Bump libcam shared library version forgotten in r259397.Nathan Whitehorn2013-12-151-1/+1
| | | | | | | Submitted by: kib Notes: svn path=/head/; revision=259416
* getopt_long.3: wording quibblesEitan Adler2013-12-131-2/+2
| | | | | | | | | | - Make wording more clear: "is expect" vs "is expected" [1] - Remove extraneous trailing period.. Reported by: dim [1] Notes: svn path=/head/; revision=259340
* Replace Sun RPC license with a 3-clause BSD license. This license changeHiroki Sato2013-12-098-211/+211
| | | | | | | | was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. Notes: svn path=/head/; revision=259118
* Do not force to run atexit handlers, which text comes from a dsoKonstantin Belousov2013-12-061-5/+10
| | | | | | | | | | | | | | | | | | | | owning the handle passed to __cxa_finalize() but which are registered by other dso, when the process is inside exit(3). Running them makes the destruction order wrong, and there is hope that such destructors would not call dlclose(3), since it is pointless at this stage of the process existence. The change effectively disables the r211706 after the exit(3) is called. Reported and tested by: Michael Gmelin <freebsd@grem.de> Analyzed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=259042
* mdoc: remove EOL whitespace.Joel Dahl2013-12-061-2/+2
| | | | Notes: svn path=/head/; revision=259041
* lldb: Threaded inferior support for FreeBSDEd Maste2013-12-031-1/+2
| | | | | | | | | | | | | This is in the process of being submitted to the upstream LLDB repository. The thread list functionality is modelled in part on GDBRemoteCommunicationClient. LLDB bug pr16696 and code review D2267 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=258892
* Various updates and tweaks to the wait(2) manpage.John Baldwin2013-12-031-132/+174
| | | | | | | | | PR: docs/183904 Submitted by: Michael Galassi <michaelgalassi@gmail.com> Reviewed by: kib, wblock (earlier version) Notes: svn path=/head/; revision=258891
* Update LLDB to upstream r196259 snapshotEd Maste2013-12-032-0/+4
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=258884
* Fix comparisons in assertions.Pawel Jakub Dawidek2013-12-031-4/+4
| | | | | | | | Reported by: Coverity Coverity CID: 1130048 Notes: svn path=/head/; revision=258866
* Both libcasper and libcapsicum libraries have to be installed in /lib/,Pawel Jakub Dawidek2013-12-022-0/+2
| | | | | | | as they are used by /sbin/casperd. Notes: svn path=/head/; revision=258850
* Forgot to 'svn add' lib/libcasper/ directory.Pawel Jakub Dawidek2013-12-024-0/+576
| | | | | | | Reported by: glebius Notes: svn path=/head/; revision=258843
* Please welcome casperd daemon. It (and its services) will be responsible forPawel Jakub Dawidek2013-12-0218-0/+2471
| | | | | | | | | | | | | | | | | | | | | | giving access to functionality that is not available in capability mode sandbox. The functionality can be precisely restricted. Start with the following services: - system.dns - provides API compatible to: - gethostbyname(3), - gethostbyname2(3), - gethostbyaddr(3), - getaddrinfo(3), - getnameinfo(3), - system.grp - provides getgrent(3)-compatible API, - system.pwd - provides getpwent(3)-compatible API, - system.random - allows to obtain entropy from /dev/random, - system.sysctl - provides sysctlbyname(3-compatible API. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=258838
* chmod(2): Document S_ISVTX following SUSv3/SUSv4.Jilles Tjoelker2013-12-011-10/+16
| | | | | | | | | S_ISTXT is non-standard. While here, also update fchmodat() standards entry to POSIX.1-2008. Notes: svn path=/head/; revision=258794
* waitid(2): Do not tell userland programmers to include <sys/signal.h>.Jilles Tjoelker2013-12-011-1/+1
| | | | | | | Userland should get these definitions by including <signal.h>. Notes: svn path=/head/; revision=258793
* Move my simple logging API to a separate library. It is now already usedPawel Jakub Dawidek2013-12-014-1/+1006
| | | | | | | | | | | | | by hastctl(8), hastd(8) and auditdistd(8) and will soon be also used by casperd(8) and its services. There is no documentation and pjdlog.h header file is not installed in /usr/include/ to keep it private. Unfortunately we don't have /lib/private/ at this point, only /usr/lib/private/, so the library is installed in /lib/. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=258791
* Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thisEitan Adler2013-11-303-5/+5
| | | | | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva Notes: svn path=/head/; revision=258780
* Make process descriptors standard part of the kernel. rwhod(8) alreadyPawel Jakub Dawidek2013-11-301-6/+0
| | | | | | | | | | | requires process descriptors to work and having PROCDESC in GENERIC seems not enough, especially that we hope to have more and more consumers in the base. MFC after: 3 days Notes: svn path=/head/; revision=258768
* Note that libstand is 32-bit on amd64 and powerpc64Ed Maste2013-11-291-0/+4
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=258741
* Fix some misinformation in netgraph manual pages.Gleb Smirnoff2013-11-281-2/+2
| | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com> Notes: svn path=/head/; revision=258702
* Fix double free().Pawel Jakub Dawidek2013-11-251-3/+1
| | | | | | | | Reported by: Coverity Coverity CID: 1130048 Notes: svn path=/head/; revision=258594
* Move the iconv wrapper source from libc_nonshared to libc/iconv so thatPeter Wemm2013-11-2517-331/+350
| | | | | | | | | | | it is all in the one place again. Rename libc/iconv/iconv.c to bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT works again. Discussed with: kib (and partly stolen from his patch) Notes: svn path=/head/; revision=258587
* There is no file under SISSL after license replacement in r258581.Hiroki Sato2013-11-251-335/+0
| | | | Notes: svn path=/head/; revision=258582
* Replace Sun Industry Standards Source License for Sun RPC code with aHiroki Sato2013-11-252-89/+48
| | | | | | | | | 3-clause BSD license as specified by Oracle America, Inc. in 2010. This license change was approved by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. Notes: svn path=/head/; revision=258581
* Add HPET device emulation to bhyve.Neel Natu2013-11-252-0/+15
| | | | | | | | | | | | | | bhyve supports a single timer block with 8 timers. The timers are all 32-bit and capable of being operated in periodic mode. All timers support interrupt delivery using MSI. Timers 0 and 1 also support legacy interrupt routing. At the moment the timers are not connected to any ioapic pins but that will be addressed in a subsequent commit. This change is based on a patch from Tycho Nightingale (tycho.nightingale@pluribusnetworks.com). Notes: svn path=/head/; revision=258579
* Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,Hiroki Sato2013-11-2551-1333/+1305
| | | | | | | with the explicit permission of Sun Microsystems in 2009. Notes: svn path=/head/; revision=258578
* pmc(3) does not document a dependency on <sys/types.h> but <pmc.h>Ryan Stone2013-11-251-0/+1
| | | | | | | | | requires it, so include it explicitly from <pmc.h>. MFC after: 1 month Notes: svn path=/head/; revision=258572
* Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQHiroki Sato2013-11-254-1/+43
| | | | | | | | | | | | | | | when there is an invalid character in the output codeset while it is valid in the input. However, POSIX requires iconv() to perform an implementation-defined conversion on the character. So, Citrus iconv converts such a character to a special character which means it is invalid in the output codeset. This is not a problem in most cases but some software like libxml2 depends on GNU's behavior to determine if a character is output as-is or another form such as a character entity (&#NNN;). Notes: svn path=/head/; revision=258537
* Get rid of the CONCAT macro.Andreas Tobler2013-11-232-19/+19
| | | | Notes: svn path=/head/; revision=258502
* If check_deferred_signal() execution needs binding of PLT symbol,Konstantin Belousov2013-11-232-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | unlocking the rtld bind lock results in the processing of ast and recursing into the check_deferred_signal(). Nested execution of check_deferred_signal() delivers the signal to user code and clears si_signo. On return, top-level check_deferred_signal() frame continues delivering the same signal one more time, but now with zero si_signo. Fix this by adding a flag to indicate that deferred delivery is running, so check_deferred_signal() should avoid doing anything. Since user signal handler is allowed to modify the passed machine context to make return from the signal handler to cause arbitrary jump, or do longjmp(). For this case, also clear the flag in thr_sighandler(), since kernel signal delivery means that nested delivery code should not run right now. Reported by: Vitaly Magerya <vmagerya@gmail.com> Reviewed by: davidxu, jilles Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=258499
* Add an ioctl to assert and deassert an ioapic pin atomically. This will be usedNeel Natu2013-11-232-0/+12
| | | | | | | | | | | | to inject edge triggered legacy interrupts into the guest. Start using the new API in device models that use edge triggered interrupts: viz. the 8254 timer and the LPC/uart device emulation. Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) Notes: svn path=/head/; revision=258494
* Replace the WEAK_ALIAS() alias with the WEAK_REFERENCE() alias. Use it andAndreas Tobler2013-11-219-34/+22
| | | | | | | | | get rid of the __CONCAT and CNAME macros. Reviewed by: bde, kib Notes: svn path=/head/; revision=258451
* Introduce a WEAK_REFERENCE() alias and use it. Get rid of the CNAME and theAndreas Tobler2013-11-219-39/+23
| | | | | | | | | CONCAT macros in SYS.h. Reviewed by: bde, kib Notes: svn path=/head/; revision=258447
* Catch up with OpenPAM Nummularia.Sergey Kandaurov2013-11-211-1/+1
| | | | | | | | | | This fixes libpam for build32 target to dlopen() pam libraries in /usr/lib32. Reviewed by: des (a while ago) MFC after: 1 week Notes: svn path=/head/; revision=258444
* Fix build with GCCBryan Drewery2013-11-191-1/+2
| | | | | | | | | | | | | SSL_set_tlsext_host_name(3) internally does not modify the host buffer pased to it. So it is safe to DECONST the struct url* here. Reported by: gjb Approved by: bapt (implicit) MFC after: 1 week X-MFC-With: r258347 Notes: svn path=/head/; revision=258349
* Support SNI in libfetchBryan Drewery2013-11-191-0/+9
| | | | | | | | | | | | | | | | SNI is Server Name Indentification which is a protocol for TLS that indicates the host that is being connected to at the start of the handshake. It allows to use Virtual Hosts on HTTPS. Submitted by: sbz Submitted by: Michael Gmelin <freebsd@grem.de> [1] PR: kern/183583 [1] Reviewed by: des Approved by: bapt MFC after: 1 week Notes: svn path=/head/; revision=258347
* Bug fixes in iconv(3) UTF-7 support.Tijl Coosemans2013-11-181-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add ' to the list of directly encoded characters and * to the list of optionally directly encoded characters as per RFC 2152. - In _citrus_UTF7_mbtoutf16 on end of input when the next output character has only been partially decoded, save a copy of the buffer of input characters (not just its length). On the next call with more input characters this buffer is reprocessed together with the new input to form a fully decoded output character. - At the end of a base64 encoded sequence fully discard '-' (BASE64_OUT) by decrementing psenc->chlen and i. This is needed to make room in psenc->ch (input buffer) in case the next input character starts a new base64 encoded sequence. And also, if this is the end of input and no output character can be returned, this brings the encoder in the initial state as indicated by _citrus_UTF7_stdenc_get_state_desc_generic which is used by the caller to distinguish between no output and partial output. - In _citrus_UTF7_mbrtowc_priv pass the s parameter (input pointer) directly to _citrus_UTF7_mbtoutf16 instead of a copy (s0). This way s is updated correctly in case of errors. - In _citrus_UTF7_mbrtowc_priv when called with psenc->surrogate set (previous call did not have enough input), retrieve the previously decoded UTF-16 character from (psenc->cache >> psenc->bits) instead of (psenc->cache >> 2). MFC after: 5 days Notes: svn path=/head/; revision=258316
* MFV: Import atf-0.18.Julio Merino2013-11-173-3/+4
| | | | | | | Approved by: rpaulo (mentor) Notes: svn path=/head/; revision=258289
* Fix the build of some ATF tests.Julio Merino2013-11-173-8/+8
| | | | | | | | | | | | | | | | When building various programs from a single Makefile, program-specific variables are of the form <VAR>.<PROG>, not <VAR>_<PROG>. Fix this obvious typo to fix the build when WITH_TESTS=yes. I am not sure how this ever worked before given that manual inspection of bsd.progs.mk clearly shows that the expected character between the two components is a dot and not an underscore... but I suspect the changes in r258095 exposed this oddity. Approved by: rpaulo (mentor) Notes: svn path=/head/; revision=258285
* Attempt to move the POSIX iconv* symbols out of runtime linker space.Peter Wemm2013-11-1720-42/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD systems usually implemented this as a third party module and our implementation hasn't played as nicely with the old way as it could have. To that end: * Rename the iconv* symbols in libc.so.7 to have a __bsd_ prefix. * Provide .symver compatability with existing 10.x+ binaries that referenced the iconv symbols. All existing binaries should work. * Like on Linux/glibc systems, add a libc_nonshared.a to the ldscript at /usr/lib/libc.so. * Move the "iconv*" wrapper symbols to libc_nonshared.a This should solve the runtime ambiguity about which symbols resolve to where. If you compile against the iconv in libc, your runtime dependencies will be unambiguous. Old 9.x libraries and binaries will always resolve against their libiconv.so.3 like they did on 9.x. They won't resolve against libc. Old 10.x binaries will be satisified by the .symver helpers. This should allow ports to selectively compile against the libiconv port if needed and it should behave without ambiguity now. Discussed with: kib Notes: svn path=/head/; revision=258283
* Add missing include files for the printf_l and scanf_l man pages.Eitan Adler2013-11-172-0/+2
| | | | | | | Reported by: swildner@dragonflybsd.org Notes: svn path=/head/; revision=258245