We are returning an ACPI_INTEGER (= uint64_t), so it doesn't make
sense to handle more than 64 bits.
Apparently there are some ACPIs out there that ask for unreasonably
large widths here. Just reject those requests, rather than writing
past the caller's stack buffer.
Previously we attempted to fix this by copying byte by byte as large
as the caller asked, in order to avoid the undefined behaviour of
shifting past the size of ACPI_INTEGER, but that just turned a shift
(which might have been harmless on real machines) into a stack buffer
overflow (!).
ok msaitoh
on the OpenBSD single-port XR21V1410 uxrcom driver, but adds support
for multi-port chipsets and uses the common umodem framework instead of
being a standalone driver.
Thanks to skrll@ for much USB clue and mrg@ for financing the
development of this driver.
and rest of kernel code doing disk I/O was also converted over to it,
it's finally safe to remove the code to handle misaligned buffers
leave just KASSERT() in place
are properly aligned; e.g. readdisklabel() does the same
also removed the DKW_MALLOC()/DKW_FREE()/DKW_REALLOC() macros as apparently
unnecessary, these files don't seem to be compiled into any userland tools
dkwedge_gpt.c confirmed working, others compile-tested only
this is required for Xen xbd(4) in order to not have to use bounce buffers
the alignment is implicitly provided when POOL_REDZONE is not active,
this change makes it also aligned when POOL_REDZONE _is_ active - that is
when (!KMSAN && (DIAGNOSTIC || KASAN))
http://mail-index.netbsd.org/source-changes/2020/02/20/msg114173.html
Comment turned out to be wrong, and KASSERT fires for oea.
XXX
Need to revisit shortly...
this limit already, so implement the handler functions outside, and jump
to them. This allows to add instructions in the future.
Sent to ryo@ and skrll@.
- radix_tree_insert_node(): if the insert failed due to ENOMEM, roll back
any updates made to the tree.
- radix_tree_grow(): either succeed or fail, never make partial adjustments
to the tree.
- radix_tree_await_memory(): allocate & free the maximum possible number of
nodes required by any insertion.
again after wakeup. Previously it could panic because cv_signal() could
be called by cv_wait_sig() + others:
cv_broadcast(cv);
cv_destroy(cv);
- In support of the above, if an LWP doing a timed wait is awoken by
cv_broadcast() or cv_signal(), don't return an error if the timer
fires after the fact, i.e. either succeed or fail, not both.
- Remove LOCKDEBUG code for CVs which never worked properly and is of
questionable use.
use bus_dmamap_load_mbuf() et.al.
due to XENPV override, _BUS_BUS_TO_PHYS() dmamap segment ds_addr
gets filled with ma, so value can be directly used for e.g. grant calls