summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Note closefrom(2)'s origins in Solaris 9.cheloha2019-05-311-3/+3
| | | | | | Manpage input from jmc@ and schwarze@, archaeological input from schwarze@. ok schwarze@
* Enable the use of the kernel __realpath() system call in the libc wrapper.beck2019-05-281-2/+2
| | | | | | | | For now, this also still uses the existing realpath implmentation and emits a syslog if we see differening results. Once we have run with that for a little while we will remove the old code ok deraadt@
* Tweak "RETURN VALUES" sections to mention setting errno, as so manykrw2019-05-262-9/+18
| | | | | | | other man pages do. ok schwarze@ guenther@ on socket(2). "Similar" tweak on accept(2) requested by guenther@.
* Document KERN_PFSTATUSclaudio2019-05-091-2/+7
|
* add an extra m where needed. spotted by Kent Watsentedu2019-05-071-4/+4
|
* sync the description of bufcachepercent; ok deraadtjmc2019-05-051-2/+2
|
* kern.bufcachepercent is actually for dma-reachable memory.deraadt2019-05-051-4/+3
| | | | While here, stop describing the default (wrong place to be so specific)
* basic macro cleanup; from Fabio Scotoni <fabio at esse dot ch>schwarze2019-05-031-68/+79
|
* adjust another bufcachepercent defaultanton2019-04-211-3/+3
|
* describe EIO failure state. noted by Maximilian Lorlackstedu2019-04-181-2/+12
|
* Restrict which filesystems are available for swap. This rules outvisa2019-04-021-2/+6
| | | | | | obvious misconfigurations that cannot work. OK mpi@ tedu@
* adjtime(2): set EINVAL if delta overflows 64 bits of microseconds.cheloha2019-03-261-3/+13
| | | | | | | | | | | | | | | | No other (known) BSD-derived adjtime(2) implementation checks for overflow when converting delta into its final denomination of fractional seconds. This is peculiar, as the call originates in 4.3BSD. However, glibc, uclibc, and (to an extent) musl /do/ check the input and set EINVAL if it exceeds a certain bound, so we'll just use the errno that they use to be consistent with extant practice. Prompted by the comment kettenis@ left when we switched to storing the adjustment in an int64_t like ~5 years ago (kern_time.c,v 1.87). Positive feedback from deraadt@, manpage bits ok jmc@, no code complaints from otto@ or tedu@.
* fix copy pasto: flag -> atflags; ok deraadt@ jca@ millert@anton2019-03-251-4/+4
|
* BUGS goes last;jmc2019-03-241-7/+6
|
* Document the fact that readlink(2) can bypass restrictions as neededbeck2019-03-241-2/+10
| | | | | by realpath(3). This will go away post 6.5. ok deraadt@
* Reference permissions in the canonical plural.rob2019-03-211-3/+3
| | | | ok jmc@
* Document MAP_CONCEAL. Prompted by jmc@. ok otto@ schwarze@.cheloha2019-03-171-3/+6
|
* talk about IPv4 and IPv6 in a more symmetrical wayschwarze2019-03-031-4/+4
| | | | | and avoid an anachronistic wording found by deraadt@; joint work with deraadt@
* Allow SO_PEERCRED to be called on sockets created with socketpair.martijn2019-02-131-4/+5
| | | | OK claudio@ and jca@
* Add lock stack trace saving for witness(4).visa2019-02-071-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets witness(4) save a stack trace on each lock acquisition. The saved traces can be viewed in ddb(4) when showing the currently held locks, which may help when debugging incorrect locking. Sample output: ddb{0}> show all locks Process 63836 (rm) thread 0xffff8000221e52c8 (435004) exclusive rrwlock inode r = 0 (0xfffffd8119a092c0) locked @ /usr/src/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x419 #1 _rw_enter+0x2bb #2 _rrw_enter+0x42 #3 VOP_LOCK+0x3f #4 vn_lock+0x36 #5 vfs_lookup+0xa1 #6 namei+0x2b3 #7 dounlinkat+0x85 #8 syscall+0x338 #9 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 1 (0xffffffff81e6a5f0) locked @ /usr/src/sys/arch/amd64/amd64/intr.c:525 #0 witness_lock+0x419 #1 syscall+0x2b6 #2 Xsyscall+0x128 The saving adds overhead, so it is not enabled by default. It can be taken into use by setting sysctl kern.witness.locktrace=1 at runtime or by defining WITNESS_LOCKTRACE in the kernel configuration. Feedback and OK anton@
* Add manpage for timer* macros, actually document timespec* macros.cheloha2019-02-071-91/+3
| | | | | | | | | | | | | | We use these all over the tree so they ought to be documented on a separate page; move them out of getitimer.2 into timeradd.3. While moving, clean up the language and markup here and there. Still needs to be added to share/man/man3/Makefile, pending any further cleanup in-tree. With input from schwarze@, jmc@, and millert@. "looks great" deraadt@, "(ok)" jmc@, ok tedu@, "we'll spruce it up in-tree" schwarze@
* Add a dedicated sysctl(2) node for witness(4).visa2019-01-291-4/+15
| | | | | | | | The new node contains the subsystem's main control variable, kern.witness.watch. It is aliased by the old name, kern.witnesswatch. The alias will be removed in the future. OK anton@ mpi@
* Point people to ipcomp(4) instead of ipsecctl(8) forajacoutot2019-01-221-3/+3
| | | | | | net.inet.ipcomp.enable. ok deraadt@ bluhm@
* Document 'video' promise.landry2019-01-211-2/+27
| | | | looks fine to jmc@
* correct the RETURN VALUES of the macros, document the HISTORY ofschwarze2019-01-201-9/+37
| | | | | the macros, and simplify one wording; OK millert@, tweak and OK jmc@
* sys/time.h: new macros: timerisvalid() and timespecisvalid().cheloha2019-01-181-2/+10
| | | | | | | | | | | Make it less likely you miss a zero when typing out 100000 or 100000000. Document them in getitimer.2 for the masses. These may be of use in library code as well as the kernel. Comparable inline functions exist in Linux but are not available to userspace like these. "OK." deraadt@
* minor tweaks:schwarze2019-01-181-9/+17
| | | | | | * correctly mark up NULL * avoid gratuitous future tense * replace one wrong .Nm macro
* Adjust EINVAL wording: tv_nsec cannot be 1 billion, either.cheloha2019-01-181-3/+4
|
* futex(2): validate relative timeout before sleeping.cheloha2019-01-181-2/+7
| | | | | | | | Linux does validation. Document this new failure case as an EINVAL, like Linux. "stop waiting" deraadt
* adjtime(2), settimeofday(2), clock_settime(2): validate inputcheloha2019-01-182-6/+15
| | | | | | | | | Add documentation for the new EINVAL cases for adjtime(2) and settimeofday(2). adjtime.2 docs ok schwarze@, settimeofday(2)/clock_settime(2) stuff ok tedu@, "stop waiting" deraadt@
* mincore() is a relic from the past, exposing physical machine informationderaadt2019-01-1110-93/+19
| | | | | | | about shared resources which no program should see. only a few pieces of software use it, generally poorly thought out. they are being fixed, so mincore() can be deleted. ok guenther tedu jca sthen, others
* getsockopt(2) recv(2) rmdir(2) and send(2) were present and implementedjsg2019-01-114-12/+12
| | | | | | in 4.1c ok schwarze@
* make spelling in previous consistent within the page;jmc2019-01-091-3/+3
|
* Document SO_ZEROIZE socket option.bluhm2019-01-081-2/+9
| | | | OK claudio@
* Fix most of the .Li abuse:schwarze2019-01-061-47/+49
| | | | | | | | | * Use .Vt for struct names and other type names like in_port_t. * Use .Dv for #define'd constants like CPUSTATES and KERN_SYSVIPC_INFO. * Use .Va for sysctl variable names like "machdep". Not touching some of the .Li use related to networking; that stuff looks suspicious in more than one way and a diff would need review.
* note that tracefile must be null when clearing points.tedu2019-01-061-7/+4
| | | | ok kn
* nanosleep: loop tsleep(9) to ensure coverage of the full timeout range.cheloha2018-12-311-4/+5
| | | | | | | | | | | | tsleep(9)'s maximum timeout shrinks as HZ grows, so this ensures we do not return early from longer timeouts on alpha or on custom kernels. POSIX says you cannot return early unless a signal is delivered, so this makes us more compliant with the standard. While here, remove the 100 million second upper bound. It is an artifact from itimerfix() and it serves no discernible purpose. ok tedu@ visa@
* document kern.pool_debug; ok tedu@anton2018-12-261-2/+20
|
* remove double .Pp. oops - sorry for not spotting!jmc2018-11-291-2/+1
|
* Improve introduction so there is more clarity about the patterns ofderaadt2018-11-291-17/+17
| | | | unveil calls should follow. ok various, including jmc
* fold the contents of malloc.conf.5 into malloc.3 and sysctl.2,jmc2018-11-211-5/+7
| | | | | | now that there is essentially no malloc.conf; text tweaked by deraadt; ok otto deraadt
* delete the dns jackport experiment. it has no future.tedu2018-11-191-6/+2
|
* Add new KERN_CPUSTATS sysctl(2) so we can identify offline CPUs.cheloha2018-11-171-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of hw.smt we need a way to determine whether a given CPU is "online" or "offline" from userspace. KERN_CPTIME2 is an array, and so cannot be cleanly extended for this purpose, so add a new sysctl(2) KERN_CPUSTATS with an extensible struct. At the moment it's just KERN_CPTIME2 with a flags member, but it can grow as needed. KERN_CPUSTATS appears to have been defined by BSDi long ago, but there are few (if any) packages in the wild still using the symbol so breakage in ports should be near zero. No other system inherited the symbol from BSDi, either. Then, use the new sysctl(2) in systat(1) and top(1): - systat(1) draws placeholder marks ('-') instead of percentages for offline CPUs in the cpu view. - systat(1) omits offline CPU ticks when drawing the "big bar" in the vmstat view. The upshot is that the bar isn't half idle when half your logical CPUs are disabled. - top(1) does not draw lines for offline CPUs; if CPUs toggle on or offline in interactive mode we redraw the display to expand/reduce space for the new/missing CPUs. This is consistent with what some top(1) implementations do on Linux. - top(1) omits offline CPUs from the totals when CPU totals are combined into a single line (the '-1' flag). Originally prompted by deraadt@. Discussed endlessly with deraadt@, ketennis@, and sthen@. Tested by jmc@ and jca@. Earlier versions also discussed with jca@. Earlier versions tested by jmc@, tb@, and many others. docs ok jmc@, kernel bits ok ketennis@, everything ok sthen@, "Is your stuff in yet?" deraadt@
* Do not translate the EACCES error from pf(4) to EHOSTUNREACH anymore.bluhm2018-11-101-5/+7
| | | | | | It also translated a documented send(2) EACCES case erroneously. This was too much magic and always prone to errors. from Jan Klemkow; man page jmc@; OK claudio@
* Conform to POSIX-2001 in which the behavior of passing a negative length usinganton2018-11-101-3/+18
| | | | | | | posix file locks is defined. Also, detect overflows when dealing with positive lengths. ok millert@ visa@
* zap last remains of malloc.conf; prompted by and ok jmc@otto2018-11-081-5/+2
|
* typo on fs.posix.setuid; from Piotr Durlejotto2018-11-061-2/+2
|
* vm.malloc_conf, userland sysctl parts; ok millert@ deraadt@otto2018-11-061-2/+7
|
* add missing NET_RT_TABLEdenis2018-11-041-2/+3
| | | | OK benno@
* Correctly deal with upper level unveil's by keeping track of the coveringbeck2018-10-281-13/+2
| | | | | | | unveil for each unveil in the process at unveil() time, and refactoring the handling of current directory and ISDOTDOT to be much more sensible. Worked out at ns2k18 with guenther@. ok deraadt@