Extend the imsgev code to handle read and write internally
imsgev_new() now takes a imsg_handler and and error_handler as callbacks
and calls them when imsg are available or when an error happened.
The imsg_handler now simply gets a imsg pointer and so functions like
main_dispatch_ospfe become a lot simpler.
The error handler is called with an event of EV_WRITE or EV_READ and passes
errno or 0 (for the connection close case).
ospfd does not care about any of that. Since errors are either ignored
(control socker) or are terminal.
Also rework the various imsg dispatch functions to stop peaking at imsg
internals like imsg->data.
OK tb@
Major rework of the libevent based imsg handling in ospfd.
Use imsgbuf_set_userdata() and imsgbuf_set_close_callback() to wrap
the imsg event properly into the imsg framework. This is done in
imsgev.c and it also adds a imsgev_new and imsgbuf_clear calls to
wrap all the setup and teardown into two simple calls.
With this imsg_compose_event() can be nuked and one can use the
imsg API directly without thinking about libevent.
OK tb@
Stop send-keys rejecting pane input when the default target client is
readonly by checking the client that ran the command. Based on fix from
Karl Lehenbauer in GitHub issue 5940.
Add a NOERASE cell flag and use it to draw the character under the
prompt cursor so that terminals which for some reason draw the cursor in
the cell foreground colour look right, GitHub issue 5829.
Split sti(4) in two drivers, sti(4) for rom services and stifb(4) for actual
display operation. This will allow future drivers to attach to sti(4) but
operate differently.
ext2fs: read on-disk timestamps as signed
The ext2 inode keeps its times as 32-bit seconds, which Linux reads as
signed: 1901 to 2038. ext2fs_getattr() widened them unsigned, so a
time before 1970, set by Linux or by utimes(2) here, came back in the
2100s. Sign-extend them. Storing needs no change: the low 32 bits of
a negative time_t are what Linux writes.
Found by xfstests generic/258.
OK miod@
ext2fs: no atime update on a read-only mount
ext2fs_getattr() ran EXT2FS_ITIMES() directly, so a read on a read-only
mount (which sets IN_ACCESS) stamped the in-core atime with the current
time, and stat(2) reported it, although nothing reached the disk. Call
ufs_itimes() instead, as ufs_getattr() does: it skips the update on a
read-only mount and hands ext2 inodes to EXT2FS_ITIMES() otherwise.
Found by xfstests generic/003.
OK miod@
ext2fs: refuse an empty symlink target
symlink(2) with an empty target made a zero-length symlink. ext2 has
no such thing: Linux refuses the call with ENOENT, and e2fsck reports
the inode as an invalid symlink and clears it, so a volume written by
OpenBSD loses the link when Linux checks it. Refuse it with ENOENT as
Linux does.
Found by fsstress (from xfstests), which picks an empty target about
once in PATH_MAX symlinks.
OK miod@
Enable the internal MSI controller on the SiFive FU740 SoC. This works
around an issue with the firmware where the PCIe controller nodes in the
device tree have an "msi-parent" property that points at the PLIC. But
the PLIC doesn't actually handle MSIs.
Tested by matthieu@
graphics/stable-diffusion.cpp: add EPOCH=0
with the upstream build passing #1000, the version looks younger than that
of the first two versions of the port.
pointed out by aja@ and sthen@, thanks
Reduce maximum single object size from 8MB back to 4MB
About two years ago this limit was increased from 4MB to 8MB to accommodate
a large ISP who had inadvertently produced 55,000 ROAs in a deaggregated
fashion, bringing their manifest quite close to 4MB. The size of that
caRepository became quite the bandwidth & CPU hog on all validators
globally. Fortunately for everyone, that ISP managed to consolidate
their routing intentions into fewer ROAs in november 2026 (their
cARepository shrunk from 199MB down to 8.7 MB!). Now is a good moment
to reduce the maximum size of a single signed object in order to
conserve resources.
OK tb@