summaryrefslogtreecommitdiff
path: root/lib/libc/sys
Commit message (Collapse)AuthorAgeFilesLines
* MFC r334176:Brooks Davis2018-05-311-1/+16
| | | | | | | | | | | | | | | | | | Indicate the brk/sbrk are deprecated and not portable. More firmly suggest mmap(2) instead. Include the history of arm64 and riscv shipping without brk/sbrk. Mention that sbrk(0) produces unreliable results. Approved by: re (kib) Reviewed by: emaste, Marcin Cieślak Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15535 Notes: svn path=/stable/11/; revision=334439
* MFC r334111:Konstantin Belousov2018-05-261-1/+2
| | | | | | | | | Note that PT_SETSTEP is auto-cleared. Approved by: re (marius) Notes: svn path=/stable/11/; revision=334241
* MFC r333521:Konstantin Belousov2018-05-151-2/+2
| | | | | | | | | PROC_PDEATHSIG_CTL will appear first in 11.2. Approved by: re (marius) Notes: svn path=/stable/11/; revision=333628
* MFC r332740:Konstantin Belousov2018-05-021-1/+46
| | | | | | | | | | | | | Add PROC_PDEATHSIG_SET to procctl interface. MFC r332825: Rename PROC_PDEATHSIG_SET -> PROC_PDEATHSIG_CTL. MFC r333067: Remove redundant pipe from pdeathsig.c test. Notes: svn path=/stable/11/; revision=333162
* Revert r330897:Eitan Adler2018-03-296-13/+1
| | | | | | | | | | | | | | | | | | | | This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code. Revert with prejudice. This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes. Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes. Requested by: gjb (re) Notes: svn path=/stable/11/; revision=331722
* MFC r323623: rename(2): document capability mode errorsEd Maste2018-03-281-1/+24
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=331688
* MFC r325422: posix_fallocate.2: add an EINVAL errno caseEd Maste2018-03-281-3/+4
| | | | | | | | | | | | | | | | | As of r325320 in HEAD posix_fallocate returns EINVAL on ZFS to indicate that the underlying filesystem does not support this operation, per POSIX.1-2008. Document this case in the man page. Note that r325320 has not yet been merged to stable/11, and may or may not be. However, we should document that EINVAL may be returned if the filesystem does not support posix_fallocate (even if we don't actually do so in stable/11), as software should be prepared to handle that case. Discussed with: avg Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=331687
* MFC r324560: allow posix_fallocate in capability modeEd Maste2018-03-281-1/+5
| | | | | | | | | | | | | | posix_fallocate is logically equivalent to writing zero blocks to the desired file size and there is no reason to prevent calling it in capability mode. posix_fallocate already checked for the CAP_WRITE right, so we merely need to list it in capabilities.conf. Also MFC r324564: allow posix_fallocate in 32-bit compat capability mode Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=331679
* MFC Capsicum open(2) and openat(2) documentationEd Maste2018-03-281-1/+34
| | | | | | | | | | | | | | | | | | | r306537 by cem: open.2: Document Capsicum behavior Document open(2) and openat(2) behavior in Capsicum capability mode. Sponsored by: Dell EMC Isilon r323622 by emaste: open(2): update ENOTCAPABLE description for .. lookups After r308732 (MFC of r308212) Capsicum permits .. lookups in capability mode, as long as path component traversal does not escape the directory corresponding to the provided file descriptor. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=331678
* MFC r331260:Mark Johnston2018-03-261-4/+2
| | | | | | | Remove a lingering inaccuracy from mlock.2. Notes: svn path=/stable/11/; revision=331555
* MFC r326437:Eitan Adler2018-03-199-16/+22
| | | | | | | | | | Correct history for Unix 2nd Edition through 6th Edition for the system calls. Man pages are missing for v2 and v5, so any entries for those versions were inferred by new implementations of these functions in libc. Notes: svn path=/stable/11/; revision=331185
* MFC r331016:Mark Johnston2018-03-181-5/+5
| | | | | | | Add a space between a section number and a following comma. Notes: svn path=/stable/11/; revision=331133
* MFC r328959:Eitan Adler2018-03-171-1/+2
| | | | | | | fsync.2: Cross-reference fsync(1) Notes: svn path=/stable/11/; revision=331087
* Partial merge of the SPDX changesEitan Adler2018-03-146-1/+13
| | | | | | | | | | These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg Notes: svn path=/stable/11/; revision=330897
* MFC r330409:Brooks Davis2018-03-123-30/+36
| | | | | | | | | | | | | | | Refer to SysV IPC permissions as numeric constants. POSIX defines no macros for these permissions. Also remove unneeded headers from synopsis. PR: 225905 Reviewed by: wblock Differential Revision: https://reviews.freebsd.org/D14461 Notes: svn path=/stable/11/; revision=330800
* MFC r328266:Alan Somers2018-02-221-3/+3
| | | | | | | | | | | | | | | | mlock(2): correct documentation for error conditions. The man page is years out of date regarding errors. Our implementation _does_ allow unaligned addresses, and it _does_not_ check for negative lengths, because the length is unsigned. It checks for overflow instead. Update the tests accordingly. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D13826 Notes: svn path=/stable/11/; revision=329790
* MFC of 328304 and 328382.Kirk McKusick2018-02-061-1/+18
| | | | | | | Do not dedup egid (group entry 0) Notes: svn path=/stable/11/; revision=328942
* MFC r326122:Konstantin Belousov2017-11-301-2/+5
| | | | | | | | | | Kill all descendants of the reaper, even if they are descendants of a subordinate reaper. Also, mark reapers when listing pids. PR: 223745 Notes: svn path=/stable/11/; revision=326396
* MFC r322258, r324941, r324956, r325018Alan Somers2017-11-282-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r322258: Make p1003_1b.aio_listio_max a tunable p1003_1b.aio_listio_max is now a tunable. Its value is reflected in the sysctl of the same name, and the sysconf(3) variable _SC_AIO_LISTIO_MAX. Its value will be bounded from below by the compile-time constant AIO_LISTIO_MAX and from above by the compile-time constant MAX_AIO_QUEUE_PER_PROC and the tunable vfs.aio.max_aio_queue. Reviewed by: jhb, kib Relnotes: yes Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D11601 r324941: Remove artificial restriction on lio_listio's operation count In r322258 I made p1003_1b.aio_listio_max a tunable. However, further investigation shows that there was never any good reason for that limit to exist in the first place. It's used in two completely different ways: * To size a UMA zone, which globally limits the number of concurrent aio_suspend calls. * To artifically limit the number of operations in a single lio_listio call. There doesn't seem to be any memory allocation associated with this limit. This change does two things: * Properly names aio_suspend's UMA zone, and sizes it based on a new constant. * Eliminates the artifical restriction on lio_listio. Instead, lio_listio calls will now be limited by the more generous max_aio_queue_per_proc. The old p1003_1b.aio_listio_max is now an alias for vfs.aio.max_aio_queue_per_proc, so sysconf(3) will still work with _SC_AIO_LISTIO_MAX. Reported by: bde Reviewed by: jhb Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D12120 r324956: Bump man page revision dates for r324941 Reported by: jhb X-MFC-with: 324941 Sponsored by: Spectra Logic Corp r325018: Fix aio_suspend in 32-bit emulation An off-by-one error has been present since the system call was first present in 185878. It additionally became a memory corruption bug after change 324941. The failure is actually revealed by our existing AIO tests. However, apparently nobody's been running those in 32-bit emulation mode. Reported by: Coverity, cem CID: 1382114 X-MFC-With: 324941 Sponsored by: Spectra Logic Corp Notes: svn path=/stable/11/; revision=326322
* MFC r325766Eric van Gyzen2017-11-161-60/+70
| | | | | | | | | | | | | | | Fix formatting of _umtx_op(2) Do not use macros in the -width of a .Bl, since mandoc does not support them. Fix issues reported by igor and mandoc -Tlint. Use a .Bl for list of clock IDs instead of a comma list. Sponsored by: Dell EMC Notes: svn path=/stable/11/; revision=325905
* MFC 323581,323582,323583: Add ptrace operations for VFP registers.John Baldwin2017-11-141-1/+23
| | | | | | | | | | | | | | | | | | | | 323581: Only mess with VFP state on the CPU for curthread for get/set_vfpcontext. Future changes will use these functions to fetch and store VFP state for threads other than curthread. 323582: Add ptrace operations to fetch and store VFP registers. 323583: Export get/set_vfpcontext from machdep.c. Should have been part of the previous commit to add ptrace operations for VFP registers. Notes: svn path=/stable/11/; revision=325831
* MFC r324683: write.2: correct maximum nbytes size for EINVAL errorEd Maste2017-10-241-2/+7
| | | | | | | | | | | | | In FreeBSD 11 and later debug.iosize_max_clamp defaults to 0, and the maximum nbytes count for write(2) is SSIZE_MAX. Update the man page to document this, and mention the sysctl that can be set to obtain the previous behaviour. PR: 196666 Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=324942
* MFC r320255Alan Somers2017-08-281-26/+11
| | | | | | | | | | | | | (note that part of 320255 was erroneously MFCed by 322889) Clarify usage of aio(4) with kqueue(2) Reviewed by: jhb MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D11299 Notes: svn path=/stable/11/; revision=322974
* MFC r319875:Konstantin Belousov2017-07-211-1/+21
| | | | | | | | Add ptrace(PT_GET_SC_ARGS) command to return debuggee' current syscall arguments. Notes: svn path=/stable/11/; revision=321345
* MFC r318715,r318717,r318718,r318719,r318720,r318721:Enji Cooper2017-07-186-44/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r318715: _umtx_op(2): fix minor manlint issues - Sort .Xr entries in SEE ALSO section. - Sort SEE ALSO and STANDARDS sections properly, in terms of the entire document. r318717: cap_enter(2): fix manlint issues - Sort SEE ALSO section appropriately. - Correct section for sysctl(9). r318718: rctl_add_rule(2): fix manlint warnings - Fix commas (either missing or misused) after .Nm entries in SYNOPSIS r318719: open(2): fix manlint warnings - Sort SEE ALSO .Xr entries. - Sort sections (HISTORY comes after STANDARDS). r318720: ptrace(2): clean up trailing whitespace r318721: kill(2): add missing section for sysctl(9) Notes: svn path=/stable/11/; revision=321145
* MFC r320801:Konstantin Belousov2017-07-111-3/+5
| | | | | | | Simplify language. Notes: svn path=/stable/11/; revision=320887
* Add MAP_GUARD and use it for stack grow area protection.Konstantin Belousov2017-07-052-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump __FreeBSD_version. 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. Notes: svn path=/stable/11/; revision=320666
* MFC r320314:Konstantin Belousov2017-06-271-4/+1
| | | | | | | | | Remove the description of MAP_HASSEMAPHORE. Approved by: re (marius) Notes: svn path=/stable/11/; revision=320402
* MFC r320313:Konstantin Belousov2017-06-271-1/+1
| | | | | | | | | Fix typo. Approved by: re (marius) Notes: svn path=/stable/11/; revision=320401
* MFC 319490: Remove stale cap_rights_get(2) manpage.John Baldwin2017-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) Notes: svn path=/stable/11/; revision=320150
* MFC r320035:Konstantin Belousov2017-06-191-4/+5
| | | | | | | | | | Move the description of kern.kq_calloutmax sysctl into a new paragraph for better presentation. Approved by: re (delphij) Notes: svn path=/stable/11/; revision=320094
* MFC r320034:Konstantin Belousov2017-06-191-1/+2
| | | | | | | | | Start a new sentence on the new line. Approved by: re (delphij) Notes: svn path=/stable/11/; revision=320092
* MFC r318765:Allan Jude2017-06-111-1/+7
| | | | | | | | | Allow cpuset_{get,set}affinity in capabilities mode Approved by: re (marius) Notes: svn path=/stable/11/; revision=319819
* MFC r318816:Edward Tomasz Napierala2017-06-061-1/+1
| | | | | | | | | Don't end up manpage titles with a full stop. Approved by: re (marius) Notes: svn path=/stable/11/; revision=319618
* MFC r319086:Konstantin Belousov2017-05-311-2/+5
| | | | | | | Mention that the basep argument to getdirentries(2) can be NULL. Notes: svn path=/stable/11/; revision=319310
* MFC r315272, r315370Xin LI2017-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 Notes: svn path=/stable/11/; revision=319277
* MFC r315615:Xin LI2017-05-311-2/+2
| | | | | | | Make space style consistent with earlier entries. Notes: svn path=/stable/11/; revision=319276
* MFC r318794, r318795:Glen Barber2017-05-271-2/+2
| | | | | | | | | Update the "first appeared in" version in several manual pages. Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=318971
* MFC r318314Stephen J. Kiernan2017-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. Notes: svn path=/stable/11/; revision=318893
* MFC r317845-r317846Brooks Davis2017-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 Notes: svn path=/stable/11/; revision=318244
* MFC r306771:Bryan Drewery2017-05-091-1/+1
| | | | | | | Improve grammar. Notes: svn path=/stable/11/; revision=318070
* MFC r315526Eric van Gyzen2017-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 Notes: svn path=/stable/11/; revision=317618
* MFC r315694Eric van Gyzen2017-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 Notes: svn path=/stable/11/; revision=315919
* MFC r313690:Konstantin Belousov2017-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. Notes: svn path=/stable/11/; revision=315563
* MFC r314055Eric van Gyzen2017-03-101-58/+54
| | | | | | | | | Make several improvements and corrections in the kenv(2) man page Sponsored by: Dell EMC Notes: svn path=/stable/11/; revision=315023
* MFC r313174: Clean up documentation of AF_UNIX control messages.Jilles Tjoelker2017-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). Notes: svn path=/stable/11/; revision=313553
* MFC 310638:John Baldwin2017-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. Notes: svn path=/stable/11/; revision=313450
* MFC r312332,r312446,r312451:Enji Cooper2017-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 Notes: svn path=/stable/11/; revision=313240
* MFC r309200:Mark Johnston2017-02-031-1/+3
| | | | | | | Launder VPO_NOSYNC pages upon vnode deactivation. Notes: svn path=/stable/11/; revision=313125
* MFC r312547: Mention sendfile(2) by popular demand.Warren Block2017-01-271-2/+8
| | | | | | | Sponsored by: iXsystems Notes: svn path=/stable/11/; revision=312892