Document how unveil(2) permissions correspond to various pledge(2) promises.
unveil considers the operation that happens at namei(9) time, but pledge has a
deeper integration into subsystems, therefore pledge can be more precise.
This change is the result of various experiments. For example the "unix" promise
allows creating files when calling bind(2) on an AF_UNIX socket, we found
requiring the "cpath" promise along with "unix" either required extensive
changes or made the promise set too broad. Similiar applies to connect(2) and
"wpath". Instead document that the unveil permissions "c", "w" and "r"
correspond to a larger set of pledge promises.
ok deraadt
make dwpcie_rk3568_link_up less pedantic about what it considers "up".
ie, only report whether the pcie link is up, don't look at the state
of the up link too. this matches linux behaviour fwiw.
after a warm boot (ie, reboot), the re(4) in my rk3528 based radxa
e20c didnt attach because the pcie link was in a power saving state
instead of the ready state this code was expecting.
jmatthew@ and i have also tested this on a bunch of rk356x boards too.
ok jmatthew@ kettenis@
use strncmp instead of memcmp in complt()
cpos is not necessarely shorter than lh->l_name length, so we might end
up memcmp'ing out of bounds.
from Han Boetes (hboetes at gmail)
Load device tree for the Spacemit K3 Pico ITX board, which will be added
to the riscv64-spacemit-dtb firmware package at some point in the
future.
ok jsg@
usr.sbin/httpd: fix suffix range handling
Calculate suffix ranges before clamping end offsets so requests at least
as large as the file return the complete representation. Reject zero
length and malformed ranges, retain 64 bit sizes throughout range
handling, and add regression coverage for boundaries and overflow.
Based on indea of Andrew Kloet
OK: rsadowski@
httpd: remove redundant search and check return value
The server foreach-loop serves the same purpose as "serverconfig_byid"
did previously.
OK kirill@
httpd: do NOT send location fcgiparams twice
Only emit the params when the current receiver is the server child.
When sending a location-config from the parent, the FCGI params IMSG
was emitted once per receiver iteration and always targeted the server
child. With both the server and the logger process needing the server
config, the server child received IMSG_CFG_FCGI twice per location and
appended the same params on top of the existing list. The FastCGI backends
then saw every param duplicated.
Input Fabien Romano, OK kirill@
sys/powerpc64: encode PTCR PATS correctly
The PTCR PATS field stores log2(partition table size) - 12. Since
PATMEMSZ is a power of two, ffs(PATMEMSZ) is log2(PATMEMSZ) + 1; the
old expression wrote 5 for the 64 KiB table, describing 128 KiB to
Book3S v3 hardware.
Use ffs(PATMEMSZ) - 1 - 12 to express the intended log2 calculation
and encode the 64 KiB partition table as PATS == 4.
Discussed with kettenis@
Tested and OK: gkoehler@
properly handle qwx VIF DMA map allocation failures at attach time
qwx_attach() runs as a config_mountroot hook, which means errors returned
from this function will be ignored. Since returning errors is pointless,
change this function's return value type to void.
There is a theoretical risk that allocating the virtual interface's DMA
maps will fail. Allocate these maps earlier and avoid attaching the driver
if the maps cannot be allocated.
replace qwx virtual interface list with a single interface structure
Fixes use of stale pointers on the vif list which caused crashes.
We do not support multiple interfaces per driver in our net80211 stack,
so this list inherited from Linux was pointless for us anyway.
Tested by ajacoutot, phessler, kettenis, gnezdo, krw, and myself.
ok phessler@ kettenis@ gnezdo@
Prevent display-panes from shifting the active pane scroll position by
copying the screen from before zoom, also do not let resize consume
blank lines.
vmd(8): disambiguate fd variable naming
Split out fd tracking in the global "struct vmd" instance with
explicit names to not reuse the same one for storing semantically
different fds. Some vmd processes were using .vmd_fd to track the
open /dev/vmm while another used it for a socket(2) instance for
ioctls. This makes it hard to reason about and future changes
harder to review.
No intended behavioral change.
Testing help from Mischa Peters.
ok @hshoexer
Remove the active-pane flag for now, there are some gaps in how this
works and I don't like it. May come back in a different form (maybe just
for windows).