Age | Commit message (Collapse) | Author |
|
ok jca@ visa@ guenther@ deraadt@
|
|
tsleep(9)'s maximum timeout shrinks as HZ grows, so this ensures we do
not return early from longer timeouts on alpha or on custom kernels.
POSIX says you cannot return early unless a signal is delivered, so
this makes us more compliant with the standard.
While here, remove the 100 million second upper bound. It is an
artifact from itimerfix() and it serves no discernible purpose.
ok tedu@ visa@
|
|
|
|
ok tb@ kettenis@
|
|
Instead of converting timespec -> timeval and truncating the input,
check with timespecfix and use tstohz(9) for the tsleep.
All other contemporary systems check this correctly.
Also add a regression test for this case.
ok tb@
|
|
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
and put it to use in userspace in lieu of the kern.boottime
sysctl.
Its absolute value is the time that has elapsed since the
system booted, i.e., the system uptime.
Use in top(1), w(1), and snmpd(8) eliminates a race with
settimeofday(2), adjtime(2), etc. inherent to deriving the
system uptime via the kern.boottime sysctl.
Product of a great deal of discussion/revision with jca@, tb@,
and guenther@.
ok tb@ jca@ guenther@ dlg@ mlarkin@ tom@
|
|
While here document prfind(9.
with and ok guenther@
|
|
This fixes the problem that long-running machines which were not
shut down properly would reboot with a badly offset system time.
hints and ok kettenis@
|
|
oversized timespecs should be clamped, not rejected.
ok millert
|
|
|
|
- rename _check function without suffix: a "pledge" function called from
anywhere is a "check" function.
- makes pledge_fail call the responsability to the _check function. remove it
from caller.
- make proper use of (potential) returned error of _check() functions.
- adds pledge_kill() and pledge_protexec()
with and OK deraadt@
|
|
strict than anticipated. It allows a programmer to pledge/promise/covenant
that their program will operate within an easily defined subset of the
Unix environment, or it pays the price.
|
|
ok deraadt@ miod@
|
|
The pathlist is a whitelist of dirs and files; anything else returns ENOENT.
Recommendation is to use a narrowly defined list. Also add TAME_FATTR, which
permits explicit change operations against "struct stat" fields. Some
other TAME_ flags are refined slightly.
Not cranking libc now, since nothing commited in base uses this and the
timing is uncomfortable for others. Discussed with many; thanks for a
few bug fixes from semarie, doug, guenther.
ok guenther
|
|
operating model". This is the kernel component; various changes should
proceed in-tree for a while before userland programs start using it.
ok miod, discussions and help from many
|
|
from hardclock() which runs without grabbing the kernel lock. This means
that two threads could concurrently update the struct which could lead to
corruption of the value which in turn could stop the timer. It could also
result in getitimer(2) returning a non-normalized value.
With help from guenther@.
ok deraadt@, guenther@
|
|
|
|
|
|
microsecond in a 64-bit integer. Fixes the issue where ntpd loses sync
because the struct timeval currently used to hold the adjustment is not
properly normalized after the changes guenther@ made.
ok guenther@, millert@
|
|
going to copyout one, memset the structure and then set it member by member.
sys_adjtime() does that on copyin instead, as it already has to munge the
members as it goes.
ok deraadt@
|
|
to sys/*.h headers so that the compat/linux code can use them.
Change dowait4() to not copyout() the status value, but rather leave
that for its caller, as compat/linux has to translate it, with the
side benefit of simplifying the native code.
Originally written months ago as part of the time_t work; long
memory, prodding, and ok from pirofti@
|
|
hardclock() set a flag on the running thread and force AST processing,
and then have the thread signal itself from userret().
idea and flag names from FreeBSD
ok jsing@
|
|
that mlarkin@ can fix programs that report rates-over-uptime.
ok kettenis@
manpage corrections jmc@ (which I've probably broken again)
|
|
|
|
members to 64bit types. Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments. Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir. Build perl with -DBIG_TIME.
Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.
DANGER: ABI incompatibility. Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.
Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@
|
|
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and
{clock,pthread}_getcpuclockid() functions.
Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@
ok matthew@
|
|
ok matthew@ deraadt@
|
|
ok deraadt@
|
|
.h files to pull it in, if needed
ok tedu
|
|
|
|
just the realtime clock, triggering and adjusting timeouts to reflect that.
ok matthew@ deraadt@
|
|
of per-rthread. Handling of per-thread tick and runtime counters
inspired by how FreeBSD does it.
ok kettenis@
|
|
structs timespec, timeval, sigaction, and rlimit.
ok otto@ jsing@
|
|
the main thread exiting. c.f. regress/sys/kern/main-thread-exited/
|
|
|
|
context switch and the call to clock_gettime.
oga@ ok
|
|
settimeofday() does, so move those bits into settime()
"I like it" deraadt@
|
|
race condition and prep for later support of pthread_condattr_setclock()
"get it in" deraadt@, tedu@, cheers by others
|
|
that the timeout doesn't happen if setitimer is called between the
profiling / virtual timer expires and the timeout is scheduled.
firefox triggered this Profiling timer expired problem when in
uthread execve signal was being delivered after timer has already
been disabled; as reported on ports@ recently.
special thanks to kettenis@, kurt@, guenther@.
agreed by kettenis@, tedu@. ok guenther@.
reminded & ok fgs@. tested by ian@.
|
|
ok millert
|
|
ok tedu@
|
|
like .25 seconds or 5 seconds. the accuracy of microuptime is not really
needed then, so switch it to getmicrouptime.
ok henning@ art@
|
|
|
|
deraadt@ ok
|
|
getitimer when the clock on the machine has been reset.
miod@ ok
|
|
Tested by various using not (yet) committed amd64 timecounter code.
ok deraadt@
|
|
__HAVE_TIMECOUNTER case.
ok otto@
|
|
timecounters case. adjfreq() does not work with timecounters, but
more is coming. with help from miod; tested by dlg@; ok miod@
|
|
(ie sgi). Diff and request to commit from otto@
|