summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
Commit message (Collapse)AuthorAgeFilesLines
* MFC r320801 MFS r320887:kib2017-07-111-3/+5
| | | | | | Simplify language. Approved by: re (delphij)
* Add MAP_GUARD and use it for stack grow area protection.kib2017-07-072-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump __FreeBSD_version. This is an MFS of stable/11 r320666. MFC r320317: Implement address space guards. MFC r320338: Remove stale part of the comment. MFC r320339: Correctly handle small MAP_STACK requests. MFC r320344: For now, allow mprotect(2) over the guards to succeed regardless of the requested protection. MFC r320430: Treat the addr argument for mmap(2) request without MAP_FIXED flag as a hint. MFC r320560 (by alc): Modify vm_map_growstack() to protect itself from the possibility of the gap entry in the vm map being smaller than the sysctl-derived stack guard size. Approved by: re (delphij)
* MFC r320314:kib2017-06-271-4/+1
| | | | | | Remove the description of MAP_HASSEMAPHORE. Approved by: re (marius)
* MFC r320313:kib2017-06-271-1/+1
| | | | | | Fix typo. Approved by: re (marius)
* MFC 319490: Remove stale cap_rights_get(2) manpage.jhb2017-06-201-1/+0
| | | | | | | | The documentation moved to section 3 several years ago, but 'man cap_rights_get' pulls up cap_rights_limit(2) (which is MLINKed to cap_rights_get.2) instead of cap_rights_get(3). Approved by: re (gjb)
* MFC r320035:kib2017-06-191-4/+5
| | | | | | | Move the description of kern.kq_calloutmax sysctl into a new paragraph for better presentation. Approved by: re (delphij)
* MFC r320034:kib2017-06-191-1/+2
| | | | | | Start a new sentence on the new line. Approved by: re (delphij)
* MFC r318765:allanjude2017-06-111-1/+7
| | | | | | Allow cpuset_{get,set}affinity in capabilities mode Approved by: re (marius)
* MFC r318816:trasz2017-06-061-1/+1
| | | | | | Don't end up manpage titles with a full stop. Approved by: re (marius)
* MFC r319086:kib2017-05-311-2/+5
| | | | Mention that the basep argument to getdirentries(2) can be NULL.
* MFC r315272, r315370delphij2017-05-311-1/+13
| | | | | | | | | | | | | | | | | | | | | | | r315272: Implement INHERIT_ZERO for minherit(2). INHERIT_ZERO is an OpenBSD feature. When a page is marked as such, it would be zeroed upon fork(). This would be used in new arc4random(3) functions. PR: 182610 Reviewed by: kib (earlier version) Differential Revision: https://reviews.freebsd.org/D427 r315370: The adj_free and max_free values of new_entry will be calculated and assigned by subsequent vm_map_entry_link(), therefore, remove the pointless copying. Submitted by: alc
* MFC r315615:delphij2017-05-311-2/+2
| | | | Make space style consistent with earlier entries.
* MFC r318794, r318795:gjb2017-05-271-2/+2
| | | | | | Update the "first appeared in" version in several manual pages. Sponsored by: The FreeBSD Foundation
* MFC r318314stevek2017-05-251-0/+10
| | | | | | | | | Add information to open(2) man page about the O_VERIFY flag. PR: 219262 Reviewed by: bjk wblock Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc.
* MFC r317845-r317846brooks2017-05-121-2/+16
| | | | | | | | | | | | | | | | | | | | | | r317845: Provide a freebsd32 implementation of sigqueue() The previous misuse of sys_sigqueue() was sending random register or stack garbage to 64-bit targets. The freebsd32 implementation preserves the sival_int member of value when signaling a 64-bit process. Document the mixed ABI implementation of union sigval and the incompability of sival_ptr with pointer integrity schemes. Reviewed by: kib, wblock Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10605 r317846: Regen post r317845. MFC with: r317845 Sponsored by: DARPA, AFRL
* MFC r306771:bdrewery2017-05-091-1/+1
| | | | Improve grammar.
* MFC r315526vangyzen2017-05-015-40/+187
| | | | | | | | | | | | | | | | | | | | | | Add clock_nanosleep() Add a clock_nanosleep() syscall, as specified by POSIX. Make nanosleep() a wrapper around it. Attach the clock_nanosleep test from NetBSD. Adjust it for the FreeBSD behavior of updating rmtp only when interrupted by a signal. I believe this to be POSIX-compliant, since POSIX mentions the rmtp parameter only in the paragraph about EINTR. This is also what Linux does. (NetBSD updates rmtp unconditionally.) Copy the whole nanosleep.2 man page from NetBSD because it is complete and closely resembles the POSIX description. Edit, polish, and reword it a bit, being sure to keep any relevant text from the FreeBSD page. Regenerate syscall files. Relnotes: yes Sponsored by: Dell EMC
* MFC r315694vangyzen2017-03-251-26/+36
| | | | | | | | | | clock_gettime.2: add some clock IDs Add the CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID clock_id values to the clock_gettime(2) man page. Reformat the excessively long paragraph (sentence!) into a tag list. Sponsored by: Dell EMC
* MFC r313690:kib2017-03-191-3/+35
| | | | | | | | Consistently handle negative or wrapping offsets in the mmap(2) syscalls. MFC r315158: Fix two missed places where vm_object offset to index calculation should use unsigned shift.
* MFC r314055vangyzen2017-03-101-58/+54
| | | | | | Make several improvements and corrections in the kenv(2) man page Sponsored by: Dell EMC
* MFC r313174: Clean up documentation of AF_UNIX control messages.jilles2017-02-101-51/+4
| | | | | | | | | | Document AF_UNIX control messages in unix(4) only, not split between unix(4) and recv(2). Also, warn about LOCAL_CREDS effective uid/gid fields, since the write could be from a setuid or setgid program (with the explicit SCM_CREDS and LOCAL_PEERCRED, the credentials are read at such a time that it can be assumed that the process intends for them to be used in this context).
* MFC 310638:jhb2017-02-081-4/+10
| | | | | | | | | | 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 r312332,r312446,r312451:ngie2017-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 r309200:markj2017-02-031-1/+3
| | | | Launder VPO_NOSYNC pages upon vnode deactivation.
* MFC r312547: Mention sendfile(2) by popular demand.wblock2017-01-271-2/+8
| | | | Sponsored by: iXsystems
* MFC 312083:wblock2017-01-201-14/+39
| | | | | | Update the shm_open.2 man page to reflect objective reality. Sponsored by: iXsystems
* 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 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 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 r302624:trasz2016-11-031-2/+5
| | | | Add some .Xrs to getloginclass(2).
* MFH (r306488, r306494, r306495, r306496): fix markup and cross-referencesdes2016-10-222-46/+42
|
* MFC r305628: intro(2),_exit(2): Update for reaper (procctl(PROC_REAP_ACQUIRE)).jilles2016-10-112-5/+10
|
* 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 r306257:kib2016-09-282-3/+98
| | | | | | | Document r306081, i.e. procctl(PROC_TRAPCAP) and sysctl kern.trap_enocap. MFC r306366: Editing fixes for r306257, documentation for trapcap.
* MFC r305956: Add manpage for rctl_* system callsbadger2016-09-242-0/+225
| | | | | Approved by: kib (mentor) Sponsored by: Dell Technologies
* MFC r304285:kib2016-09-162-10/+19
| | | | Implement userspace gettimeofday(2) with HPET timecounter.
* MFC r304928:kib2016-09-033-2/+68
| | | | | | | | | | | | | Do not obliterate errno value in the main thread during ptrace(2) call on x86. MFC r304931: Follow ABI when calling __error from the ptrace(2) wrapper. MFC r305012: Rewrite ptrace(2) wrappers in C. MFC r305022: Restore the requirement of setting errno to zero before calling ptrace(2).
* MFC r305024:kib2016-09-011-41/+41
| | | | Typesetting fixes.
* MFC r304287:kib2016-08-292-4/+48
| | | | Add fdatasync(2) man page, combined with fsync(2).
* MFC r304209:kib2016-08-293-0/+48
| | | | The fdatasync(2) call must be cancellation point.
* MFC r304176:kib2016-08-291-0/+6
| | | | Add a trivial implementation of fdatasync(2).
* MFC 304476: Fix various nits in the aio operation manpages.jhb2016-08-224-26/+15
| | | | | | | | | | | | | | | | | | - Avoid double use of "request" in a single sentence. Instead, describe aio_sigevent as being used to request notification of the associated operation's completion. This matches the language used to describe aio_sigevent in aio(4). - Simplify the prohibition on modifying buffers while requests are in flight. - Fix case mismatch. - Drop note about not using stack variables. C programmers should be able to figure out if a stack variable is safe based on the later warning about the life cycle requirements of control blocks. - Remove prohibition on modifying the I/O buffer for aio_fsync() since it does not use an I/O buffer. For aio_mlock(), prohibit modifications to the mapping (e.g. due to mprotect, munmap, mmap, etc.) but do not prohibit modifications to the memory backing the buffer (stores into the pages backing the buffer).
* MFC r304288:bdrewery2016-08-201-6/+0
| | | | Garbage collect _umtx_lock(2)/_umtx_unlock(2) references removed in r263318.
* MFC 303001: Add PTRACE_VFORK to trace vfork events.jhb2016-08-191-0/+42
| | | | | | | | | First, PL_FLAG_FORKED events now also set a PL_FLAG_VFORKED flag when the new child was created via vfork() rather than fork(). Second, a new PL_FLAG_VFORK_DONE event can now be enabled via the PTRACE_VFORK event mask. This new stop is reported after the vfork parent resumes due to the child calling exit or exec. Debuggers can use this stop to reinsert breakpoints in the vfork parent process before it resumes.
* MFC 302900,302902,302921,303461,304009:jhb2016-08-151-41/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mask of optional ptrace() events. 302900: Add a test for user signal delivery. This test verifies we get the correct ptrace event details when a signal is posted to a traced process from userland. 302902: Add a mask of optional ptrace() events. ptrace() now stores a mask of optional events in p_ptevents. Currently this mask is a single integer, but it can be expanded into an array of integers in the future. Two new ptrace requests can be used to manipulate the event mask: PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK sets the current event mask. The current set of events include: - PTRACE_EXEC: trace calls to execve(). - PTRACE_SCE: trace system call entries. - PTRACE_SCX: trace syscam call exits. - PTRACE_FORK: trace forks and auto-attach to new child processes. - PTRACE_LWP: trace LWP events. The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS. The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for compatibility but now simply toggle corresponding flags in the event mask. While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both modify the event mask and continue the traced process. 302921: Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL. 303461: Note that not all optional ptrace events use SIGTRAP. New child processes attached due to PTRACE_FORK use SIGSTOP instead of SIGTRAP. All other ptrace events use SIGTRAP. 304009: Remove description of P_FOLLOWFORK as this flag was removed.
* MFC r303104, r303106:brooks2016-08-031-2/+21
| | | | | | | | | | | | | | | | | | Update to reflect the fact that pipe() is a wrapper around the pipe2() system call. Reviewed by: jhb, wblock Sponsored by: DAPRA, AFRL Change wording to use function rather than system call in the description as well. Authored by: zeising Reviewed by: brooks Approved by: re (gjb) Sponsored by: DAPRA, AFRL
* MFC 303164: Add more documentation regarding unsafe AIO requests.jhb2016-07-284-20/+16
| | | | | | | | | | | | | | | | | | | | | The asynchronous I/O changes made previously result in different behavior out of the box. Previously all AIO requests failed with ENOSYS / SIGSYS unless aio.ko was explicitly loaded. Now, some AIO requests complete and others ("unsafe" requests) fail with EOPNOTSUPP. Reword the introductory paragraph in aio(4) to add a general description of AIO before describing the vfs.aio.enable_unsafe sysctl. Remove the ENOSYS error description from aio_fsync(2), aio_read(2), and aio_write(2) and replace it with a description of EOPNOTSUPP. Remove the ENOSYS error description from aio_mlock(2). Log a message to the system log the first time a process requests an "unsafe" AIO request that fails with EOPNOTSUPP. This is modeled on the log message used for processes using the legacy pty devices. Approved by: re (gjb)
* MFC 302899: Add documentation for the sigevent structure.jhb2016-07-257-22/+175
| | | | | | | | | | | | - Add a sigevent(3) manpage to give a general overview of the sigevent structure and the available notification mechanisms. - Document that AIO requests contain a nested sigevent structure that can be used to request completion notification. - Expand the sigevent details in other manuals to note details such as the extra values stored in a queued signal's information or in a posted kevent. Approved by: re (gjb)
* fcntl(2): Document interrupt/restart for file locks.jilles2016-07-071-1/+22
| | | | | | | | | | | | | Since r302216, thread suspension causes advisory file locks to restart (instead of continuing to wait) and for a long time SA_RESTART has affected advisory file locks. These are both not compliant to POSIX.1. To clarify that restarting means something, add a paragraph about fair queuing. Note that the network lock manager does not implement fair queuing. Reviewed by: kib (previous version) Approved by: re (gjb)
OpenPOWER on IntegriCloud