Commit Graph

275547 Commits

Author SHA1 Message Date
christos
3dd07195ab Prevent waiting for processes to exit forever by introducing _rc_kill_ntries,
which if set, will SIGKILL the processes that did not die yet.
2020-04-05 21:03:08 +00:00
skrll
3c6295a06d Switch USB to use non-coherent buffers for data transfers in the
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.
2020-04-05 20:59:38 +00:00
christos
5d8d37a4f7 There is no "s" lock. 2020-04-05 20:53:46 +00:00
christos
1d19491032 - Untangle spawn_return by splitting it up to sub-functions.
- 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.
2020-04-05 20:53:17 +00:00
mrg
49efe95ea6 fix the mrg arm entry text that said v7 + v7, not v7 + v8.
noticed while checking what was wrong with the prior ;)
2020-04-05 19:48:27 +00:00
jdolecek
b122d52951 remove RX flip from diagnostic, it was removed 2020-04-05 19:03:30 +00:00
jdolecek
50b6c6006e fix date for mrg arm entry 2020-04-05 19:01:36 +00:00
jdolecek
44853da279 remove xengnt_grant_transfer() and xengnt_revoke_transfer(), nothing
uses it any more
2020-04-05 17:48:30 +00:00
jdolecek
8c0cf2ea16 note removal of xen rx-flip 2020-04-05 17:45:19 +00:00
jdolecek
99996197cc remove support for legacy rx-flip mode for xennet(4)/xvif(4), making
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
2020-04-05 17:26:46 +00:00
christos
e35433dceb Don't block signals when running hooks. Here ctx->sigset == defsigs ==
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.
2020-04-05 15:41:45 +00:00
joerg
6ce4f404a1 Fix depenency on common symbols in sbin. 2020-04-05 15:25:39 +00:00
kamil
17a313ddde Return early on 0-sized transfers (usually to/from NULL-objects)
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.
2020-04-05 15:16:11 +00:00
martin
b6924e8af2 Conditionalize a few more functions (hopefully fixing the build) 2020-04-05 14:53:39 +00:00
sevan
841fdb7e60 Support the use of DHCP in the install environment 2020-04-05 14:36:43 +00:00
jdolecek
ff14298d06 no need to pollute dmesg by xennet_watchdog(), turn the message into DPRINTFN() 2020-04-05 14:20:18 +00:00
jdolecek
1322d29b97 remove nsmb from MD list of devices to create for 'all' 2020-04-05 14:09:17 +00:00
christos
749ba30f7b We generate this. 2020-04-05 13:25:01 +00:00
roy
e457e4abc4 tools: Build tic with full fat terminfo 2020-04-05 12:31:39 +00:00
roy
9e387da605 terminfo: Add guards to optionally build parts of libterminfo
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.
2020-04-05 12:31:02 +00:00
martin
d001b02d00 Adapt to libterminfo as part of libhack-curses 2020-04-05 11:19:01 +00:00
martin
fa0d5eae99 Extend the curses hack to terminfo - build selected parts of
libterminfo as part of libhack, so we can drop unwanted features
for small install media.
2020-04-05 11:18:02 +00:00
ryo
d052e2b491 add entry for NetMos NM9900 Octa UART
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 :-(
2020-04-05 10:43:09 +00:00
mlelstv
f8df89e092 revert to previous 2020-04-05 05:19:24 +00:00
christos
5c3c6e4f74 PR/55137: Kouichi Hashikawa: ipfstat -f incorrect output
- make sure frag is initialized to 0
- initialize ipfr_p field
2020-04-05 02:51:34 +00:00
christos
088d18f154 PR/55137: Kouichi Hashikawa: ipfstat -f incorrect output
Fix incorrect byte order.
2020-04-05 02:50:27 +00:00
christos
102c608adf we don't delete entries, we mark them obsolete so that postinstall can
delete the files.
2020-04-05 01:21:43 +00:00
christos
ab8a9ee1de us and them, then! 2020-04-05 00:36:25 +00:00
ad
035ad6a85b Allocate PV entries in PAGE_SIZE chunks, and cache partially allocated PV
pages with the pmap.  Worth about 2-3% sys time on build.sh for me.
2020-04-05 00:21:11 +00:00
ad
065aeb9d9a NetBSD 9.99.54 - namei changes. 2020-04-04 23:58:54 +00:00
christos
c6e7fca7f4 Document and set a default for KERNEL_DIR 2020-04-04 23:54:06 +00:00
kamil
e6494e6f4f Switch to type generic PRIu macros
Fixes build on i386.
2020-04-04 23:22:12 +00:00
christos
2cc98f83cd make sure _OSRELEASE is defined where it is needed. 2020-04-04 23:19:08 +00:00
kamil
b8ac715762 Fix LLVM sanitizers build after removal of netsmb
Cherry-pick upstream commit:

From 695ca346eb0c724fb79c6f166cfecd736eae6608 Mon Sep 17 00:00:00 2001
From: Kamil Rytarowski <n54@gmx.com>
Date: Sun, 5 Apr 2020 00:54:55 +0200
Subject: [PATCH] [compiler-rt] Fix build on NetBSD 9.99.52+

Add a fallback definition of the netsmb device driver that
was removed.
2020-04-04 23:17:34 +00:00
jdolecek
ffdabc7e1f stop xfer timeouts during recovery, all xfers will be requeued anyway
this avoids race with the timeout routine when processing the xfers
for requeueing

should fix PR kern/54790 by Izumi Tsutsui
2020-04-04 22:30:02 +00:00
mlelstv
e264b2bd0f one more netsmb reference. 2020-04-04 22:08:33 +00:00
jdolecek
2f9d652e0f fix deadlock in wdcwait() when xfer timeout happens while the atabus
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
2020-04-04 21:36:15 +00:00
dholland
7ec84f335a Move the note about sys_errlist[] users to COMPATIBILITY, and strengthen it. 2020-04-04 21:29:54 +00:00
dholland
903a8c167f Add missing ERRORS section. 2020-04-04 21:26:44 +00:00
fox
a4861c96ec lib/libusbhid: Fix possible left shift changes signedness bit.
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@
2020-04-04 21:26:16 +00:00
fox
f76ca3088f lib/libusbhid: Fix possible left shift changes signedness bit.
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@
2020-04-04 21:23:04 +00:00
fox
ef659d5053 lib/libusbhid: Fix possible left shift changes signedness bit.
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@
2020-04-04 21:21:35 +00:00
dholland
4aee32ddde Minor clarification. And a typo. Bump date. 2020-04-04 21:20:39 +00:00
ad
c70743cce9 Mark uvm_map_entry_cache with PR_LARGECACHE. 2020-04-04 21:17:02 +00:00
kamil
068c592bb4 Add new example kernel module: current_time
Submitted by Apurva Nandan.
2020-04-04 21:15:04 +00:00
christos
42413888fc silence lint. 2020-04-04 21:13:20 +00:00
christos
9dd097b5c2 Always include the sampling member so that the struct size is consistent. 2020-04-04 21:00:03 +00:00
ad
3b26322cff vrelel(): clear VV_MAPPED with the vnode still locked. 2020-04-04 20:54:42 +00:00
ad
e1c1e00642 Regen. 2020-04-04 20:52:18 +00:00
ad
c90f9c8c81 Merge the remaining changes from the ad-namecache branch, affecting namei()
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.
2020-04-04 20:49:30 +00:00