Age | Commit message (Collapse) | Author |
|
This requires a libc major version bump. OK deraadt@
|
|
|
|
Pointed out by naddy@
|
|
POSIX wants it in libc, that's where the function can be found on other
systems. Reported by naddy@, input from naddy@ and guenther@.
"looks ok" guenther@, ok deraadt@
Note: riding the libc/libpthread major cranks earlier today.
|
|
from Lauri Tirkkonen
|
|
|
|
|
|
|
|
Tweaked diff from brad@
manpage tweaks florian@ and jmc@
ok deraadt@ millert@
|
|
This brings it back in line with the macros.
via Paco A. and the FRRouting project.
ok deraadt@ visa@ guenther@ tb@
|
|
|
|
|
|
It replaces the existing pwcache.c functions user_from_uid(3) and
group_from_gid(3) with the pax equivalents. Adapted from NetBSD
(mycroft) changes from our own pax's cache.c. OK guenther@
|
|
of the pointer returned by getpw{ent,nam,uid}(). We unmap the
buffer each time to catch callers using a stale passwd struct
pointer. As a special case, we do not unmap the buffer if the
previous lookup was for the same name or uid. This special case
may be removed in the future. OK deraadt@
|
|
The introduction of hw.smt means that logical CPUs can be disabled
after boot and prior to suspend/resume. If hw.smt=0 (the default),
there needs to be a way to count the number of hardware threads
available on the system at any given time.
So, import HW_NCPUONLINE/hw.ncpuonline from NetBSD and document it.
hw.ncpu becomes equal to the number of CPUs given to sched_init_cpu()
during boot, while hw.ncpuonline is equal to the number of CPUs available
to the scheduler in the cpuset "sched_all_cpus". Set_SC_NPROCESSORS_ONLN
equal to this new sysctl and keep _SC_NPROCESSORS_CONF equal to hw.ncpu.
This is preferable to adding a new sysctl to count the number of
configured CPUs and keeping hw.ncpu equal to the number of online
CPUs because such a change would break software in the ecosystem
that relies on HW_NCPU/hw.ncpu to measure CPU usage and the like.
Such software in base includes top(1), systat(1), and snmpd(8),
and perhaps others.
We don't need additional locking to count the cardinality of a cpuset
in this case because the only interfaces that can modify said cardinality
are sysctl(2) and ioctl(2), both of which are under the KERNEL_LOCK.
Software using HW_NCPU/hw.ncpu to determine optimal parallism will need
to be updated to use HW_NCPUONLINE/hw.ncpuonline. Until then, such software
may perform suboptimally. However, most changes will be similar to the
change included here for libcxx's std::thread:hardware_concurrency():
using HW_NCPUONLINE in lieu of HW_NCPU should be sufficient for determining
optimal parallelism for most software if the change to _SC_NPROCESSORS_ONLN
is insufficient.
Prompted by deraadt. Discussed at length with kettenis, deraadt, and sthen.
Lots of patch tweaks from kettenis.
ok kettenis, "proceed" deraadt
|
|
ok krw@
|
|
|
|
The latest POSIX description of times(3) (and all others I can find)
suggests that times(3) should return monotonically increasing values
and that these values are only useful for real time interval measurement.
All extant uses of times(3) confirm that this expectation is shared by
application programmers.
So, change gettimeofday(2) to clock_gettime(2)/CLOCK_MONOTONIC to ensure
the return value increases monotonically, even if the system clock is
changed by the superuser. Then update the manpage accordingly.
While we're updating the manpage, move the information about the return
values to a new RETURN VALUES section to bring times.3 up to speed with
other library man pages.
Manpage changes kicked around on tech@ with millert@ and jmc@.
times.3 ok millert@ tb@ jmc@
times.c ok millert@ tb@
|
|
|
|
|
|
|
|
ok deraadt@, jca@
|
|
ok jasper@, jca@, deraadt@
|
|
|
|
|
|
requires that, too (in XBD 7.3.1), even though the C standard
leaves it implementation-defined;
found during my kcgi audit on behalf of CAPEM;
OK deraadt (stupid me forgot to commit before lock).
|
|
code. Adapted from a diff by Ross L Richardson.
|
|
havoc all over the place. So add some casts to silence the compiler.
ok deraadt@ guenther@
|
|
Theo already clamped down on these devices last year.
Triggered by a question from Nan Xiao <xiaonan830818 at gmail dot com>.
OK deraadt@
|
|
cancellation points in POSIX, so change them to invoke the non-cancellation
point versions of open(), close(), nanosleep(), and write()
ok deraadt@ millert@
|
|
|
|
Prompted by Nan Xiao noticing the redundancy of bzero+termination - thanks.
ok deraadt@
|
|
Riding previous libc bump.
ok kettenis@
|
|
Complete in the sense that all POSIX *locale(3) and *_l(3) functions
are included, but in OpenBSD, we of course only really care about
LC_CTYPE and we only support ASCII and UTF-8.
With important help from kettenis@, guenther@, and jca@.
Repeated testing in ports bulk builds by naddy@.
Additional testing by jca@, sebastia@, dcoppa@, and others.
OK kettenis@ dcoppa@, and guenther@ on an earlier version.
Riding guenther@'s libc/librthread major bump.
|
|
ok jca@ kettenis@ deraadt@
|
|
to low when they are actually numbered in the opposite (numerical)
order. Use "ordered by decreasing importance" instead. Also try
to make it clear that LOG_UPTO uses the numerical priorities where
a larger value means a lower priority. OK jmc@
|
|
OK espie@
|
|
ok tedu@
|
|
We know when pltime or vltime decrease to zero. Run nd6_expire then.
Input & OK mpi, bluhm
|
|
truncate the length of a syslog message to 8192 bytes. Use one
global define LOG_MAXLINE for all of them.
OK deraadt@ millert@
|
|
conp in syslog(3) is unused. Remove dead code.
OK jca@ deraadt@
|
|
found with regress/usr.bin/mandoc/db/dbm_dump;
OK jmc@
|
|
Change FMT_SIZE to 1024+1 for consistency. Do not loop over the
format string if there is no output space left.
OK deraadt@ millert@
|
|
longer tracks prefixes or default routers from router advertisements.
Pointed out by jmc.
ports tree grepping sthen, who only found nsh
OK mpi, sthen
|
|
|
|
src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with
annotations for symbol visibility. changes to one should be reflected
in the other.
the malloc debug code that uses RB code is ported to RBT.
because libc provides the RBT code, procmap doesn't have to reach into
the kernel and build subr_tree.c itself now.
mild enthusiasm from many
ok guenther@
|
|
with mandoc -Tlint. While here, delete .Tn macros.
|
|
function calls, but instead a "class" of functions like "sigsetops".
Rename to sigaddset", and while at it improve documentation in sigprocmask(2)
to point to it.
ok tedu
|
|
handling to be interative instead of recursive.
Fix by Yves Orton, ported to OpenBSD glob.c by Ray Lai. OK tb@
|
|
|