| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
|
|
|
|
|
|
|
| |
protected properly and files without any x bit set were accidentaly considered
executable when checked with access(2).
Issues found and reported by deraadt, halex, reyk, tb
ok deraadt
|
|
|
|
|
|
|
|
| |
receive buffer of a stream socket. Then a new pair of control and
data mbuf can be appended to the mbuf queue. In this case, terminate
the loop with a short read to prevent a panic. Userland should
read the control message with the next system call.
OK claudio@ deraadt@
|
|
|
|
| |
OK deraadt@ anton@
|
|
|
|
|
|
|
|
|
|
| |
jsg@ wants this for drm, and i've had a version of it in diffs sine
2016, but obviously havent needed to use it just yet.
task_pending is modelled on timeout_pending, and tells you if the
task is on a list waiting to execute.
ok jsg@
|
|
|
|
| |
ok bluhm@, visa@
|
|
|
|
| |
ok bluhm@, visa@
|
|
|
|
| |
ok visa@
|
|
|
|
|
|
|
|
| |
to pass the real count, with a minimal .shstrtab segment for consistency.
Also, add support for PN_XNUM to readelf.
problem reported and testing by claudio@
ok kettenis@
|
|
|
|
| |
ok tedu@
|
|
|
|
| |
ok ratchov@
|
|
|
|
| |
OK bluhm@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tvtohz(9) adds an extra tick to account for the present tick, but this
tick needs to be removed when the timeout is reloaded thereafter. We
already do this for periodic setitimer(2) timeouts.
Prompted by Paul Herman's writeup on clock aliasing for DragonflyBSD:
https://frenchfries.net/paul/dfly/nanosleep.html
Also fixed in FreeBSD r238424.
Style tweaks from visa.
ok visa@, guenther@
|
|
|
|
|
|
|
| |
underflow in a later calcuation. Using the same CMSG_LEN(0) check
that other cmsghdr handlers implemented.
Probelm found by anton@
OK anton@, deraadt@, visa@
|
|
|
|
|
|
| |
SCM_RIGHTS from being sent to the userland since they hold kernel internal
data and it does not make sense to externalize it.
OK deraadt@, guenther@, visa@
|
|
|
|
| |
ok mikeb@, visa@
|
| |
|
|
|
|
| |
OK mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because of hw.smt we need a way to determine whether a given CPU is "online"
or "offline" from userspace. KERN_CPTIME2 is an array, and so cannot be
cleanly extended for this purpose, so add a new sysctl(2) KERN_CPUSTATS
with an extensible struct. At the moment it's just KERN_CPTIME2 with a
flags member, but it can grow as needed.
KERN_CPUSTATS appears to have been defined by BSDi long ago, but there are
few (if any) packages in the wild still using the symbol so breakage in ports
should be near zero. No other system inherited the symbol from BSDi, either.
Then, use the new sysctl(2) in systat(1) and top(1):
- systat(1) draws placeholder marks ('-') instead of percentages for
offline CPUs in the cpu view.
- systat(1) omits offline CPU ticks when drawing the "big bar" in
the vmstat view. The upshot is that the bar isn't half idle when
half your logical CPUs are disabled.
- top(1) does not draw lines for offline CPUs; if CPUs toggle on or
offline in interactive mode we redraw the display to expand/reduce
space for the new/missing CPUs. This is consistent with what some
top(1) implementations do on Linux.
- top(1) omits offline CPUs from the totals when CPU totals are
combined into a single line (the '-1' flag).
Originally prompted by deraadt@. Discussed endlessly with deraadt@,
ketennis@, and sthen@. Tested by jmc@ and jca@. Earlier versions also
discussed with jca@. Earlier versions tested by jmc@, tb@, and many
others.
docs ok jmc@, kernel bits ok ketennis@, everything ok sthen@,
"Is your stuff in yet?" deraadt@
|
|
|
|
| |
From NetBSD (maxv). OK deraadt@ visa@
|
| |
|
| |
|
|
|
|
|
|
|
| |
of kern_descrip.c r1.177 and sys_pipe.c r1.82, the call always
returned an error.
OK jca@ anton@ mpi@
|
|
|
|
|
|
|
|
| |
handle arg as a process ID if the value is positive and as a process
group ID if the value is negative. In addition, now the signal sending
checks privileges.
OK mpi@
|
|
|
|
|
|
|
|
|
| |
It centralizes IO signal privilege checking and makes possible to revoke
a registration when the target process or process group is deleted.
Adapted from FreeBSD.
OK kettenis@ mpi@ guenther@
|
|
|
|
|
|
|
|
| |
all types of mbufs. Also introduce some KASSERT in the m_*space() functions
to ensure that no negative number is returned. This also introduces two
internal macros M_SIZE() & M_DATABUF() which return the right size and start
pointer of the mbuf data area. Use it in a few obvious places to simplify code.
OK bluhm@
|
| |
|
|
|
|
|
|
|
| |
posix file locks is defined. Also, detect overflows when dealing with positive
lengths.
ok millert@ visa@
|
|
|
|
|
|
| |
m_leadingspace() and m_trailingspace(). Convert all callers to call
directly the functions and remove the defines.
OK krw@, mpi@
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
binary so it should bypass unveil restrictions. This is similar
(but different...) to how the ELF linker (ld.so) is loaded (after
unveils get dropped). Discovered in doas, due to more accurate unveil
semantics.
ok guenther tedu beck
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
back rev 1.90.
----
mbufs and mbuf clusters are now backed by large pools. Because of this
we can relax the oversubscribe limit of socketbuffers a fair bit.
Instead of maxing out as sb_max * 1.125 or 2 * sb_hiwat the maximum is
increased to 8 * sb_hiwat -- which seems to be a good compromise between
memory waste and better socket buffer usage.
OK deraadt@
----
ok benno@
|
| |
|
|
|
|
|
|
|
| |
unveil for each unveil in the process at unveil() time, and refactoring the
handling of current directory and ISDOTDOT to be much more sensible.
Worked out at ns2k18 with guenther@.
ok deraadt@
|
|
|
|
|
|
|
| |
While here, improve existing lockf debug routines and sprinkle some more logging
related to list manipulation.
ok deraadt@ visa@ (as part of a larger diff)
|
|
|
|
|
|
|
|
| |
runs. This is a second attempt in which the lockf structure is turned into a
doubly linked list which makes it easier to ensure correctness during list
insertion and deletion.
ok deraadt@ visa@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a connection that is being accepted gets aborted early, or if the
user-supplied buffer is invalid, doaccept() leaks a socket. This is
a regression caused by r1.153 of uipc_syscalls.c.
Correct the issue by associating the socket with the file early enough.
In case soaccept() or copyaddrout() fails, the socket will be freed
as a result of the file closing. This logic was used by the pre-r1.153
code.
closef() may block, so it is hoisted outside the fdp lock.
OK bluhm@ mpi@
|
|
|
|
|
|
|
| |
Change the process time accounting back to the original code before
spinning time was added. No change for scheduler time. Spinning
interrupts are no longer accounted to process system time.
input and OK visa@
|
|
|
|
|
|
| |
introduced. Account spinning time to the process system time again.
time(1) has no spinning, it only shows real, user, sys.
OK visa@ mpi@ deraadt@
|
|
|
|
|
|
|
|
| |
This brings it back in line with the macros.
via Paco A. and the FRRouting project.
ok deraadt@ visa@ guenther@ tb@
|
|
|
|
|
|
| |
update the next pointer for the preceding lock. Prevents a double free panic.
ok millert@
|
|
|
|
| |
ok kettenis deraadt
|
|
|
|
|
|
|
| |
race between the reaper and unveil_removevnode() that would trigger a
KASSERT. At least as far as I can tell. Pointed out by semarie@
ok beck@, deraadt@
|
|
|
|
|
|
|
| |
in raw IP delivery and UDP broadcast loops. There inpcbtable_mtx
is held and sorwakeup() is called within the loop. As sowakeup()
grabs the kernel lock, we have a lock ordering problem.
found by Hrvoje Popovski; OK deraadt@ mpi@
|
|
|
|
|
|
| |
to unsigned int.
OK deraadt@
|