| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this code was passing string constants to functions that did
not declare their parameters as const. After this patch, the functions now
declare that they do not modify these arguments, making it safe to pass
string constants. Fixes -Wincompatible-pointer-types-discards-qualifiers.
From Adam Barth <abarth google com>
ok millert
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sleep(3) does not call nanosleep(2) if seconds is zero. This is bad.
As a simplified interface to nanosleep(2), sleep(3) should delegate
all decisions about whether or not to yield the CPU to nanosleep(2).
This patch removes the nanosleep(2) bypass from sleep(3).
This means that this code:
sleep(0);
will block for up to 1 tick, just like the equivalent nanosleep(2) call.
Neither FreeBSD nor NetBSD bypass nanosleep(2) in the zero case, so
this commit brings our sleep(3) closer to theirs in behavior.
As an added bonus, sleep(3) will now *always* appear in a ktrace(1) as
a call to nanosleep(2).
ok millert@
|
|
|
|
|
|
| |
Adjust variable declaration in disklabel to match.
ok millert@ deraadt@
|
|
|
|
|
|
|
| |
Both functions take a non-const parameter. Implementations may modify
the passed string, even though ours do not.
ok stsp@ deraadt@ millert@
|
|
|
|
| |
ok millert@ deraadt@
|
|
|
|
| |
ok guenther tb millert
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.
If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.
The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.
Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.
This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).
Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!
OK from at least kettenis@, cheloha@, naddy@, sthen@
|
|
|
|
| |
eagleoflqj via OpenSSH github PR#178, ok djm@, feedback & ok millert@
|
|
|
|
| |
spotted at https://fossies.org/linux/misc/openssh-8.2p1.tar.gz/codespell.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
direction suggested by Laurence Tratt <laurie at tratt dot net>,
part of the wording from deraadt@.
While here, add the missing STANDARDS section, correct HISTORY,
drop redundant verbiage from RETURN VALUES, and garbage collect .Tn.
OK sthen@ jmc@ millert@ and Laurence Tratt,
and deraadt@ likes one line of the patch in particular.
|
|
|
|
|
|
| |
non-optional arguments to stop getopt(3) processing.
ok deraadt@
|
|
|
|
| |
OK jca@
|
|
|
|
|
|
|
|
| |
validation. Repair work mostly by markus and millert, first of all
solving the primary problem, then adding some additional validation
points. And then futher validation in login and su.
This will be 6.5/021_libcauth.patch.sig and 6.6/010_libcauth.patch.sig
Reported by Qualys
|
|
|
|
|
| |
and return an error instead. may prevent some unset/missing confusion.
ok deraadt millert
|
|
|
|
|
| |
getcap->cgetent. pwcache->user_from_uid. And then repair references.
ok jmc
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
OK guenther@
|
|
|
|
| |
ok guenther jmc
|
| |
|
|
|
|
|
|
|
| |
lock file" would trash errno, creating confusion.
One instance found by richardipsum@fastmail, other two identified from
original commit
ok millert
|
| |
|
|
|
|
|
|
|
| |
have a different calling convention than the standard function...as seen
in kdump output.
ok deraadt@ schwarze@
|
|
|
|
|
|
| |
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
| |
|
|
|
|
|
|
| |
i.e. those other than LC_CTYPE, into the CAVEATS section, and
standardize wording somewhat.
OK jmc@
|
|
|
|
|
|
| |
to avoid leaking it
ok deraadt@
|
|
|
|
|
|
| |
There is no point in checking permissions of files in root-owned
directories. If it even was a problem, secure_path(3) suffers from
unsolvable TOCTOU issues. OK deraadt@
|
|
|
|
|
| |
shared one manpage.
ok florian@
|
|
|
|
| |
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@
|
| |
|