summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r306266 (by emaste):dim2016-12-252-218/+218
| | | | | | | | | | | | | | | libcompiler_rt: use ${SRCTOP} for the top of the FreeBSD tree MFC r306377 (by emaste): libcompiler_rt: move file list to Makefile.inc for reuse elsewhere Also switch to the style used in the clang390-import branch to reduce future conflicts. Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8039
* MFC r310186,r310187:ngie2016-12-241-1/+9
| | | | | | | | | | | | | | | r310186: Install the lib/libelftc manpages Some other manpages, e.g. c++filt reference these r310187: Remove lib/libelf's manpages if MK_TOOLCHAIN == no Add a comment to help figure out which set is lib/libelf's and which set is lib/libelftc's
* MFH (r309269): use malloc()ed buffers instead of stack buffersdes2016-12-232-26/+48
|
* MFC r307521: libmd: introduce functions that operate on fd instead of filenameemaste2016-12-215-10/+64
|
* MFC r309650:ed2016-12-202-2/+9
| | | | | | | | | Properly sign extend the result of jrand48() and mrand48(). These functions are supposed to return a value between [-2^31, 2^31). This doesn't seem to work on 64-bit systems, where we return a value between [0, 3^32). Patch up the function to use proper casts to int32_t. While there, fix some other style bugs.
* MFC r307774:trasz2016-12-191-2/+2
| | | | | | | Fix libusb20_dev_get_desc(3) to use the "vendor product" order, not "product vendor". This is consistent with how it's generally done. The ordering is visible eg in usbconfig(8) output.
* MFC r308386:trasz2016-12-191-1/+3
| | | | | Document that getfsstat(2) called with MNT_NOWAIT skips file systems that are in the process of being unmounted.
* MFC r309683:tuexen2016-12-181-1/+1
| | | | | Fix a bug in sctp_sendmsgx(), where the sid provided by the user was hot honored.
* MFC r308806asomers2016-12-162-2/+2
| | | | | | | | | | Speed up pw operations that edit /etc/group or /etc/passwd r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group corruption on power loss. However, it fixed it by opening those files with O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC with appropriately placed fsync()s instead, which is much faster. Using a ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s.
* MFC r309676vangyzen2016-12-151-2/+0
| | | | | | | | | | | | | Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC
* MFH (r308996, r309051, r309738): refactor, avoid repeating DNS requestsdes2016-12-143-54/+124
|
* MFC r309460vangyzen2016-12-131-14/+11
| | | | | | | | | | | | | | | thr_set_name(): silently truncate the given name as needed Instead of failing with ENAMETOOLONG, which is swallowed by pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1 bytes. This is more likely what the user wants, and saves the caller from truncating it before the call (which was the only recourse). Polish pthread_set_name_np(3) and add a .Xr to thr_set_name(2) so the user might find the documentation for this behavior. Sponsored by: Dell EMC
* MFC r309630:kib2016-12-131-2/+12
| | | | Do not leak curthread->inact_mtx when cancelling in pthread_cond_wait(3).
* MFC r308420: MFV r308392: file 5.29.delphij2016-12-111-3/+3
|
* MFC r305855, r306297, r306300, r306312-r306313marcel2016-12-114-8/+15
| | | | | | | | | | | | | | When MAKEOBJDIRPREFIX points to a case-insensitive file system, the build can break when different source files create the same object files (case-insensitivity speaking). This is the case for object files compiled with -fpic and shared libraries. The former uses an extension of ".So", and the latter an extension ".so". Rename shared object files from *.So to *.pico to match what NetBSD does. Also: o Compile _Exit.c as C99_Exit.c, as it conflicts with _exit.s o Add entry to UPDATING o Document .pico extension
* MFC r309298: libm: remove duplicate version script entriesemaste2016-12-091-5/+0
| | | | | | | These symbols already appear in the common lib/msun/Symbol.map. Duplicate entries produce an error with LLVM's LLD linker. Sponsored by: The FreeBSD Foundation
* Merge rr309688: address regressions in SA-16:37.libc.glebius2016-12-071-6/+5
| | | | | PR: 215105 Submitted by: <jtd2004a sbcglobal.net>
* Merge r309640 from head:glebius2016-12-061-3/+8
| | | | | | | | | Fix possible integer overflow in guest memory bounds checking, which could lead to access from the virtual machine to the heap of the bhyve(8) process. Submitted by: Felix Wilhelm <fwilhelm ernw.de> Patch by: grehan Security: FreeBSD-SA-16:38.bhyve
* Merge r309639 from head:glebius2016-12-061-17/+34
| | | | | | | | | | | Fix possible buffer overflow(s) in link_ntoa(3). A specially crafted sockaddr_dl argument can trigger a static buffer overflow in the libc library, with possibility to rewrite with arbitrary data following static buffers that belong to other library functions. Reviewed by: kib Security: FreeBSD-SA-16:37.libc
* MFC r307220:ngie2016-12-061-2/+2
| | | | | | r307220 (by br): Fix typos: use correct string format and value to compare.
* MFC r309026: open(2): Clarify non-POSIX error when opening a symlink withjilles2016-12-041-1/+17
| | | | | | | | | | O_NOFOLLOW. We return [EMLINK] instead of [ELOOP] when trying to open a symlink with O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code like cmp -h and xz takes advantage of this. PR: 214633
* MFC r305449:ngie2016-12-031-1/+1
| | | | | Install h_db to unbreak some of the lib/libc/db testcases after r305358
* MFC r305921:ngie2016-12-032-6/+6
| | | | Similar to r305920, remove spurious newlines from ATF_REQUIRE_MSG calls
* MFC r305358:ngie2016-12-038-3/+16
| | | | | | | | | | | | | | | | | | | | | Update contrib/netbsd-tests with new content from NetBSD This updates the snapshot from 09/30/2014 to 08/11/2016 This brings in a number of new testcases from upstream, most notably: - bin/cat - lib/libc - lib/msun - lib/libthr - usr.bin/sort lib/libc/tests/stdio/open_memstream_test.c was moved to lib/libc/tests/stdio/open_memstream2_test.c to accomodate the new open_memstream test from NetBSD. Tested on: amd64 (VMware fusion VM; various bare metal platforms); i386 (VMware fusion VM); make tinderbox
* MFC r307700:ngie2016-12-031-1/+4
| | | | Only build lib/libc/tests/iconv if MK_ICONV != no
* 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 r308129:bapt2016-11-301-1/+11
| | | | | | | | | | | | When issuing a PXE dhcp request, always issue a param request (DHCP option 55) with all dhcp parameters we might be interested in. Some DHCP server like the new kea (by ISC) expect it. This makes pxeboot functional with ISC kea. Submitted by: Vincent Legout <vincent.legout@gandi.net> Sponsored by: Gandi.net
* MFC r309006: remove unnecessary vm includes from setproctitleemaste2016-11-291-4/+0
| | | | | vm headers were needed only for the PS_STRINGS fallback, which was removed in r297888.
* MFC 308056: Fix formatting of tables.jhb2016-11-231-121/+121
| | | | | | | | | | | 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 r307584asomers2016-11-221-8/+0
| | | | | | | | | | | | | | 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 r302624:trasz2016-11-031-2/+5
| | | | Add some .Xrs to getloginclass(2).
* MFC r307227 and r307343:ed2016-10-296-54/+56
| | | | | | | | | | | | | | | | | | | | | | Improve typing of POSIX search tree functions. Back in 2015 when I reimplemented these functions to use an AVL tree, I was annoyed by the weakness of the typing of these functions. Both tree nodes and keys are represented by 'void *', meaning that things like the documentation for these functions are an absolute train wreck. To make things worse, users of these functions need to cast the return value of tfind()/tsearch() from 'void *' to 'type_of_key **' in order to access the key. Technically speaking such casts violate aliasing rules. I've observed actual breakages as a result of this by enabling features like LTO. I've filed a bug report at the Austin Group. Looking at the way the bug got resolved, they made a pretty good step in the right direction. A new type 'posix_tnode' has been added to correspond to tree nodes. It is still defined as 'void' for source-level compatibility, but in the very far future it could be replaced by a proper structure type containing a key pointer.
* MFC r307364:bapt2016-10-221-3/+1
| | | | directly create the socket with SOCK_NONBLOCK instead of calling fcntl(2)
* MFH (r306488, r306494, r306495, r306496): fix markup and cross-referencesdes2016-10-222-46/+42
|
* MFH (r305381, r306457): upgrade to unbound 1.5.10 via 1.5.9des2016-10-211-13/+13
|
* MFC r305961:ngie2016-10-212-0/+4
| | | | | | | | | | Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add it to lib/libc/tests/sys/Makefile [*] Even though make -VPACKAGE and make -n install seem to do the right thing, the effects are a bit different, depending on the build host. Obtained from: HardenedBSD (af602f0db) [*]
* MFC r305920:ngie2016-10-212-4/+4
| | | | | | | Remove spurious newlines from atf_tc_fail calls This changes the results from broken (incorrect) to failed (correct) on i386
* MFC r305919:ngie2016-10-212-4/+0
| | | | | | | | | Don't define PACKAGE in lib/libc/tests/{iconv,net/getaddrinfo} needlessly This is already being done by bsd.test.mk The other subdirectory Makefiles were intentionally left alone
* MFC r306332:pfg2016-10-191-1/+2
| | | | | | btree(3): don't shortcut closing if the metadata is dirty. Obtained from: NetBSD (from krb5 tree)
* MFC: 304677, 304680, 305125, 305770, 305769bapt2016-10-196-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r304677: Add tftpfs support for the EFI loader Allow netbooting on efi without having to setup any NFS server by rebuilding the loader with LOADER_TFTP_SUPPORT like for the i386 pxeloader r305125: Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi Add a new 'netproto' variable which can be set for now to NET_TFTP or NET_NFS (default to NET_NONE) From the dhcp options if one sets the root-path option to: "ip:path", the loader will consider it is booting over NFS (meaning same behaviour as the default current behaviour) if the dhcp option "tftp server address" is set (option 150) the loader will consider it is booting over tftpfs, it will then consider the root-path options with 2 possible case 1. "path" then the IP of the tftp server will be the one passed by the option 150, and the files will be retrieved under "path" on the tftp server 2. "ip:path" then the IP of the tftp server will be the one passed in the option "overwritting the IP from the option 150. We could not "abuse" the rootpath option in the form or tftp://ip:path because this is already used for other purpose by iPXE preventing any chainload from iPXE to the FreeBSD loader. Given at each open(), the loader loops over all available filesystems and keep the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa. the tftpfs and nfs implementation in libstand now return EINVAL early if 'netproto' for that purpose. Relnotes: yes Sponsored by: Gandi.net
* MFC 305588sephe2016-10-171-9/+24
| | | | | | | | | | | | pxeboot: Add nfs.read_size tunable. Increase this tunable improves kernel loading speed. Submitted by: Jun Su <junsu microsoft com> Reviewed by: rpokala, wblock (previous version) Obtained from: DragonFlyBSD Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7756
* MFC r307037:kib2016-10-141-4/+3
| | | | Correct indent.
* MFC r307036:kib2016-10-141-0/+2
| | | | Fill msg_len for the initial element of msgvec.
* MFC r306670:mm2016-10-121-0/+2
| | | | | | | | | | | Sync libarchive with vendor including security fixes. Important vendor bugfixes (relevant to FreeBSD): #747: Out of bounds read in mtree parser #761: heap-based buffer overflow in read_Header (7-zip) #794: Invalid file on bsdtar command line results in internal errors (1) PR: 213092 (1)
* MFC r305628: intro(2),_exit(2): Update for reaper (procctl(PROC_REAP_ACQUIRE)).jilles2016-10-112-5/+10
|
* MFC r306588:kib2016-10-093-2/+9
| | | | Export the mq_getfd_np() and timer_oshandle_np() symbols from librt.so.
* MFC r306334:kib2016-10-033-0/+244
| | | | | | | Document thr_suspend(2) and thr_wake(2). MFC r306506: Reword the statement.
* MFC r306505:kib2016-10-031-1/+1
| | | | Add an article.
* MFC r305902:kib2016-10-011-1/+8
| | | | | | | Reduce size of ufs inode. MFC r305903: Fix libprocstat build after r305902.
* MFC 305034: Implement 'devctl clear driver' to undo a previous 'set driver'.jhb2016-09-303-3/+51
| | | | | | | | | | | Add a new 'clear driver' command for devctl along with the accompanying ioctl and devctl_clear_driver() library routine to reset a device to use a wildcard devclass instead of a fixed devclass. This can be used to undo a previous 'set driver' command. After the device's name has been reset to permit wildcard names, it is reprobed so that it can attach to newly-available (to it) device drivers. Sponsored by: Chelsio Communications
OpenPOWER on IntegriCloud