same way as OpenBSD.
The use of coherent (uncacheable on ARM and other arches) mappings
for transfer buffers impacts performance, espcially where memcpys
are involved.
Audit the necessary usb_syncmem operations - a few were missing.
- Merge the eventswitch parent notification code which was copied in two
places (eventswitchchild)
- Fix bugs in the eventswitch parent notification code:
1. p_slflags should be accessed holding both proc_lock and p->p_lock
2. p->p_opptr can be NULL if the parent was PSL_CHTRACED and exited.
Fixes random crashes the posix_spawn_kill_spawner unit test which tried
to dereference a NULL pptr.
rx-copy (first shipped in NetBSD 6.0 in 2012) the only supported
mode
this is mostly to simplify maintenance and future development
rx-flip is not supported by Linux Dom0/DomU, and NetBSD Dom0/DomU
defaults to rx-copy for over 8 years now too, so there is little
need to keep the support for compatibility
besides compatibility there is no other reason to keep rx-flip -
page transfer is generally slower than copy due to necessary MMU/TLB
manipulation, especially on MP systems
0x60006003, which blocks SIGTERM by default, so running something simple
from a hook, like /etc/rc.d/racoon restart does not work. The script
is then stuck waiting for the daemon to die, which it won't since it will
never receive the signal, and the hook never terminates.
This logic is already present in subr_copy.c:copyin_vmspace() and
rumpcopy.c:copyinstr().
This avoids memcpy() calls for NULL objects that is Undefined Behavior,
allowed in the kernel space (-fno-delete-null-pointer-checks), but not
in userland.
Reported by UBSan.
Reading from a database is now optional.
Compiling terminfo descriptions (including from $TERMINFO) is now optional.
Compat support is now optional.
This removes 17k on amd64 from the binary size, which allows it to be used
again on space constrained ramdisks.
notice: On the boards I've obtained, the number on the cable stamp
doesn't match the actual unit number of the attached device.
Cable's 0,1,2,..,7 corresponds to comN+0,2,4,6,1,3,5,7 :-(
thread sleeps in wdcwait() - check current lwp rather than relying
on global ATACH_TH_RUN channel flag
should fix the hang part of the problem reported in
http://mail-index.netbsd.org/netbsd-users/2020/03/12/msg024249.html
thanks to Paul Ripke for providing extensive debugging info
This bug was reported by UBSan runs.
lib/libusbhid/parse.c:246:20
Can result in left shift changes signedness bit as a side effect positive number
can go negative, cast it to unsigned for the operation and silence the issue.
Reviewed by: kamil@
This bug was reported by UBSan runs.
lib/libusbhid/usage.c:247:27
lib/libusbhid/usage.c:244:28
lib/libusbhid/usage.c:235:13
Can result in left shift changes signedness bit as a side effect positive number
can go negative, cast it to unsigned for the operation and silence the issue.
Reviewed by: kamil@
This bug was reported by UBSan runs.
lib/libusbhid/data.c:58:25
lib/libusbhid/data.c:91:7
lib/libusbhid/data.c:92:7
Can result in left shift changes signedness bit as a side effect positive number
can go negative, cast it to unsigned for the operation and silence the issue.
Reviewed by: kamil@
and getcwd():
- push vnode locking back as far as possible.
- do most lookups directly in the namecache, avoiding vnode locks & refs.
- don't block new refs to vnodes across VOP_INACTIVE().
- get shared locks for VOP_LOOKUP() if the file system supports it.
- correct lock types for VOP_ACCESS() / VOP_GETATTR() in a few places.
Possible future enhancements:
- make the lookups lockless.
- support dotdot lookups by being lockless and inferring absence of chroot.
- maybe make it work for layered file systems.
- avoid vnode references at the root & cwd.