Age | Commit message (Collapse) | Author |
|
OK tb@
|
|
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush.
This separates the imsgbuf API from the per-imsg API.
OK tb@
|
|
OK tb@
|
|
OK tb@
|
|
OK tb@
|
|
OK tb@
|
|
This code does not need to pass fds so there is no need to call msgbuf_write.
OK tb@
|
|
imsg_write() is just a thin wrapper around msgbuf_write(). So this is
mostly search and replace.
OK tb@
|
|
OK tb@
|
|
Issue spotted by op@
|
|
OK tb@
|
|
OK tb@
|
|
to return the ibufs generated by the previous two functions.
Error out if the hdrsz argument in msgbuf_new_reader is 0 or too big.
Also check that the rbuf is allocated in ibuf_read and msgbuf_read.
If not return EINVAL.
Implement the imsg API using these functions and introduce
imsgbuf_set_maxsize() to alter the maximum message size and
imsgbuf_allow_fdpass() to allow fd passing (which is now off by default).
Also cleanup the internals a bit and make imsgbuf_init() return int.
OK tb@
|
|
This does not yet fix the imsgbuf_init() function which can now error.
OK tb@
|
|
msgbuf_write
OK tb@
|
|
OK tb@
|
|
OK tb@
|
|
Remove the getdtablecount code from imsgbuf_read() and instead
move the getdtablecount code into ldapd.
Handle EMSGSIZE (the error returned when there are not enough
free file descriptor slots) inside imsgbuf_read() by retrying
the read to receive the data but without fd.
A caller expecting an fd should check the return value of
imsg_get_fd.
OK tb@
|
|
Handle EAGAIN by a simple return 1 (same for the fd check).
This way the caller will poll again and then retry later.
OK tb@
|
|
of messages ready for transmission. Returns 0 if nothing is pending.
OK tb@
|
|
to imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush.
This separates the imsgbuf API from the per-imsg API.
OK tb@
|
|
Return 0 on success or when a temporary error happened (EAGAIN, ENOBUFS).
Return -1 on error and set errno otherwise.
Kill the old 0 return for EOF. This is not how write operations work.
OK tb@
|
|
This is just a thin wrapper around msgbuf_write() but it makes the API
more consistent.
OK tb@
|
|
OK tb@
|
|
imsg_free() will close the unclaimed fds at the end.
OK tb@
|
|
ibufs already close forgotten fds on free so now imsg_free behaves the
same way.
OK tb@
|
|
For imsgs we want to be able to use ibufs even for empty messages and stash
the fd into those ibufs. For that adjust the ibuf code to allow that.
This adds an internal IBUF_FD_MARK_ON_STACK define that is now used
for on stack ibufs instead of setting max to 0.
OK tb@
|
|
user and the function is simple enough.
OK tb@
|
|
OK tb@
|
|
The current behavior of "auto", which implies running at full speed when
on AC power, does not fit all the hardware and use cases. For some people
it results in more power consumption, more heat, more noise, etc.
Extend the semantics of hw.perfpolicy and provide two buttons to
specify the desired behavior:
sysctl hw.perfpolicy=<policy while on ac>[,<policy while on battery>]
Keep the default behavior of "high,auto". People can opt for "auto,auto"
or simply "auto" instead.
No objection from deraadt@, input and ok sobrado@ sthen@
|
|
ok tb
|
|
|
|
location was not being set properly. Pulled the checking of this into
separate function for clarity. Fixes dragging on horizontal pane border.
From Michael Grant.
|
|
|
|
context (when it calls uvm_pagerealloc_multi()). But the current
implementation of pmap_copy_page() assumes it only runs in process context.
Use splbio() to block the interrupts while we're doing the copy.
Same diff as the one committed to arm64 a bit over a week ago.
ok mpi@, jca@
|
|
|
|
OK: bluhm@
|
|
The driver for the AMD platform security processor did use a bunch
of EINVAL error codes. It is better to propagate the error up from
the subsystem or use more specific values. Rename the variable
"ret" to "error" to make clear where we deal with an actual errno(2).
Document where and why the error code is ignored.
OK hshoexer@
|
|
OK mpi@
|
|
|
|
reported by and fix tested by afresh@
|
|
ifq_deq_set_oactive is a variation on ifq_set_oactive that can be
called inside an if_deq_begin "transaction".
afresh@ found de(4) was calling ifq_set_oactive while holding the
ifq mutex via ifq_deq_begin, which led to a panic because ifq_set_oactive
also tries to take the ifq mutex. ifq_deq_set_oactive assumes the
caller is already holding the mutex.
de(4) is confusing, so it seemed simpler to add a small tweak to
ifqs than try and do major surgery on such a hairy driver.
tested by afresh@
|
|
this replaces a hand rolled list that's been here since 1.1.
ok claudio@ kn@ tb@
|
|
|
|
ok mlarkin@
|
|
|
|
|
|
unneeded after uvm_vnp_sync() prototype moved to vnode.h in 2014
|
|
|
|
userspace.
|