Kill the uvm_pmalloc mechanism. This never really worked, at least until
kirill@ fixed some page number/address confusement. But it can't really
work since pages freed by the pagedaemon are likely going to be grabbed
by other consumers before we issue a wakeup through the uvm_pmalloc
mechanism. At this point the consensus is that it adds complexity to the
pagedaemon that stands in the way of progress.
Discussed with claudio@ and deraadt@
ok deraadt@
vmd(8): guard firmware config system state with a mutex.
While vmd is not yet SMP, if multiple VCPUs emulate io to the Qemu
firmware config registers simultaneously, they will race in mutating
and observing state.
Report and diff by Andrew Griffiths.
ok hshoexer@
vmd(8): reject GPAs in holes during gpa translation.
vmd independentaly allocates guest memory in a series of ranges,
mirroring the physical memory layout for the guest. The GPA translation
in find_gap_range() incorrectly selects a memory range if the GPA
is in a hole between two guest memory ranges. Make the initial check
that the GPA falls within the bounds of a known memory range instead
of just prior to the end.
Report and diff by Andrew Griffiths.
ok hshoexer@
vmd(8): guard virtio entropy device register io with a mutex.
While vmd isn't yet SMP capable, in the event multiple VCPU thread
exist they may interleave in emulation of register access of the
virtio entropy device because it's currently emulated in the vm
process.
Report and diff by Andrew Griffiths.
ok hshoexer@
vmd(8): initialize the direct-boot argument page.
In vmd's ELF loader, the boot args page is copied into guest memory
from the stack without complete initialization. Initialize to zero
to prevent leaking stack values into guest memory.
Report and diff by Andrew Griffiths.
ok hshoexer@
Reject invalid payload sizes at vmd(8) control boundary.
When we introduced agressive parsing and santization of imsg objects,
it introduced the ability for a control socket client to force vmd
to exit via fatal() calls. A simple solution is to validate just
the size of the object at the control process boundary as that's
the primary logic for triggering fatal() calls. This may need a
greater redesign but that would require inspecting all imsg
deseralization call points. For now, the author's proposal is fine.
Report and diff by Andrew Griffiths.
ok hshoexer@
Add support for the RISC-V Advanced Interrupt Architecture. This adds
new imsic(4) and aplic(4) drivers for the Incoming MSI Controller and
Advanced Platform-Level Interrupt Controller and supports the standard
configuration where both are presents and imsic(4) functions as the
top-level interrupt controller and aplic(4) forwarding classic interrupt
lines as MSIs to imsic(4). Tested on QEMU and Spacemit K3.
ok jca@, mlarkin@
Fix inverted logic in bus_dmamap_load() and its variants that checks
whether virtual address continuity is needed. This fixes an issue where
cache flushes during bus_dmamap_sync() would fault.
ok jca@
Fix inverted logic in bus_dmamap_load() and its variants that checks
whether virtual address continuity is needed. This fixes an issue where
cache flushes during bus_dmamap_sync() would fault.
ok jca@
At startup move peers quickly to active state but delay the connection
open by SESSION_CLEAR_DELAY
This allows new connection in right after startup but still delays
the connect like before. This is mainly needed for the integration
tests that depend on quick startups.
Issue noticed by anton@
OK tb@
getty(8): don't pass an empty string to login(1)
Entering some text and then deleting it would pass an empty string to
login(1) leading to an error message. Fix this by checking if name is
blank.
This was worked out by Piotr Durlej who submitted a proposed fix. I ended
up going with a simpler fix though. After I came up with my fix I noticed
that FreeBSD commited an identical change as part of a larger commit they
made in 2003.
Discussed with deraadt@
For whatever reason the first IPv6 packet is always lost and so the
bgp session just does not come up in time. Ping6 the neighbor first
so that nd6 lookups are finished before the bgp connection opened.
File systems can provide a pointer to private data to fuse_main(3)
or fuse_new(3). However, if the file system implements init() then
this will be replaced by the return value of init(). If a file
system wants to keep the original value then it can retrieve it by
calling fuse_get_context(3).
OK claudio@
use sshpkt_fatal instead of plain fatal() for errors in the packet
code as this provides context of the failing peer (address, port,
user, etc). Based on patch from Dag-Erling Smørgrav
Don't attempt to validate the mount directory during option parsing.
Instead, check the result of realpath(3) before calling mount(2)
and rely on this to confirm that it is indeed a directory.
File systems like ntfs-3g that don't call fuse_parse_cmdline(3)
will now print an error message if the directory doesn't exist
rather than silently failing.
OK claudio@