summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * MFC r292234, r292527:ian2016-01-191-2/+2
| | | | | | | | Add strlcat() and strlcpy() to libstand and libstand32.
| * MFC r293715:ngie2016-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | Fix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)` This fixes the potential NULL pointer dereference properly, and also fixes memory leaks encountered in the process of iterating through `*rp`. Found by: Valgrind Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
| * MFC r292497:ngie2016-01-188-1/+1978
| | | | | | | | | | Integrate the remaining tools/regression/lib/msun testcases into the FreeBSD test suite under lib/msun/tests
| * MFC r293705:ngie2016-01-181-2/+2
| | | | | | | | | | | | | | | | | | Similar to r293704, fix theoretical leak of netconfig(3) resources in __rpcbind_is_up(..) if getnetconfig(3) is partly successful in allocating resources, but not completely successful by moving the endnetconfig(3) call up before we return from the function if nconf == NULL. Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
| * MFC r293704:ngie2016-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix theoretical leak of netconfig(3) resources in svcunix_create(..) In the event that the getconfig(3) call in svcunix_create is partly successful, some of the netconfig(3) resources allocated might be leaked if the call returns NULL as endnetconfig(3) wasn't called explicitly in that case. Ensure that the resources are fully cleaned up by going to the `done` label, which will call endnetconfig(3) for us. Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
| * MFH (r280630): remove all traces of SSLv2 supportdes2016-01-164-30/+56
| | | | | | | | | | | | | | | | | | | | | | MFH (r285141): remove unused variable MFH (r288217): correctly check return value from getaddrinfo(3) MFH (r289419): fix bugs in HTTPS tunnelling MFH (r289420): use fopen()'s "e" mode instead of fcntl for close-on-exec MFH (r291453, r291461): use .netrc for http servers and proxies MFH (r292330, r292332): reset bufpos to 0 after refilling in chunked mode PR: 194483 199801 193740 204771
| * MFH (r262530): fix is_upper() predicate (almost two years late...)des2016-01-162-2/+0
| | | | | | | | | | | | | | | | | | MFH (r271614): remove incorrect svn properties MFH (r274145): cast-qual bugs in tests MFH (r288070): restore correct module search path semantics Also merge upstream r854, committed to head as part of r280031, which fixes cast-qual bugs in libpam itself.
| * MFC r287619:tuexen2016-01-161-2/+0
| | | | | | | | | | | | | | | | | | Zero out a local variable also when PURIFY is not defined. This silence a warning brought up by valgrind whenever if_nametoindex is used. This was already discussed in PR 166483, but the code committed in r234329 guards the initilization with #ifdef PURIFY. Therefore, valgrind still complains. Since this code is not performance critical, always zero out the local variable to silence valgrind.
| * MFC r293783: futimens/utimensat: Use the new system calls.jilles2016-01-153-4/+10
| | | | | | | | | | | | | | | | | | Update the __FreeBSD_version check in lib/libc/sys/futimens.c and lib/libc/sys/utimensat.c. Before this, fallback code using futimes/futimesat/lutimes was used except when running on a sufficiently recent 11-current kernel. Also, update the history section in the man page.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-152-10/+11
|\ \ | |/
| * Update stable/10 from 10.2-STABLE to 10.3-PRERELEASE,marius2016-01-151-2/+2
| | | | | | | | | | | | | | | | | | marking the official start of the code slush. Set the default mdoc(7) version to 10.3, and update the clang(1) TARGET_TRIPLE and BUILD_TRIPLE to reflect 10.3. Approved by: re (implicit)
| * MFC r290811:jtl2016-01-141-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix hwpmc "stalled" behavior Currently, there is a single pm_stalled flag that tracks whether a performance monitor was "stalled" due to insufficent ring buffer space for samples. However, because the same performance monitor can run on multiple processes or threads at the same time, a single pm_stalled flag that impacts them all seems insufficient. In particular, you can hit corner cases where the code fails to stop performance monitors during a context switch out, because it thinks the performance monitor is already stopped. However, in reality, it may be that only the monitor running on a different CPU was stalled. This patch attempts to fix that behavior by tracking on a per-CPU basis whether a PM desires to run and whether it is "stalled". This lets the code make better decisions about when to stop PMs and when to try to restart them. Ideally, we should avoid the case where the code fails to stop a PM during a context switch out. MFC r290813: Optimizations to the way hwpmc gathers user callchains Changes to the code to gather user stacks: * Delay setting pmc_cpumask until we actually have the stack. * When recording user stack traces, only walk the portion of the ring that should have samples for us. MFC r290929: Change the driver stats to what they really are: unsigned values. When pmcstat exits after some samples were dropped, give the user an idea of how many were lost. (Granted, these are global numbers, but they may still help quantify the scope of the loss.) MFC r290930: Improve accuracy of PMC sampling frequency The code tracks a counter which is the number of events until the next sample. On context switch in, it loads the saved counter. On context switch out, it tries to calculate a new saved counter. Problems: 1. The saved counter was shared by all threads in a process. However, this means that all threads would be initially loaded with the same saved counter. However, that could result in sampling more often than once every X number of events. 2. The calculation to determine a new saved counter was backwards. It added when it should have subtracted, and subtracted when it should have added. Assume a single-threaded process with a reload count of 1000 events. Assuming the counter on context switch in was 100 and the counter on context switch out was 50 (meaning the thread has "consumed" 50 more events), the code would calculate a new saved counter of 150 (instead of the proper 50). Fix: 1. As soon as the saved counter is used to initialize a monitor for a thread on context switch in, set the saved counter to the reload count. That way, subsequent threads to use the saved counter will get the full reload count, assuring we sample at least once every X number of events (across all threads). 2. Change the calculation of the saved counter. Due to the change to the saved counter in #1, we simply need to add (modulo the reload count) the remaining counter time we retrieve from the CPU when a thread is context switched out. MFC r291016: Support a wider history counter in pmcstat(8) gmon output pmcstat(8) contains an option to output sampling data in a gmon format compatible with gprof(1). Currently, it uses the default histcounter, which is an (unsigned short). With large sets of sampling data, it is possible to overflow the maximum value provided by an (unsigned short). This change adds the -e argument to pmcstat. If -e and -g are both specified, pmcstat will use a histcounter type of uint64_t. MFC r291017: Fix the date on the pmcstat(8) man page from r291016.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-1320-256/+709
|\ \ | |/
| * MFC r287964:trasz2016-01-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Kernel part of reroot support - a way to change rootfs without reboot. Note that the mountlist manipulations are somewhat fragile, and not very pretty. The reason for this is to avoid changing vfs_mountroot(), which is (obviously) rather mission-critical, but not very well documented, and thus hard to test properly. It might be possible to rework it to use its own simple root mount mechanism instead of vfs_mountroot(). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2698
| * MFC r285240:trasz2016-01-124-99/+2
| | | | | | | | | | | | | | Remove reboot.S (part of libc). It's not needed and was actually broken - returning 0 from reboot(2) resulted in SIGBUS. Sponsored by: The FreeBSD Foundation
| * MFC SVN revisions 293340, 293379dteske2016-01-091-2/+2
| | | | | | | | | | r293340: Increase maximum buffer size for `-x cmd' value r293379: Bump copyright
| * MFC r290275: Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi)dteske2016-01-095-141/+147
| |
| * MFC r277610 (by jillies):dchagin2016-01-096-0/+510
| | | | | | | | Add futimens and utimensat system calls.
| * MFC r291114: popen() requires check for fdopen() failurerpokala2016-01-091-10/+24
| | | | | | | | | | | | | | | | Move fdopen() up near other resource allocation like malloc(); do proper deallocation on failure later on in the function. Approved by: jhb Sponsored by: Panasas, Inc.
| * MFC r292047: RPC: populate local address for rendezvous transporter.stas2016-01-081-2/+16
| |
| * MFC r291941:bdrewery2016-01-071-2/+1
| | | | | | | | Replace unneeded manual dependency on header by adding it to SRCS.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2016-01-0733-57/+7982
|\ \ | |/
| * MFC r292328:ngie2016-01-0615-0/+3425
| | | | | | | | | | | | | | | | | | | | | | | | Integrate a number of testcases from tools/regression/lib/msun into the FreeBSD test suite There's no functional change with these testcases; they're purposely being left in TAP format for the time being Other testcases which crash on amd64/i386 as-is have not been integrated yet (they need to be retested on a later version of CURRENT, as I haven't used i386 in some time)
| * MFH: 292432,r292433,r292434brueffer2016-01-041-0/+4
| | | | | | | | | | | | | | | | - Merge OpenBSM 1.2 alpha 4. - Regenerate config.h for OpenBSM 1.2 alpha 4. - Add au_notify.2 and MLINKs (added in OpenBSM 1.2 alpha 4). Relnotes: yes
| * MFC r292719:ume2016-01-012-57/+0
| | | | | | | | | | Remove _gethostbynisname() and _gethostbynisaddr(). These functions used to be called from getipnodebyname().
| * MFC nv(3) and part of nv(9) to stable/10ngie2015-12-3115-0/+4553
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes the following revisions from head: r258065,r258594,r259430,r260222,r261407,r261408,r263479,r264021,r266351, r269603,r271026,r271027,r271028,r271241,r271578,r271579,r271847,r272102, r272843,r273752,r277920,r277921,r277925,r277926,r277927,r279421,r279422, r279423,r279424,r279425,r279426,r279427,r279428,r279429,r279430,r279431, r279432,r279434,r279435,r279436,r279438,r279439,r279440,r279760,r282122, r282254,r282257,r282304,r282312,r285339,r288340 This change reverts stable/10@r282122 and stable/10@r288340, and re-MFCs the series again (r282122, r285339, and r288340). More changes are pending to nv(9)/pci(4) after further review/work. Please see the Phabricator review for more details (both https://reviews.freebsd.org/D4232 and https://reviews.freebsd.org/D4249 ). - Tested with: -- Booting VMware Fusion 8.1.0 running on a Haswell Apple Macbook Pro -- Booting a Haswell machine with zfs and running some stress workloads with VirtualBox guests -- make tinderbox -- kyua test -k /usr/tests/lib/libnv Differential Revision: https://reviews.freebsd.org/D4249 (part of a larger diff) Relnotes: yes Reviewed by: oshogbo (implicit), sbruno (implicit) Submitted by: Kevin Bowling <kevin.bowling@kev009.com> Sponsored by: EMC / Isilon Storage Division
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-3015-12/+5797
|\ \ | |/
| * MFC r292550, r292595:ume2015-12-291-12/+4
| | | | | | | | | | Simplify _map_v4v6_address(). We don't need to use a temporary buffer, here.
| * MFC r292317,r292318,r292323,r292324,r292665:ngie2015-12-2814-0/+5793
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r292317: Integrate tools/regression/lib/libc/resolv into the FreeBSD test suite as lib/libc/tests/resolv Convert the testcases to ATF Sponsored by: EMC / Isilon Storage Division r292318: Add Makefile accidentally missed in r292317 Sponsored by: EMC / Isilon Storage Division r292323: Integrate tools/regression/lib/libc/nss into the FreeBSD test suite as lib/libc/tests/nss - Convert the testcases to ATF - Do some style(9) cleanups: -- Sort headers -- Apply indentation fixes -- Remove superfluous parentheses - Explicitly print out debug printfs for use with `kyua {debug,report}`; for items that were overly noisy, they've been put behind #ifdef DEBUG conditionals - Fix some format strings Sponsored by: EMC / Isilon Storage Division r292324: Iterate down lib/libc/tests/nss... Sponsored by: EMC / Isilon Storage Division r292665: Increase the timeout for resolv_test from the default (300 seconds) to 450 seconds This is required on slower network connections, and on older releases (stable/10 seems to be slower as far as name resolution goes.. not sure why yet). Remove an outdated comment in the Makefile from when I was working on this code over a year ago on github Sponsored by: EMC / Isilon Storage Division
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-287-57/+209
|\ \ | |/
| * MFC r292445, r292554:ume2015-12-282-8/+6
| | | | | | | | Use _map_v4v6_address().
| * MFC r292539:ume2015-12-281-1/+6
| | | | | | | | | | | | | | If we end up following a CNAME chain that does not find any data return that instead of internal error. PR: 156684
| * MFC r292513: clock_gettime(2),gettimeofday(2): Remove [EFAULT] error.jilles2015-12-272-8/+2
| | | | | | | | | | | | | | | | | | Depending on system configuration and parameters, clock_gettime() and gettimeofday() may not be system calls. If so, passing an invalid pointer will cause a signal and not an [EFAULT] error. From a standards perspective, this is OK since passing an invalid pointer is undefined behaviour.
| * MFC r292510:kib2015-12-271-3/+8
| | | | | | | | Fix lockf(3) cancellation behaviour.
| * MFC r292514:ume2015-12-271-8/+8
| | | | | | | | | | | | addrinfo.ai_family is an address family, not a protocol family. PR: 162434
| * MFC 276962:ume2015-12-261-2/+4
| | | | | | | | | | | | | | Do not regenerate and install liblzma.pc when only build libraries aka do not regenerate while generating 32bits libs Reported by: Shin-ichi Okano <s-okano__at__n08.itscom.net>
| * Add AI_V4MAPPED and AI_ALL support for getaddrinfo(3).ume2015-12-252-28/+176
| | | | | | | | PR: 198092
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-2218-80/+637
|\ \ | |/
| * MFC: xz 5.2.2.delphij2015-12-226-22/+474
| | | | | | | | Relnotes: yes
| * MFC: r291073araujo2015-12-211-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a NIS server has long entries on its database that is bigger than 1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry loop when is requesting the information from the NIS server. The ypmatch(1) will return an error until the command receives an kill(1). To avoid this problem, we check the MAX_RETRIES that is by default set to 20 and avoid get in infinet loop at the client side. NOTE: FreeBSD nis(8) server doesn't present this issue. Submitted by: Ravi Pokala <rpokala at panasas.com>, Lakshmi N. Sundararajan <lakshmi.n at msystechnologies.com>, Lewis, Fred <flewis at panasas.com>, Pushkar Kothavade <pushkar.kothavade at msystechnologies.com>
| * MFC r292130: exec(3): Fix COMPATIBILITY section: default path does notjilles2015-12-201-2/+2
| | | | | | | | contain cwd.
| * MFC r292153:ngie2015-12-201-1/+1
| | | | | | | | | | | | | | | | | | Add -static to CFLAGS to unbreak the tests by using a libc.a with the xlocale private symbols exposed which aren't exposed publicly via the DSO PR: 191354 Sponsored by: EMC / Isilon Storage Division
| * MFC r289315, r292216vangyzen2015-12-193-4/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resolver: automatically reload /etc/resolv.conf On each resolver query, use stat(2) to see if the modification time of /etc/resolv.conf has changed. If so, reload the file and reinitialize the resolver library. However, only call stat(2) if at least two seconds have passed since the last call to stat(2), since calling it on every query could kill performance. This new behavior is enabled by default. Add a "reload-period" option to disable it or change the period of the test. Document this behavior and option in resolv.conf(5). Polish the man page just enough to appease igor. Relnotes: yes Sponsored by: Dell Inc.
| * MFC r289837vangyzen2015-12-191-39/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resolver: abuse _res a little less In the past, _res was a global variable. Now, it's multiple function calls. Several functions in the resolver use _res multiple times and therefore call the function(s) far more than necessary. Fix those callers to store the result of _res in a local variable. Add __noinline to the definition of res_init() to avoid the code bloat that these changes would have otherwise incurred. Thanks to jilles for noticing this. Sponsored by: Dell Inc.
| * MFC r292129:ume2015-12-191-1/+1
| | | | | | | | | | | | | | | | | | RFC 3493 requires ignoring the loopback address for AI_ADDRCONFIG. Since it breaks certain jail setup, we ignore just 127.0.0.1 instead of whole loopback address range. PR: 192014 Reviewed by: hrs
| * MFC r292250:ngie2015-12-185-5/+15
| | | | | | | | | | | | | | | | Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with lib/libc/resolv by conditionalizing its definition Reviewed by: ume, vangyzen Differential Revision: https://reviews.freebsd.org/D4519
| * MFC r292059:ume2015-12-171-1/+2
| | | | | | | | | | | | | | | | The calls to RES_SET_H_ERRNO() macro on error paths wind up dereferencing an uninitialized res. PR: 202142 Submitted by: Sean Boudreau
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-171-11/+1
|\ \ | |/
| * MFC r282821: Remove redundant csu subdir logicemaste2015-12-161-11/+1
| | | | | | | | | | | | | | The appropriate subdirectories are handled by lib/csu/Makefile. There's no need to duplicate this logic in Makefile.inc1 and lib/Makefile. Sponsored by: The FreeBSD Foundation
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-1410-83/+72
|\ \ | |/
OpenPOWER on IntegriCloud