summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spelling fix;jmc2020-06-221-2/+2
|
* Extend kqueue interface with EVFILT_EXCEPT filter.mpi2020-06-221-2/+9
| | | | | | | | | | This filter, already implemented in macOS and Dragonfly BSD, returns exceptional conditions like the reception of out-of-band data. The functionnality is similar to poll(2)'s POLLPRI & POLLRDBAND and it can be used by the kqfilter-based poll & select implementation. ok millert@ on a previous version, ok visa@
* Remove an outdated BUGS section.visa2020-05-311-6/+2
| | | | OK mpi@ beck@
* Fix forgotten references to removed mixer.4 manualratchov2020-05-171-4/+2
|
* Clairify the point at which unveil first makes restricitons on thebeck2020-04-251-9/+4
| | | | | | filesystem, and remove the BUGS section, as this was fixed by making realpath() a system call. ok ingo@ deraadt@
* move mixerctl and audioctl man pages to section 8, as these workderaadt2020-04-211-3/+3
| | | | against root-only device nodes.
* Update ARG_MAX bytes countjca2020-04-101-3/+3
| | | | ok deraadt@
* typo; from bryan stensonjmc2020-03-111-3/+3
|
* Some system calls can fail due to an open-ended variety of causesschwarze2020-02-113-10/+10
| | | | | | | | | | | in many underlying subsystems and device drivers. guenther@ pointed out this applies to system calls taking a file descriptor as an argument. deraadt@ warned against attempting to be excessively precise and against spreading fear, uncertainty, and doubt. So apply a minimal patch that merely avoids the misleading wording "will succeed unless", given that the lists aren't really exhaustive, and simply uses a more usual wording. Unfortunate wording reported by <David dot Raymond at nmt dot edu>.
* A getlogin() function which used utmp(5) appeared in v7.jsg2020-02-091-4/+12
| | | | | | | This was replaced by a getlogin() system call which Ingo discovered we incorrectly list as being 4.2BSD when it was introduced in 4.3BSD Reno. ok schwarze@
* correct Research Unix edition "appeared in" use in HISTORYjsg2020-02-082-6/+6
| | | | | | | | | | | | | | | | | Starting from "Combined Table of Contents" in Doug McIlroy's "A Research UNIX Reader" a table of which edition manuals appeared in. Checked against manuals from bitsavers/TUHS and source from TUHS where available. Ingo points out there are cases where something is included but not documented until a later release. bcd(6) v6 v7 printf(3) v2 v4 abort(3) v5 v6 system(3) v6 v7 fmod(3) v5 v6 ok schwarze@
* Mention AUDIO_MIXER_{DEVINFO,READ,WRITE} in the "audio" sectionratchov2020-02-051-3/+6
|
* Document `kern.allowdt' button.mpi2020-01-241-2/+10
| | | | sysctl.2 bits from benno@
* It is believed that an implementation of madvise was available injsg2019-12-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SunOS 4.0 based on text from the following papers. "Two 4.2BSD system calls, madvise and mincore, remain unspecified, madvise is intended to provide information to the system to influence its management policies. Since a major rework of such policies was deferred to a future release, we decided to defer full specification and implementation of madvise until that time." R. Gingell, J. Moran, W. Shannon "Virtual Memory Architecture in SunOS" Proceedings of USENIX Summer Conference, June 1987 AUUGN Volume 8 Number 5, October 1987 "Memory management related system calls based on the original 4.2BSD specification that were implemented include mmap, munmap, mprotect, madvise, and mincore." J. Moran "SunOS Virtual Memory Implementation" Proceedings of the Spring 1988 European UNIX Users Group Conference, April 1988 AUUGN Volume 9 Number 3, June 1988 and a reference in "Global Index", Part Number: 800-1758-10, Revision A, of 9 May 1988 bitsavers pdf/sun/sunos/4.0/800-1758-10A_Global_Index_198805.pdf discussed with an ok schwarze@
* In "4.2BSD System Manual" (/usr/doc/sysman in 4.2BSD source)jsg2019-12-215-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | mmap(), munman(), madvise() and mprotect() are described as planned for later releases. A fully functional mmap(2) supporting shared libraries first appeared in SunOS 4.0 along with msync(2). SunOS 4.1 added madvise(3) and replaced msync(2) with mctl(2) which was was used to implement msync(3), mlock(3) and munlock(3). While some of these functions appear as empty or ifdef'd functions in 4.1cBSD and later it was not until the Mach VM was integrated with Net/2 that most of them were implemented. Though the CSRG releases never supported shared libraries or madvise(). mlock()/munlock() were not in Net/2 as they were added by hibler in 1993, but were in 4.4BSD. madvise(2) was implemented for UVM in NetBSD 1.5 and ported to OpenBSD 2.7. For now instead of trying to accurately describe when interfaces first appeared in other systems correct when they were first available in CSRG or OpenBSD releases, retaining the text in mmap(2) discussing SunOS 4.0. madvise(2) 4.4BSD -> OpenBSD 2.7 mmap2(2) 4.4BSD -> 4.3BSD Net/2 mprotect(2) 4.4BSD -> 4.3BSD Net/2 msync(2) 4.4BSD -> 4.3BSD Net/2 munmap(2) 4.1cBSD -> 4.3BSD Net/2
* The msync interface first appeared in SunOS 4.0.jsg2019-12-101-3/+4
|
* Adjust history text.jsg2019-12-101-5/+8
| | | | | | | A fully functional mmap() system call first appeared in SunOS 4.0 and has been available since 4.4BSD. wording from and ok schwarze@ input from deraadt@
* tweak previous;jmc2019-12-081-13/+13
|
* Make sure packet destination address matches interface address,sashan2019-12-081-2/+12
| | | | | | | | | where such packet is bound to. This check is enforced if and only IP forwarding is disabled. Change discussed with bluhm@, claudio@, deraadt@, markus@, tobhe@ OK bluhm@, claudio@, tobhe@
* replace links to uvm(9) to uvm_init(9); ok mpijmc2019-12-061-3/+3
|
* Explicitly say that *permissions can be "".schwarze2019-12-061-3/+4
| | | | | | Potential for misunderstanding noticed by Chris Rawnsley <chris at puny dot agency>, wording proposed by deraadt@, patch sent by Chris Rawnsley, OK deraadt@.
* Document IP6_SOIIKEY_LENkn2019-12-051-3/+6
| | | | OK florian jmc
* comply with POSIX and make execve() return EACCES for directoriesnaddy2019-12-011-4/+2
| | | | ok millert@ deraadt@
* tweak previous: add missing name after .Fn, delete stray .Pp,schwarze2019-11-271-4/+2
| | | | and drop NetBSD RCS tag apparently left over from copy & paste
* Document msyscall(2): ld.so can use this (once only) to tell the kernelderaadt2019-11-272-2/+76
| | | | | | | where libc.so's text segment is, thereby allowing invocation of system calls from that region. An upcoming change will kill the process if a system call is invoked from addresses not explicitly permitted. ok guenther kettenis mortimer
* MPLSCTL_MAXINKLOOP (net.mpls.maxloop_inkernel) was removed. Adjust manpage.claudio2019-11-051-8/+3
|
* mobileip(4) is going to the atticdlg2019-10-291-7/+2
|
* 1) don't repeat the 256 / EIO commentaryderaadt2019-09-281-7/+6
| | | | | 2) say that the data comes from the random(4) subsystem, so that curious people can go read up on how this works
* sbrk(2) already existed in Version 4 AT&T UNIX;schwarze2019-09-081-5/+7
| | | | | source: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/break.2 pointed out by Sevan Janiyan <venture37 at geeklan dot co dot uk>
* more Version 1 AT&T UNIX history:schwarze2019-09-071-5/+11
| | | | | a few cases that weren't altogether straightforward; tweak and OK jmc@, OK sobrado@
* More Version 1 AT&T UNIX history.schwarze2019-09-061-14/+12
| | | | | | This became possible because copies of the original v1 manuals have shown up on the Internet some time ago. Reminded by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
* Correct the description of EINTR and EINVAL. This looks like a mis-mergeasou2019-09-061-6/+8
| | | | | | in revision 1.30. ok deraadt@ tb@
* gettimeofday, settimeofday(2): limit timezone supportcheloha2019-09-041-31/+31
| | | | | | | | | | | | | | | | | | | | | | For gettimeofday(2), always copy out an empty timezone struct. For settimeofday(2), still copyin(9) the struct but ignore the contents. In gettimeofday(2)'s case we have not changed the original BSD semantics: the kernel only tracks UTC time without an offset for DST, so a zeroed timezone struct is the correct thing to return to the caller. Future work could move these out into libc as stubs for clock_gettime and clock_settime(2). But, definitely a "later" thing, given that we are in beta. Update the manpage to de-emphasize the timezone parameters for these syscalls. Discussed with tedu@, deraadt@, millert@, kettenis@, yasuoka@, jca@, and guenther@. Tested by job@. Ports input from jca@ and sthen@. Manpage input from jca@. ok jca@ deraadt@
* sysctl(2): add kern.utc_offset: successor to the DST/TIMEZONE options(4)cheloha2019-08-211-1/+18
| | | | | | | | | | | | | | | | | | | | | The DST and TIMEZONE options(4) are incompatible with KARL, so we need some other way to compensate for an RTC running with a known offset. Enter kern.utc_offset, an offset in minutes East of UTC. TIMEZONE has always been minutes West, but this is inconsistent with how everyone else talks about timezones, hence the flip. TIMEZONE has the advantage of being compiled into the binary. Our new sysctl(2) has no such luck, so it needs to be set as early as possible in boot, from sysctl.conf(5), so we can correct the kernel clock from the RTC's local time to UTC before daemons like ntpd(8) and cron(8) start. To encourage this, kern.utc_offset is made immutable after the securelevel(7) is raised to 1. Prompted by yasuoka@. Discussed with deraadt@, kettenis@, yasuoka@. Additional testing by yasuoka@. ok deraadt@, yasuoka@
* Remove support for semantically opace interface identifiers (RFC 7217)florian2019-08-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for IPv6 link local addresses. Some hosting and VM providers route customer IPv6 prefixes to link local addresses derived from ethernet MAC addresses (RFC 2464). This leads to hard to debug IPv6 connectivity problems and is probably not worth the effort. RFC 7721 lists 4 weaknesses: 3.1. Correlation of Activities over Time & 3.2. Location Tracking These are still possible with RFC 7217 addresses for an adversary connected to the same layer 2 network (think conference wifi). Since the link local prefix stays the same (fe80::/64) the link local addresses do not change between different networks. An adversary on the same layer 2 network can probably track ethernet MAC addresses via different means, too. 3.3. Address Scanning & 3.4. Device-Specific Vulnerability Exploitation These now become possible, however, as noted above a layer 2 adversary was probably able to do this via different means. People concerned with these weaknesses are advised to use ifconfig lladdr random. OK benno input & OK kn
* Document ip.arpq and remove ip, ip6 and mpls ifq.denis2019-08-111-45/+27
| | | | ok deraadt@
* No specific called "exec(3)", so move primary manpage to a name whichderaadt2019-08-113-10/+10
| | | | | | | | does exist -- execv(3). Still call this a family but without "Nm". Adjust Xr in various pages to refer to the precise function used rather than the family, in most cases the semantics of execve(2) are being referenced, so change the Xr. ok jmc
* correct mispellings of EACCES; from Kris Katterjohnderaadt2019-07-292-6/+6
|
* Basic macro cleanup, mostly .Nm -> .Fn because .Nm is not a thingschwarze2019-07-251-11/+13
| | | | in section 2 and 3; bluhm@ drew my attention to this.
* basic macro cleanupschwarze2019-07-251-41/+41
|
* Show unveil(2) violators in lastcomm(1) output and daily mail.bluhm2019-07-251-2/+8
| | | | input Janne Johansson, schwarze@; OK deraadt@ millert@
* implement SO_DOMAIN and SO_PROTOCOL so that the domain and the protocolrobert2019-07-221-3/+15
| | | | | | | | can also be retrieved with getsockopt(3) it looks like these will also be in the next issue of posix: http://austingroupbugs.net/view.php?id=840#c2263 ok claudio@, sthen@
* obvious bugfix: if the queue is removed while message transmission isschwarze2019-07-182-4/+4
| | | | | blocked, POSIX requires EIDRM rather than EINVAL, and that's what our implementation does and what the ERRORS section already says, too
* add STANDARDS, improve HISTORY, and basic macro cleanup:schwarze2019-07-183-54/+75
| | | | use .Vt for struct names and and .Fa for struct fields
* State that mtype < 1 causes EINVAL as required by POSIXschwarze2019-07-181-12/+22
| | | | | | | | and as implemented by OpenBSD since sysv_msg.c rev. 1.35. Diff from Moritz Buhl <mbuhl at moritzbuhl dot de> requested by bluhm@. While here, add STANDARDS, improve HISTORY, and use the customary .Fa for struct fields rather than .Va.
* Get rid of an old convention of wrapping preprocessor constants in curlyanton2019-07-083-10/+10
| | | | | | braces. no objection from jmc@ and schwarze@
* kevent(2): remove 24hr timeout limitcheloha2019-07-011-7/+2
| | | | | | | | | | As with nanosleep(2), poll(2), and select(2), here we can chip away at the timespec until it's empty. This lets us support the full range of the timespec regardless of the kernel's HZ. Update the manpage accordingly. ok visa@
* Use the same text for EOPNOTSUPP as we do in fcntl(2) and lockf(3).millert2019-06-251-3/+5
| | | | | In fcntl(2) and lockf(3) the error is EINVAL but the condition is the same. OK anton@
* add missing RETURN VALUES section;schwarze2019-06-241-2/+4
| | | | also checked that POSIX requires exactly this behaviour
* sockatmark(3), recv(2), getsockopt(2), and connect(2) return specificallyderaadt2019-06-201-4/+4
| | | | | -1 to mark failure, not arbitrary values < 0. I believe manual pages should follow the described contract precisely and accurately.