summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
| * If process becomes reaper (procctl(PROC_REAP_ACQUIRE)) while alreadykib2015-08-201-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | having some children, the children' reaper is not reset to the parent. This allows for the situation where reaper has children but not descendands and the too strict asserts in the reap_status() fire. Remove the wrong asserts, add some clarification for the situation to the procctl(2) REAP_STATUS. Reported and tested by: feld Sponsored by: The FreeBSD Foundation MFC after: 1 week
| * Add the definitions of __infinity and __nan.andrew2015-08-203-0/+17
| |
| * getrlimit.2: Document RSS, AS/VMEM limit behavior more clearlycem2015-08-201-15/+46
| | | | | | | | | | | | | | | | | | Alphabetize the RLIMIT_ list while here. Reviewed by: jilles (previous version), wblock (previous version) Approved by: markj (mentor) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3433
| * wordexp(): Improve some error codes.jilles2015-08-192-18/+32
| | | | | | | | | | | | | | Distinguish between WRDE_BADVAL and WRDE_SYNTAX based on when the error occurred (parsing or execution), not based on whether WRDE_UNDEF was passed. Also, return WRDE_NOSPACE for a few more unexpected results from sh.
| * - ANSIfydelphij2015-08-181-10/+5
| | | | | | | | | | | | | | | | | | | | | | - Remove the redundant _PATH_RSH definition (paths.h at r96194); - Use pid_t for PIDs - Note that we are at the same level of OpenBSD's counterpart of revision 1.7 (r94757). No functional changes. MFC after: 2 weeks
| * wordexp(3): Update man page for no longer using the wordexp builtin.jilles2015-08-181-4/+3
| |
| * Add missing sdallocx updates and remove *allocm manpage links.jasone2015-08-182-5/+6
| | | | | | | | Submitted by: jbeich
| * Update jemalloc to version 4.0.0.jasone2015-08-182-13/+14
| |
| * On arm64 disable three tests that hang or panicemaste2015-08-171-0/+3
| | | | | | | | | | | | | | | | | | | | Each issue has a PR open to track. This workaround allows us to run the tests to investigate the failures and avoid any new regressions. PR: 202304, 202305, 202307 Reviewed by: ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3378
| * wordexp(): Stop using the undocumented wordexp builtin.jilles2015-08-161-3/+4
| | | | | | | | | | | | | | | | | | The functionality of the wordexp builtin is easily replaced using normal shell code, although performance is slightly worse. This does not mean that wordexp() will remain shell-independent -- a fully reliable implementation of WRDE_NOCMD is really only possible using extensions to the shell, or by adding much of the shell's code to libc.
| * Remove a stale comment and clarify the original where it was taken frompfg2015-08-142-7/+2
| | | | | | | | | | | | | | | | | | The comment in the libc/sys symbol map referenced the generated symbols for the syscall trampolines. Such comment was out of place in the secure symbol map so remove the stale comment and attempt to clarify the old one to avoid risks of confusion. Pointed out by: kib
| * Move the stack protector to a new "secure" directorypfg2015-08-147-5/+27
| | | | | | | | | | | | | | | | | | | | As part of the code refactoring to support FORTIFY_SOURCE we want a new subdirectory "secure" to keep the files related to security. Move the stack protector functions to this new directory. No functional change. Differential Review: https://reviews.freebsd.org/D3333
| * Make clear the bcopy(3) manpage regards when it was marked as LEGACYaraujo2015-08-141-13/+23
| | | | | | | | | | | | | | | | as well as when it was removed from POSIX specification. Reviewed by: theraven, wblock, bapt, rodrigc Approved by: bapt, rodrigc (mentor) Differential Revision: D3374
| * Remove the mention of memcpy(3) that is build on top of bcopy(3).araujo2015-08-131-9/+7
| | | | | | | | | | | | | | | | | | | | Fix some phrases to make it more clear. Differential Revision: D3378 Reported by: bde@ Reviewed by: wblock Approved by: bapt, rodrigc (mentor) Sponsored by: gandi.net
| * Describe that bcopy(3) is deprecated and marked as LEGACY inaraujo2015-08-121-1/+15
| | | | | | | | | | | | | | | | | | | | POSIX.1-2001 and removed from the specification in POSIX.1-2008. New softwares shall use memcpy(3) or memmove(3). Differential Revision: D3358 Reviewed by: wblock Approved by: rodrigc Sponsored by: gandi.net
| * Fix and re-enable UTF-8 tests.jilles2015-08-111-1/+1
| |
| * Actually disable the invalid testbapt2015-08-111-1/+1
| |
* | Revert r286465. Retesting it showed that it just works. it might have beenbapt2015-08-091-9/+1
| | | | | | | | a local issue in my previous tests.
* | Update wcscoll forgotten in previous patchbapt2015-08-091-51/+143
| |
* | Fix typobapt2015-08-091-1/+1
| |
* | Use more asprintfbapt2015-08-092-4/+9
| | | | | | | | Plug memory leak introduced in previous asprintf addition
* | Use asprintf/free instead of snprintfbapt2015-08-091-3/+5
| |
* | Remove useless variablebapt2015-08-091-2/+2
| |
* | Readd checking utf16 surrogates that are invalid in utf8bapt2015-08-091-0/+7
| |
* | Mark __collate_load_tables_l as staticbapt2015-08-092-4/+1
| | | | | | | | Remove useless addition to Symbols.map
* | Fix typobapt2015-08-092-3/+2
| | | | | | | | | | | | Fix bad location for include Reported by: jilles
* | Fix typobapt2015-08-092-14/+8
| | | | | | | | | | | | Remove useless tests before free() Suggested by: jilles
* | Merge from HEADbapt2015-08-091-22/+1
|\ \ | |/
| * Remove 5 and 6 bytes sequences which are illegal in UTF-8 space. (part2)bapt2015-08-091-7/+1
| | | | | | | | | | | | Per rfc3629 value greater than 0x10ffff should be rejected Suggested by: jilles
| * Remove 5 and 6 bytes sequences which are illegal in UTF-8 space.bapt2015-08-081-8/+0
| | | | | | | | | | | | Per rfc3629 value greater than 0x10ffff should be rejected Suggested by: jilles
* | Fix typobapt2015-08-081-1/+1
| |
* | The regex code does not work with multibyte codesets like UTF-8.bapt2015-08-081-1/+9
| | | | | | | | | | | | | | | | | | | | | | In fact, it doesn't even work with single-byte codesets like ISO-8859-1. The comparison blows up at index 128 (the range is 0 to UCHAR_MAX (255). As a temporary workaround, all comparisons will be done in C locale regardless of the environment setting. The regex library needs to be updated to handle all codesets. Obtained from: Dragonfly
* | Revamp CTYPE support (from Illumos & Dragonfly)bapt2015-08-0817-473/+550
| | | | | | | | Obtained from: Dragonfly
* | The collate functions within libc have been using version 1 and 1.2 of thebapt2015-08-078-371/+775
|/ | | | | | | | | | | | | | | | | | | | | | packed LC_COLLATE binary formats. These were generated with the colldef tool, but the new LC_COLLATE files are going to be generated by the new localedef tool using CLDR POSIX files as input. The BSD-flavored version of localedef identifies the format as "BSD 1.0". Any LC_COLLATE file with a different version will simply not be loaded, and all LC* categories will get set to "C" (aka "POSIX") locale. This work is based off of Nexenta's contribution to Illumos. The integration with xlocale is John Marino's work for Dragonfly. The following commits will enable localedef tool, disable the colldef tool, add generated colldef directory, and finally remove colldef from base. The only difference with Dragonfly are: - a few fixes to build with clang - And identification of the flavor as "BSD 1.0" instead of "Dragonfly 4.4" Obtained from: Dragonfly
* Make it possible to implement poll(2) on top of kqueue(2).ed2015-08-051-1/+9
| | | | | | | | | | | | | | It looks like EVFILT_READ and EVFILT_WRITE trigger under the same conditions as poll()'s POLLRDNORM and POLLWRNORM as described by POSIX. The only difference is that POLLRDNORM has to be triggered on regular files unconditionally, whereas EVFILT_READ only triggers when not EOF. Introduce a new flag, NOTE_FILE_POLL, that can be used to make EVFILT_READ and EVFILT_WRITE behave identically to poll(). This flag will be used by cloudlibc's poll() function. Reviewed by: jmg Differential Revision: https://reviews.freebsd.org/D3303
* Copy the fencing of the algorithm to do lock-less update and readingkib2015-08-043-16/+83
| | | | | | | | | | | | | | of the timehands, from the kern_tc.c implementation to vdso. Add comments giving hints where to look for the algorithm explanation. To compensate the removal of rmb() in userspace binuptime(), add explicit lfence instruction before rdtsc. On i386, add usual complications to detect SSE2 presence; assume that old CPUs which do not implement SSE2 also execute rdtsc almost in order. Reviewed by: alc, bde (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Fix a couple of markup typos.jhb2015-08-021-3/+3
| | | | MFC after: 2 weeks
* unlink(2): Note the possibility for ENOSPC to be returned on ZFS.bdrewery2015-07-281-1/+4
| | | | PR: 154930
* Make shutdown() return ENOTCONN as required by POSIX, part deux.ed2015-07-271-31/+11
| | | | | | | | | | | | | | | | | | | | | | Summary: Back in 2005, maxim@ attempted to fix shutdown() to return ENOTCONN in case the socket was not connected (r150152). This had to be rolled back (r150155), as it broke some of the existing programs that depend on this behavior. I reapplied this change on my system and indeed, syslogd failed to start up. I fixed this back in February (279016) and MFC'ed it to the supported stable branches. Apart from that, things seem to work out all right. Since at least Linux and Mac OS X do the right thing, I'd like to go ahead and give this another try. To keep old copies of syslogd working, only start returning ENOTCONN for recent binaries. I took a look at the XNU sources and they seem to test against both SS_ISCONNECTED, SS_ISCONNECTING and SS_ISDISCONNECTING, instead of just SS_ISCONNECTED. That seams reasonable, so let's do the same. Test Plan: This issue was uncovered while writing tests for shutdown() in CloudABI: https://github.com/NuxiNL/cloudlibc/blob/master/src/libc/sys/socket/shutdown_test.c#L26 Reviewers: glebius, rwatson, #manpages, gnn, #network Reviewed By: gnn, #network Subscribers: bms, mjg, imp Differential Revision: https://reviews.freebsd.org/D3039
* Update Capsicum and Mandatory Access Control manual pagestrasz2015-07-252-24/+2
| | | | | | | | | to no longer claim they are experimental. Reviewed by: rwatson@, wblock@ MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2985
* Document the fact that system(3) can easily be misused due to shell metadelphij2015-07-251-2/+14
| | | | | | | characters are honored. While I'm there also mention posix_spawn in the SEE ALSO section. MFC after: 2 weeks
* Add missing capitalization.trasz2015-07-241-1/+1
|
* Add missing priority argument in example code in BUGS section.pluknet2015-07-211-2/+2
| | | | | | PR: 201725 Submitted by: Thomas Cort MFC after: 1 week
* The si_status field of the siginfo_t, provided by the waitid(2) andkib2015-07-181-7/+9
| | | | | | | | | | | | | | | | SIGCHLD signal, should keep full 32 bits of the status passed to the _exit(2). Split the combined p_xstat of the struct proc into the separate exit status p_xexit for normal process exit, and signalled termination information p_xsig. Kernel-visible macro KW_EXITCODE() reconstructs old p_xstat from p_xexit and p_xsig. p_xexit contains complete status and copied out into si_status. Requested by: Joerg Schilling Reviewed by: jilles (previous version), pho Tested by: pho Sponsored by: The FreeBSD Foundation
* Correct the description of MADV_DONTNEED. Specifically, after usingalc2015-07-121-4/+4
| | | | | | | MADV_DONTNEED, while pages faults on the affected address range are more likely to occur, they are not guaranteed to occur. MFC after: 3 days
* Add an initial NUMA affinity/policy configuration for threads and processes.adrian2015-07-113-0/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on work done by jeff@ and jhb@, as well as the numa.diff patch that has been circulating when someone asks for first-touch NUMA on -10 or -11. * Introduce a simple set of VM policy and iterator types. * tie the policy types into the vm_phys path for now, mirroring how the initial first-touch allocation work was enabled. * add syscalls to control changing thread and process defaults. * add a global NUMA VM domain policy. * implement a simple cascade policy order - if a thread policy exists, use it; if a process policy exists, use it; use the default policy. * processes inherit policies from their parent processes, threads inherit policies from their parent threads. * add a simple tool (numactl) to query and modify default thread/process policities. * add documentation for the new syscalls, for numa and for numactl. * re-enable first touch NUMA again by default, as now policies can be set in a variety of methods. This is only relevant for very specific workloads. This doesn't pretend to be a final NUMA solution. The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved by 'sysctl vm.default_policy=rr'. This is only relevant if MAXMEMDOM is set to something other than 1. Ie, if you're using GENERIC or a modified kernel with non-NUMA, then this is a glorified no-op for you. Thank you to Norse Corp for giving me access to rather large (for FreeBSD!) NUMA machines in order to develop and verify this. Thank you to Dell for providing me with dual socket sandybridge and westmere v3 hardware to do NUMA development with. Thank you to Scott Long at Netflix for providing me with access to the two-socket, four-domain haswell v3 hardware. Thank you to Peter Holm for running the stress testing suite against the NUMA branch during various stages of development! Tested: * MIPS (regression testing; non-NUMA) * i386 (regression testing; non-NUMA GENERIC) * amd64 (regression testing; non-NUMA GENERIC) * westmere, 2 socket (thankyou norse!) * sandy bridge, 2 socket (thankyou dell!) * ivy bridge, 2 socket (thankyou norse!) * westmere-EX, 4 socket / 1TB RAM (thankyou norse!) * haswell, 2 socket (thankyou norse!) * haswell v3, 2 socket (thankyou dell) * haswell v3, 2x18 core (thankyou scott long / netflix!) * Peter Holm ran a stress test suite on this work and found one issue, but has not been able to verify it (it doesn't look NUMA related, and he only saw it once over many testing runs.) * I've tested bhyve instances running in fixed NUMA domains and cpusets; all seems to work correctly. Verified: * intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different NUMA policies for processes under test. Review: This was reviewed through phabricator (https://reviews.freebsd.org/D2559) as well as privately and via emails to freebsd-arch@. The git history with specific attributes is available at https://github.com/erikarn/freebsd/ in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/adrian_numa_policy). This has been reviewed by a number of people (stas, rpaulo, kib, ngie, wblock) but not achieved a clear consensus. My hope is that with further exposure and testing more functionality can be implemented and evaluated. Notes: * The VM doesn't handle unbalanced domains very well, and if you have an overly unbalanced memory setup whilst under high memory pressure, VM page allocation may fail leading to a kernel panic. This was a problem in the past, but it's much more easily triggered now with these tools. * This work only controls the path through vm_phys; it doesn't yet strongly/predictably affect contigmalloc, KVA placement, UMA, etc. So, driver placement of memory isn't really guaranteed in any way. That's next on my plate. Sponsored by: Norse Corp, Inc.; Dell
* Since sh(1) now supports mulitbyte (only UTF-8) clarify the related BUGSbapt2015-07-111-3/+3
| | | | | | section in wordexp(3) manual page Discussed with: jilles
* Add support for makecontext. This supports up to 8 arguments as thisandrew2015-07-105-3/+129
| | | | | | | simplifies the code, these can be passed in registers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
* Fix markup.trasz2015-07-071-3/+3
| | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Remove reboot.S (part of libc). It's not needed and was actuallytrasz2015-07-074-97/+2
| | | | | | | broken - returning 0 from reboot(2) resulted in SIGBUS. MFC after: 1 month Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud