1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-03 06:45:37 -08:00
OpenBSD
Go to file
cheloha 39152b4f44 moncontrol(3): remove hertz() fallback function
In the moncontrol(3) code in libc there is a fallback function,
hertz().  The idea is, if getting kern.clockrate from sysctl(2) fails,
we fall back to deriving the value of hz(9) using setitimer(2)'s
rounding behavior.

This is extremely clever, but it actually sucks.  Calling setitimer(2)
quietly cancels any extant ITIMER_REAL timer, so moncontrol(3) cannot
be safely used alongside setitimer(2).  This fact is not documented.

kern.clockrate is not blocked by pledge(2), so outside of stack
corruption (which we can't do anything about anyway) I don't see a way
for the sysctl(2) call to ever fail on OpenBSD.  So hertz() is also
pointless.

Hence this patch: get rid of hertz().

Thread: https://marc.info/?l=openbsd-tech&m=163881542813633&w=2

ok guenther@
2022-07-26 04:07:13 +00:00
bin Remove old poll/select wakeup mechanism. 2022-07-05 15:06:16 +00:00
distrib Zap unused bridge command skipping 2022-07-26 00:38:42 +00:00
etc fix dow 2022-07-21 16:51:51 +00:00
games remove the "tbl" suffix for a few man pages 2022-07-11 03:11:49 +00:00
gnu Revert BUILD_LLDB use, don't push manual repair on all people building from source 2022-07-13 10:20:18 +00:00
include Add a new clnt*_control CLSET_CONNECTED, which says the socket has already 2022-07-15 17:33:28 +00:00
lib moncontrol(3): remove hertz() fallback function 2022-07-26 04:07:13 +00:00
libexec Document search order 2022-06-14 09:56:07 +00:00
regress Remove test of non-portable implementation details (whether wctype_t 2022-07-25 21:29:16 +00:00
sbin Only MBR and GPT structures can be edited by fdisk. 2022-07-25 17:45:16 +00:00
share Zap obsolete bridge section 2022-07-26 00:36:54 +00:00
sys The IPv4 reassembly code is MP safe, so we can run it in parallel. 2022-07-25 23:19:34 +00:00
usr.bin If a command or interface first appeared in PWB/UNIX, UNIX System III or 2022-07-25 02:25:55 +00:00
usr.sbin Properly handle nexthop state changes in the decision process 2022-07-25 16:37:55 +00:00
.gitignore Ignore tags files 2021-11-11 14:03:21 +00:00
Makefile minor cranking of libraries exposes a problem, details too long to explain. 2020-04-05 20:14:14 +00:00
Makefile.cross riscv64 is a LP64_ARCH, list it as such. 2021-05-03 00:04:31 +00:00