summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* MFC r312452-r312512:ngie2017-02-1084-158/+158
| | | | | | | | | | r312452-r312512: - Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output - Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc
* MFC r306349:ngie2017-02-101-4/+9
| | | | | | | | | | | r306349 (by pfg): hash(3): protect in-memory page when using cross-endianness. When writing out pages in the "other endian" format, make a copy instead of trashing the in-memory one. Obtained from: NetBSD (CVS rev. 1.29)
* MFC 310638:jhb2017-02-083-10/+16
| | | | | | | | | | Rename the 'flags' argument to getfsstat() to 'mode' and validate it. This argument is not a bitmask of flags, but only accepts a single value. Fail with EINVAL if an invalid value is passed to 'flag'. Rename the 'flags' argument to getmntinfo(3) to 'mode' as well to match. This is a followup to r308088.
* MFC r312392:ngie2017-02-081-1/+1
| | | | Use SRCTOP instead of .CURDIR-relative path in .PATH directive
* MFC r309369,310850,310853:tsoome2017-02-068-101/+87
| | | | | | | | | | libstand: dosfs cstyle cleanup for return keyword. dosfs support in libstand is broken since r298230 PR: 214423 Submitted by: Mikhail Kupchik Reported by: Mikhail Kupchik Approved by: imp (mentor)
* MFC r312332,r312446,r312451:ngie2017-02-0414-21/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r312332: Use SRCTOP where possible and use :H to manipulate .CURDIR to get rid of unnecessarily long relative path .PATH values with make r312446 (by emaste): libc: remove reference to nonexistent lib/locale directory As far as I can tell this was introduced in r72406 and updated in several subsequent revisions, but the lib/locale directory it referenced never existed. r312451: Replace dot-dot relative pathing with SRCTOP-relative paths where possible This reduces build output, need for recalculating paths, and makes it clearer which paths are relative to what areas in the source tree. The change in performance over a locally mounted UFS filesystem was negligible in my testing, but this may more positively impact other filesystems like NFS. LIBC_SRCTOP was left alone so Juniper (and other users) can continue to manipulate lib/libc/Makefile (and other Makefile.inc's under lib/libc) as include Makefiles with custom options. Discussed with: marcel, sjg
* MFC r303841,r312012,r312213:ngie2017-02-042-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | r303841 (by bdrewery): Revert r298434 which should be fixed by r301287, r301394, and r301403. PR: 208703, 208963 r312012: fmaxmin_test still fails with clang 3.9.x.. bypass the test PR: 208703 r312213: Turn COMPILER_VERSION/COMPILER_TYPE make check into a compile-time check of the clang version This works around breakage on ^/stable/10 when running installworld from a ^/stable/10 host where the test wouldn't be compiled on the first go-around and would be missing when make installworld is run. PR: 208703
* MFC r311972:ngie2017-02-041-0/+9
| | | | Add __BIT and __BITS macros from NetBSD to help support new testcases
* MFC r311925,r311968,r311969,r312102,r312108:ngie2017-02-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r311925: Import testcase updates with code contributed back to NetBSD This also (inadvertently) contains an update to contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases). In collaboration with: christos@NetBSD.org r311968: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked r311969: Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile This is to enable support in other testcases Inspired by lib/msun/tests/Makefile . r312102: Note that sys/types.h is required on FreeBSD for kqueue(2), unlike NetBSD r312108: Delete trailing whitespace and use __arraycount instead of nitems in contrib code
* MFC r312937:ngie2017-02-041-1/+1
| | | | | | | | | Fix typo in lib/Makefile The SUBDIR_DEPEND variable should be for librpcsec_gss, not liblibrpc_gss PR: 216409
* MFC r309200:markj2017-02-031-1/+3
| | | | Launder VPO_NOSYNC pages upon vnode deactivation.
* MFC r311659:bapt2017-01-281-23/+10
| | | | | | | | | | | | | remove network mask calculation for Classful network Nowadays it's not necessary to compute network mask from the IP address and compare to given by DHCP. Submitted by: kczekirda Reviewed by: glebius, bapt Sponsored by: Oktawave MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D8740
* MFC r312547: Mention sendfile(2) by popular demand.wblock2017-01-271-2/+8
| | | | Sponsored by: iXsystems
* MFC r311651:kib2017-01-215-106/+164
| | | | Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.
* MFC r311623: Make do_buff_decode() not read past the end of the buffer.mav2017-01-211-34/+40
| | | | Abort format processing as soon as we have no enough data.
* MFC 312083:wblock2017-01-201-14/+39
| | | | | | Update the shm_open.2 man page to reflect objective reality. Sponsored by: iXsystems
* MFC r311504: MFV r311477: xz 5.2.3.delphij2017-01-201-8/+24
|
* MFC r310630: libkvm: support access to vmm guest memory, allow writes toavg2017-01-182-7/+48
| | | | | | fwmem and vmm Sponsored by: Panzura
* MFC r311275: Restructure libz.delphij2017-01-1845-20548/+20
|
* MFC r311101:pfg2017-01-163-9/+11
| | | | | | | | | libkvm - extend a bit the swap statistics field. Change ksw_used and ksw_total to unsigned, which increases the maximum total swap that can be displayed properly from ~8TB to ~16TB. Obtained from: DragonflyBSD (ecc2e461)
* MFC r311781:kib2017-01-162-11/+1
| | | | Use standard Versions.def for libprocstat.
* MFC r311780:kib2017-01-161-1/+1
| | | | Use tab for indent.
* MFC r311715:ngie2017-01-131-13/+13
| | | | Use nitems({mib,name}) instead of hardcoding their value
* MFC r311714:ngie2017-01-134-12/+12
| | | | | | | lib/libutil/kinfo_*: style cleanup - Use nitems(mib) instead of hardcoding mib's length - Sort sys/ #includes
* MFC 307538,307948,308602,308603,311151: Move kdump's mksubr into libsysdecode.jhb2017-01-1221-11/+2343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 307538: Move mksubr from kdump into libsysdecode. Restructure this script so that it generates a header of tables instead of a source file. The tables are included in a flags.c source file which provides functions to decode various system call arguments. For functions that decode an enumeration, the function returns a pointer to a string for known values and NULL for unknown values. For functions that do more complex decoding (typically of a bitmask), the function accepts a pointer to a FILE object (open_memstream() can be used as a string builder) to which decoded values are written. If the function operates on a bitmask, the function returns true if any bits were decoded or false if the entire value was valid. Additionally, the third argument accepts a pointer to a value to which any undecoded bits are stored. This pointer can be NULL if the caller doesn't care about remaining bits. Convert kdump over to using decoder functions from libsysdecode instead of mksubr. truss also uses decoders from libsysdecode instead of private lookup tables, though lookup tables for objects not decoded by kdump remain in truss for now. Eventually most of these tables should move into libsysdecode as the automated table generation approach from mksubr is less stale than the static tables in truss. Some changes have been made to truss and kdump output: - The flags passed to open() are now properly decoded in that one of O_RDONLY, O_RDWR, O_WRONLY, or O_EXEC is always included in a decoded mask. - Optional arguments to open(), openat(), and fcntl() are only printed in kdump if they exist (e.g. the mode is only printed for open() if O_CREAT is set in the flags). - Print argument to F_GETLK/SETLK/SETLKW in kdump as a pointer, not int. - Include all procctl() commands. - Correctly decode pipe2() flags in truss by not assuming full open()-like flags with O_RDONLY, etc. - Decode file flags passed to *chflags() as file flags (UF_* and SF_*) rather than as a file mode. - Fix decoding of quotactl() commands by splitting out the two command components instead of assuming the raw command value matches the primary command component. In addition, truss and kdump now build without triggering any warnings. All of the sysdecode manpages now include the required headers in the synopsis. 307948: Use binary and (&) instead of logical to extract the mask of a capability. 308602: Generate and use a proper .depend file for tables.h. 308603: Move libsysdecode-specific hack out of buildworld. This should fix the lib32 build since it was not removing the generated ioctl.c. This file is generated by a find(1) call, so cannot use normal dependency tracking methods. 311151: Update libsysdecode for getfsstat() 'flags' argument changing to 'mode'. As a followup to r310638, update libsysdecode (and kdump) to decode the 'mode' argument to getfsstat(). sysdecode_getfsstat_flags() has been renamed to sysdecode_getfsstat_mode() and now treats the argument as an enumerated value rather than a mask of flags.
* MFC r311287:kib2017-01-111-19/+35
| | | | | __vdso_gettc(): be extra careful with /dev/hpet mappings, never unmap the mapping which might be accessed by other threads.
* MFH (r310823): fix multi-line CONNECT responsesdes2017-01-091-1/+1
| | | | PR: 194483
* MFC r310984,r311102:ngie2017-01-091-8/+4
| | | | | | | | | | r310984: Use calloc instead of malloc + memset(.., 0, ..) r311102 (by pfg): Cleanup inelegant calloc(3) introduced in r310984.
* MFC 310048,310101,310239sephe2017-01-051-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 310048 hyperv: Implement "enlightened" time counter, which is rdtsc based. Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8763 310101 hyperv: Allow userland to ro-mmap reference TSC page This paves way to implement VDSO for the enlightened time counter. Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8768 310239 hyperv: Implement userspace gettimeofday(2) with Hyper-V reference TSC This 6 times gettimeofday performance, as measured by tools/tools/syscall_timing Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8789
* MFC r310976:pfg2017-01-051-12/+12
| | | | | | | Move __hidden attribute towards the end of the declaration. Apple had them at the start but moving them to the end is better for faster reading and fits better what is done in other FreeBSD headers.
* MFC r310099,r311000,r311002:ngie2017-01-041-0/+3
| | | | | | | | | | r311000: Fix spelling errors r311002: Install bsnmpclient(3) as snmp_client_{init,set_host,set_port}(3)
* Revert MFC of r308603.bdrewery2017-01-031-6/+1
| | | | This depends on unmerged r307538 still.
* MFC r308603:bdrewery2017-01-031-1/+6
| | | | Move libsysdecode-specific hack out of buildworld.
* MFC r304647:bdrewery2017-01-031-3/+4
| | | | Rename ORDERED to BOOTSTRAP since no order is respected in the list.
* MFC r309300,r309363,r309405,r309523,r309590,r310185,r310623:mm2017-01-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Sync libarchive with vendor. Fixed vendor issues (relevant to FreeBSD) #825, #832: Add sanity check of tar "uid, "gid" and "mtime" fields #830, #831, #833, #846: Spelling fixes #850: Fix issues with reading certain jar files Fixed issues found by Google OSS-Fuzz: OSS-Fuzz #15: Fix heap-buffer-overflow in archive_le16dec() OSS-Fuzz #16: Fix possible hang in uudecode_filter_read() OSS-Fuzz #139, #145, #152: Fix heap-buffer-overflow in uudecode_bidder_bid() OSS-Fuzz #220: Reject an 'ar' filename table larger than 1GB or a filename larger than 1MB OSS-Fuzz #227, #230, #239: Fix possible memory leak in archive_read_free() OSS-Fuzz #237: Fix heap buffer overflow when reading invalid ar archives OSS-Fuzz #286: Bugfix in archive_strncat_l() More information: https://github.com/libarchive/libarchive/issues/[libarchive_issue_number] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=[oss_fuzz_issue_number]
* MFC r310996:ngie2017-01-011-1/+1
| | | | | | Look for list.h in ${.CURDIR} to unbreak the build with a ports-based copy of llvm38 on ^/stable/11 (oh, the bugs you find when you set CC,CXX,CPP manually and it skips the bootstrap stage for the toolchain...)
* MFC r310728:ngie2016-12-311-2/+92
| | | | | | | Install {asn1,bsnmpagent,bsnmpclient,bsnmplib}.3 as all of the APIs they document Also, alphabetically sort MAN
* MFC r309124:dim2016-12-26449-7783/+3310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 release, and add lld 3.9.0. Also completely revamp the build system for clang, llvm, lldb and their related tools. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld are available here: <http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html> <http://llvm.org/releases/3.9.0/tools/lld/docs/ReleaseNotes.html> Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan Beich for their help. Relnotes: yes MFC r309147: Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek): [PPC] Set SP after loading data from stack frame, if no red zone is present Follow-up to r280705: Make sure that the SP is only restored after all data is loaded from the stack frame, if there is no red zone. This completes the fix for https://llvm.org/bugs/show_bug.cgi?id=26519. Differential Revision: https://reviews.llvm.org/D24466 Reported by: Mark Millard PR: 214433 MFC r309149: Pull in r283060 from upstream llvm trunk (by Hal Finkel): [PowerPC] Refactor soft-float support, and enable PPC64 soft float This change enables soft-float for PowerPC64, and also makes soft-float disable all vector instruction sets for both 32-bit and 64-bit modes. This latter part is necessary because the PPC backend canonicalizes many Altivec vector types to floating-point types, and so soft-float breaks scalarization support for many operations. Both for embedded targets and for operating-system kernels desiring soft-float support, it seems reasonable that disabling hardware floating-point also disables vector instructions (embedded targets without hardware floating point support are unlikely to have Altivec, etc. and operating system kernels desiring not to use floating-point registers to lower syscall cost are unlikely to want to use vector registers either). If someone needs this to work, we'll need to change the fact that we promote many Altivec operations to act on v4f32. To make it possible to disable Altivec when soft-float is enabled, hardware floating-point support needs to be expressed as a positive feature, like the others, and not a negative feature, because target features cannot have dependencies on the disabling of some other feature. So +soft-float has now become -hard-float. Fixes PR26970. Pull in r283061 from upstream clang trunk (by Hal Finkel): [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float Enable soft-float support on PPC64, as the backend now supports it. Also, the backend now uses -hard-float instead of +soft-float, so set the target features accordingly. Fixes PR26970. Reported by: Mark Millard PR: 214433 MFC r309212: Add a few missed clang 3.9.0 files to OptionalObsoleteFiles. MFC r309262: Fix packaging for clang, lldb and lld 3.9.0 During the upgrade of clang/llvm etc to 3.9.0 in r309124, the PACKAGE directive in the usr.bin/clang/*.mk files got dropped accidentally. Restore it, with a few minor changes and additions: * Correct license in clang.ucl to NCSA * Add PACKAGE=clang for clang and most of the "ll" tools * Put lldb in its own package * Put lld in its own package Reviewed by: gjb, jmallett Differential Revision: https://reviews.freebsd.org/D8666 MFC r309656: During the bootstrap phase, when building the minimal llvm library on PowerPC, add lib/Support/Atomic.cpp. This is needed because upstream llvm revision r271821 disabled the use of std::call_once, which causes some fallback functions from Atomic.cpp to be used instead. Reported by: Mark Millard PR: 214902 MFC r309835: Tentatively apply https://reviews.llvm.org/D18730 to work around gcc PR 70528 (bogus error: constructor required before non-static data member). This should fix buildworld with the external gcc package. Reported by: https://jenkins.freebsd.org/job/FreeBSD_HEAD_amd64_gcc/ MFC r310194: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 3.9.1 release. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld will be available here: <http://releases.llvm.org/3.9.1/docs/ReleaseNotes.html> <http://releases.llvm.org/3.9.1/tools/clang/docs/ReleaseNotes.html> <http://releases.llvm.org/3.9.1/tools/lld/docs/ReleaseNotes.html> Relnotes: yes
* 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
OpenPOWER on IntegriCloud