summaryrefslogtreecommitdiff
path: root/lib/libc/sys
AgeCommit message (Collapse)Author
2023-02-27Calculate the size of the static (and profiled static) execve syscall stubTheo de Raadt
and store it in a const variable for use by crt0. help from kettenis and miod
2023-02-23adjust documentation for ktrace.h changes. utrace() is now easier to useTheo de Raadt
ok guenther
2023-02-22remove .Pp before .Sh;Jason McIntyre
2023-02-22Point to <signal.h> and not <sys/signal.h>: the latter isPhilip Guenther
an implementation detail for the kernel, libc, and libkvm, and should not be a concern for others.
2023-02-22Prefer 'argument' over 'parameter' when refering to the valuePhilip Guenther
passed in a specific call. From discussion with schwarze@ and jmc@ ok jmc@
2023-02-22Prefer "get or set" over "get/set" or "get and set".Philip Guenther
From discussion with schwarze@ and jmc@ ok jmc@
2023-02-21adress -> address;Jason McIntyre
2023-02-21pinsyscall(2) is not just for dynamic binaries anymore, so make theTheo de Raadt
text more generic
2023-02-21create a stub for pinsyscall(2)Theo de Raadt
ok guenther
2023-02-21correct parameter typeTheo de Raadt
2023-02-18missing dot before macro; from josiah frentsosJason McIntyre
2023-02-16Document pinsyscall(2). The ld.so and kernel enforcement code is notTheo de Raadt
commited ye -- waiting for enough people to run kernels which support the system call. ok jmc
2023-02-11__syscall() is no longer neccessary since the system calls which neededTheo de Raadt
it are now unpadded ok kettenis guenther
2023-02-05writev() appeared in 4.1c before 4.2Jonathan Gray
2023-01-12remove outdated "expected to be compliant"Jonathan Gray
ok miod@ kn@ deraadt@
2023-01-08Add getthrname(2) manpagePhilip Guenther
ok jmc@ schwarze@
2023-01-07Add {get,set}thrname(2) for putting thread names in the kernel andPhilip Guenther
exposed in a new field returned by sysctl(KERN_PROC). Update pthread_{get,set}_name_np(3) to use the syscalls. Show them, when set, in ps -H and top -H output. libc and libpthread minor bumps ok mpi@, mvs@, deraadt@
2022-12-30add history for getpid(2) and getppid(2)Jonathan Gray
getpid() appeared (undocumented) in v5. Between v6 and v7 there is an extra return value for the parent process ID. getppid() did not appear in v7, it appeared in 32v libc. But getppid() predates 32v. It seems to have been in earlier USG releases such as Generic 3 (PG-1C300 Issue 3) as the MERT Release 0 manual references it. getppid() didn't become a system call until 4.3BSD-Reno omit most of these details and just mention v5 and 32v with and ok schwarze@
2022-12-29HISTORY: clarify that unmount(2) used to be called umount(2) from v1 to Tahoe;Ingo Schwarze
joint work with and OK jsg@
2022-12-29profil(2) first appeared in fifth editionJonathan Gray
tuhs/Distributions/Research/Dennis_v4/v4man.tar.gz has manx/profil.2 but no man2/profil.2 the nsys sysent.c has '&nullsys, /* 44 = prof */' https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/nsys/ken/sysent.c profil(2) is first listed as v5 in the Combined Tables of Contents from McIlroy's A Research UNIX Reader. https://marc.info/?l=tuhs&m=158099986005023&w=2 and is present in tuhs/Distributions/Research/Dennis_v5/v5man.pdf ok schwarze@
2022-12-29fcntl(2) first appeared in System IIIJonathan Gray
ok schwarze@
2022-12-27spelling fixes; from paul tagliamonteJason McIntyre
any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
2022-12-20- some small tweaks for the textJason McIntyre
- on guenther's advice, remove NOTES: the text is either not relevant or already described correctly elsewhere ok guenther
2022-12-19Add waitid(2) manpage, based on a first pass by espie@ and bitsPhilip Guenther
from FreeBSD and NetBSD. ok kettenis@ jmc@ espie@
2022-12-19Revert previous: unintentionally included in commitPhilip Guenther
2022-12-19Add pselect(2), recvmmsg(2), sendmmsg(2), and waitid(2) to the listsPhilip Guenther
of built-in cancelation points.
2022-12-19waitid(2) returns 0 on success; do post-call cancelation only ifPhilip Guenther
it either failed, or succeeded but didn't put a status into infop. ok millert@
2022-11-07remove one more reference to tcp/slowhz;Jason McIntyre
while here, wrap some long lines;
2022-11-07Modify TCP receive buffer size auto scaling to use the smoothed RTTYASUOKA Masahiko
(SRTT) instead of the timestamp option. Since the timestamp option is disabled on some OSs (eg. Windows) or dropped by some firewalls/routers, in such a case the window size had been fixed at 16KB, this limits throughput at very low on high latency networks. Also replace "tcp_now" from 2HZ tick counter to binuptime in milliseconds to calculate the SRTT better. tested by krw matthieu jmatthew dlg djm stu stsp ok claudio
2022-11-06remove unneccessary Pp after Sh;Jason McIntyre
2022-11-06At present, mprotect(2) may reduce permissions on immutable pages markedTheo de Raadt
PROT_READ | PROT_WRITE to the less permissive PROT_READ. This one-way operation is permitted for an introductory period to observe how software uses this mechanism. It may change to require explicit mutable region annotation with __attribute__((section(".openbsd.mutable"))) and explicit calls to mimmutable(). ^^^ Decided we'll do that for now, since we've only discovered one program trying to be clever so far (chrome is trying to do something smart, and mimmutable makes it even better) discussed with kettenis and robert
2022-10-26Add waitid(2) syscall stub.Mark Kettenis
Minor bump to both libc and libpthread: make sure you install a new kernel! ok millert@, deraadt@
2022-10-22missing comma; from josiah frentsosJason McIntyre
while here, wrap long line
2022-10-19Document sigaltstack restrictions on OpenBSD.Theo de Raadt
mandoc suggestions & help from jmc
2022-10-13controm terminql -> controlling terminal;Jason McIntyre
2022-10-07sort SEE ALSO;Jason McIntyre
2022-10-07Add mimmutable(2) libc stub, add & adjust manual pages, and crank the minor.Theo de Raadt
ok kettenis
2022-09-24macro tweaks; from josiah frentsosJason McIntyre
ok deraadt
2022-09-11.Li -> .Vt where appropriate;Jason McIntyre
from josiah frentsos, tweaked by schwarze ok schwarze
2022-09-09add recvmmsg to NAME;Jason McIntyre
2022-09-09Add libc wrappers for the new sendmmsg and recvmmsg system calls.Moritz Buhl
Feedback tb@, miod@, jca@ OK jca@
2022-08-16Remove obsolete kern.nselcoll sysctl.Visa Hankala
OK millert@ deraadt@
2022-08-04Use ".Bx 4.0" rather than ".Bx 4" for clarity and consistency.Ingo Schwarze
Both are correct, but "4.0" avoids the misunderstanding that we were talking about any unspecified 4.xBSD release, and it is much more widely used in our manuals. Discussed with jsg@ in the context of other manual pages.
2022-08-04change some 4.4BSD references to earlier releasesJonathan Gray
ok schwarze@
2022-08-02Strange argument padding is no longer neccessary, remove this BUGS sectionTheo de Raadt
ok guenther
2022-08-02access(2) alarm(2) pause(2) were not ported from pwb to v7Jonathan Gray
Alan Glasser describes the incident that led to access(2) in https://minnie.tuhs.org/pipermail/tuhs/2021-November/024657.html access(2) alarm(2) pause(2) were also part of the "50 changes" tape post v6 "50 bugs" / "diff tape" / "50 fixes" tape (Salus QCU, pp 138-139) "fifty changes" tape https://www.oreilly.com/openbook/opensources/book/kirkmck.html "50 changes" https://archive.org/details/unix_news_november-1976 tuhs/Applications/Spencer_Tapes/unsw3.tar.gz usr/sys/v6unix/changenotes 45) The "access()" system call checks access permissions on the real id's of the process regardless of the effective ones. Doesn't return stats, just does an internal "access()" to set u.u_error. 48) "alarm()" and "pause()" system calls are in to provide a user-mode timeout capability. with and ok schwarze@
2022-07-30we mention interim BSD releases so change some 4.4BSD use to 4.3BSD-RenoJonathan Gray
ok jmc@ schwarze@
2022-07-23timecounting: use full 96-bit product when computing elapsed timeScott Soule Cheloha
The timecounting subsystem computes elapsed time by scaling (64 bits) the difference between two counter values (32 bits at most) up into a struct bintime (128 bits). Under normal circumstances it is sufficient to do this with 64-bit multiplication, like this: struct bintime bt; bt.sec = 0; bt.frac = th->tc_scale * tc_delta(th); However, if tc_delta() exceeds 1 second's worth of counter ticks, that multiplication overflows. The result is that the monotonic clock appears to jump backwards. When can this happen? In practice, I have seen it when trying to compile LLVM on an EdgeRouter Lite when using an SD card as the backing disk. The box gets stuck in swap, the hardclock(9) is delayed, and we appear to "lose time". To avoid this overflow we need to compute the full 96-bit product of the delta and the scale. This commit adds TIMECOUNT_TO_BINTIME(), a function for computing that full product, to sys/time.h. The patch puts the new function to use in lib/libc/sys/microtime.c and sys/kern/kern_tc.c. (The commit also reorganizes some of our high resolution bintime code so that we always read the timecounter first.) Doing the full 96-bit multiplication is between 0% and 15% slower than doing the cheaper 64-bit multiplication on amd64. Measuring a precise difference is extremely difficult because the computation is already quite fast. I would guess that the cost is slightly higher than that on 32-bit platforms. Nobody ever volunteered to test, so this remains a guess. Thread: https://marc.info/?l=openbsd-tech&m=163424607918042&w=2 6 month bump: https://marc.info/?l=openbsd-tech&m=165124251401342&w=2 Committed after 9 months without review.
2022-07-21repair error section; Martin VahlensieckTheo de Raadt
2022-07-17fix a macro, and "new sentence, new line";Jason McIntyre