Commit Graph

275627 Commits

Author SHA1 Message Date
jdolecek
2cd88f170e convert to IFEF_MPSAFE, also enable interrupt handler without biglock
no performance difference observed compared to version before change,
for neither UP nor MP DomU
2020-04-06 18:23:21 +00:00
martin
6dfee14336 Document the phil-wifi branch 2020-04-06 18:15:57 +00:00
jdolecek
e1a6ae4645 remove restriction on interrupt level for MP-safe interrupt handlers 2020-04-06 18:02:33 +00:00
jdolecek
3ffa8acef1 just pass true as known_mpsafe for interrupt establish, drop the
(level != IPL_VM); NFCI, this uses IPL_HIGH so was mpsafe already
2020-04-06 17:55:51 +00:00
jdolecek
26de71c2df make a pass on locking, replacing spl*() calls with mutexes:
- sc_tx_lock covers any access to tx list, tx ring, and writes to
  if_flags and if_itimer
- sc_rx_lock covers any access to rx list, tx ring, and free tx counter

fix suspend and detach to work again - recent softintr changes made
xennet_tx_complete() not actually being called, because the call
in xennet_handler() was after IFF_RUNNING check; now it's called
directly rather than triggering softint, with updates locking it's safe

enable DVF_DETACH_SHUTDOWN for xennet(4), though the call only
triggers notification to backend to close, leaves actual detach to
xenwatch_thread
2020-04-06 16:43:34 +00:00
jdolecek
514d5d55ce #undef XENNET_DEBUG, accidentaly left enabled in previous commit 2020-04-06 15:30:52 +00:00
hannken
aa1a83f41d udf_get_node(): fix typo and honor "lktype" argument. 2020-04-06 14:31:06 +00:00
martin
94c50ac97f Sync image size with available space reserved in the RAMDISK kernel 2020-04-06 13:28:15 +00:00
roy
2fc87b1b6a postinstall: fix contents_owner to return an error on error
find returning nothing via stdout but does return an error is an error.
Fixes the case where dhcpcd chroot db directory isn't owned by _dhcpcd.
2020-04-06 13:10:48 +00:00
martin
05220c998f Use full available ram disk space 2020-04-06 11:58:10 +00:00
martin
d599871e97 Slightly bump ramdisk space 2020-04-06 11:57:51 +00:00
jdolecek
fc07698e80 remove some XENNET_DEBUG code which causes kernel faults 2020-04-06 10:44:44 +00:00
jdolecek
42c34851b7 remove some unnecessary spl*() calls, and fix the rxreq va/pa deallocation
in xennet_xenbus_detach()
2020-04-06 10:33:10 +00:00
jdolecek
9c39b872db save some memory - no need to embed sc inside struct xennet_rxreq 2020-04-06 10:05:38 +00:00
martin
b187e11174 Sync "common" declarations with ifdefs in header. 2020-04-06 09:54:24 +00:00
msaitoh
6ba9c2d85f Print CPUID 0x80000007 %edx on both Intel and AMD. 2020-04-06 09:48:44 +00:00
msaitoh
db775ba90f Remove ci_max_ext_cpuid because it's the same as ci_cpuid_extlevel. 2020-04-06 09:46:21 +00:00
jdolecek
11be9a9673 define M_CSUM_BLANK, eventually to be used by xennet(4)/xvif(4) to offload
checksums to NIC hw
2020-04-06 09:32:54 +00:00
msaitoh
0da3f0635f Rename CPUID_APM_TSC to CPUID_APM_ITSC. No functional change. 2020-04-06 09:24:49 +00:00
kamil
16775553f7 Welcome to 9.99.55!
struct proc regained p_oppid.
2020-04-06 08:28:53 +00:00
rin
6776cf02ff Remove copy-paste garbage. 2020-04-06 08:26:33 +00:00
jdolecek
5c8dd76a7e set rxreq_gntref to GRANT_INVALID_REF immediately after revoking
access, so it's clear where it comes from
2020-04-06 08:26:32 +00:00
kamil
848901a664 Reintroduce struct proc::p_oppid
Relying on p_opptr is not safe as there is a race between:
 - spawner giving a birth to a child process and being killed
 - spawnee accessng p_opptr and reporting TRAP_CHLD

PR kern/54786 by Andreas Gustafsson
2020-04-06 08:20:05 +00:00
mrg
d26fa7dbd1 dion't define endian as well as try to declare it as a variable. 2020-04-06 06:41:34 +00:00
msaitoh
68ebfa1765 CPUID Fn00000001 %edx bit 8 is printed as "TSC", so rename CPUID Fn8000_0007
%edx bit 8 from "TSC" to "ITSC" (Invariant TSC) to avoid confusion.
2020-04-06 02:36:49 +00:00
snj
20b4652c75 fix comment in typo 2020-04-06 01:43:26 +00:00
jmcneill
fe4a0bfb98 Cleanup CPU attach output:
- Always print the core's vendor and product name.
 - Print the CPU ID on the same line as the name. Single line of dmesg
   per core.
 - Use aprint_verbose for reporting additional details.
2020-04-05 22:54:51 +00:00
christos
c5cbfafef6 new OpenSSL/binutils 2020-04-05 21:56:04 +00:00
christos
84a88c1152 merge conflicts 2020-04-05 21:53:44 +00:00
christos
cbd0443d58 Changes between 1.1.1e and 1.1.1f [31 Mar 2020]
*) Revert the change of EOF detection while reading in libssl to avoid
     regressions in applications depending on the current way of reporting
     the EOF. As the existing method is not fully accurate the change to
     reporting the EOF via SSL_ERROR_SSL is kept on the current development
     branch and will be present in the 3.0 release.
     [Tomas Mraz]

  *) Revised BN_generate_prime_ex to not avoid factors 3..17863 in p-1
     when primes for RSA keys are computed.
     Since we previously always generated primes == 2 (mod 3) for RSA keys,
     the 2-prime and 3-prime RSA modules were easy to distinguish, since
     N = p*q = 1 (mod 3), but N = p*q*r = 2 (mod 3). Therefore fingerprinting
     2-prime vs. 3-prime RSA keys was possible by computing N mod 3.
     This avoids possible fingerprinting of newly generated RSA modules.
     [Bernd Edlinger]
2020-04-05 21:50:44 +00:00
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