espie [Mon, 29 Jan 2018 18:39:28 +0000 (18:39 +0000)]
acknowledge that DPB_PROPERTIES exists and is documented in dpb.1
krw [Mon, 29 Jan 2018 15:18:05 +0000 (15:18 +0000)]
Missed a couple of log_info()'s in previous commit. Use #ifdef DEBUG
instead of #if DEBUG.
visa [Mon, 29 Jan 2018 14:53:01 +0000 (14:53 +0000)]
Drop unused field `ci_ipiih'.
visa [Mon, 29 Jan 2018 14:51:57 +0000 (14:51 +0000)]
Let the interrupt subsystem allocate memory for the IPI handle,
to drop remaining uses of `ci_ipiih'. In addition, mark the IPI
handler MP-safe.
krw [Mon, 29 Jan 2018 13:41:30 +0000 (13:41 +0000)]
Use log_init(), log_setverbose() and log_debug() more
appropriately. Fixes '-q' logging oddities.
Prompted by phessler@ plea for '-v'-like behaviour rather
than putting everything under DPRINTF()'s.
jsg [Mon, 29 Jan 2018 11:46:44 +0000 (11:46 +0000)]
Attach ampintc/ampintcmsi early so pci devices can be attached with
msi when using qemu -M virt.
ok kettenis@
krw [Sun, 28 Jan 2018 23:12:36 +0000 (23:12 +0000)]
Refactor and simplify the logic to select and invoke the
appropriate function to process a packet.
kettenis [Sun, 28 Jan 2018 17:19:29 +0000 (17:19 +0000)]
trampoline.o depends on assym.h
otto [Sun, 28 Jan 2018 14:55:24 +0000 (14:55 +0000)]
typo
otto [Sun, 28 Jan 2018 13:42:17 +0000 (13:42 +0000)]
add malloc_threaderr
otto [Sun, 28 Jan 2018 13:41:48 +0000 (13:41 +0000)]
- An error in the multithreaded case could print the wrong function name
- Start with a full page of struct region_info's
- Save an mprotect in the init code: allocate 3 pages with none and
make the middle page r/w instead of a r/w allocation and two calls to make the
guard pages none
otto [Sun, 28 Jan 2018 13:38:00 +0000 (13:38 +0000)]
Test for correct error when on thread allocates, and another does a double free
kettenis [Sun, 28 Jan 2018 13:17:45 +0000 (13:17 +0000)]
Spin up secondary CPUs and add IPI infrastructure. Heavily based on diffs
from dran@.
ok patrick@
jmc [Sun, 28 Jan 2018 12:59:12 +0000 (12:59 +0000)]
remove the emulex link: it's dead, and i can;t see any obvious replacement;
from denis fondras
jsg [Sun, 28 Jan 2018 12:48:20 +0000 (12:48 +0000)]
Store PSCI function ids as uint32_t not int in the softc.
Avoids unwanted sign extension on arm64 that resulted in qemu not
recognising the function ids and matches the specification.
Problem reported by semarie@
ok kettenis@
kettenis [Sun, 28 Jan 2018 12:41:39 +0000 (12:41 +0000)]
Bring this more in line with our other architectures.
ok patrick@
krw [Sun, 28 Jan 2018 11:29:30 +0000 (11:29 +0000)]
A few fatal() -> fatalx() where errno is not
relevant.
inoguchi [Sun, 28 Jan 2018 09:21:34 +0000 (09:21 +0000)]
Initialize variables to avoid compiler warnings
ok jsing@
otto [Sun, 28 Jan 2018 09:02:55 +0000 (09:02 +0000)]
typo
jsg [Sun, 28 Jan 2018 00:54:06 +0000 (00:54 +0000)]
sync
naddy [Sat, 27 Jan 2018 22:55:23 +0000 (22:55 +0000)]
Sync the nam2blk entries with the bdevsw table, which is the
definitive list of block devices supported on an architecture.
ok kettenis@ deraadt@
jsing [Sat, 27 Jan 2018 15:30:43 +0000 (15:30 +0000)]
Update regress to match removal of ssl_parse_clienthello_tlsext().
jsing [Sat, 27 Jan 2018 15:30:05 +0000 (15:30 +0000)]
Complete the TLS extension handling rewrite for the server-side.
This removes ssl_parse_clienthello_tlsext() and allows the CBS to be
passed all the way through from ssl3_get_client_hello(). The renegotation
check gets pulled up into ssl3_get_client_hello() which is where other
such checks exist.
The TLS extension parsing now also ensures that we do not get duplicates
of any known extensions (the old pre-rewrite code only did this for some
extensions).
ok inoguchi@
jsing [Sat, 27 Jan 2018 15:17:13 +0000 (15:17 +0000)]
Clarify the comment re the F5 EC curves extension bug.
Also reference the knowledge base article instead of a discussion thread.
jsing [Sat, 27 Jan 2018 15:09:15 +0000 (15:09 +0000)]
Convert ssl3_put_cipher_by_char() to CBB.
While here make the CBS usage in ssl3_get_cipher_by_char() more consistent
with other code.
ok inoguchi@
stsp [Sat, 27 Jan 2018 13:44:03 +0000 (13:44 +0000)]
Fix an interrupt storm issue in vnet(4) mpi@ managed to trigger on my T5220,
similar to the issue fixed in vldcp(4) recently. For good measure also fix
it again in vldcp(4) in case the Rx channel is reset rather than goes down.
My T5220 has been running fine with this change.
ok kettenis@
anton [Sat, 27 Jan 2018 08:38:06 +0000 (08:38 +0000)]
Add missing `l' prefix to linker flag and markup SIGHUP; ok jmc@
anton [Sat, 27 Jan 2018 08:32:03 +0000 (08:32 +0000)]
Avoid passing NULL to vprintf() by assigning a name to client processes. While
here rework the switch proc_title(), both clang and gcc will now warn if all
possible values are not enumerated.
ok gilles@
kettenis [Fri, 26 Jan 2018 22:25:23 +0000 (22:25 +0000)]
Add kernel support for the VFP FPU/SIMD unit. Based on a diff by drahn@.
This allows us to use floating-pointer and vector instructions in userland
code. The current implementation assumes all 32 VFP registers are present.
This should be the case on all armv7 hardware currently supported by
OpenBSD.
ok patrick@
otto [Fri, 26 Jan 2018 19:14:51 +0000 (19:14 +0000)]
- do not junk pages returned by free_bytes(), all freed chunks are already
junked
- freezero(): only clear requested size
naddy [Fri, 26 Jan 2018 16:40:14 +0000 (16:40 +0000)]
Handle the transfer size option when faking up /etc/random.seed.
Without this, clients that queried the size would receive 0 as response.
ok jca@
kettenis [Fri, 26 Jan 2018 16:22:19 +0000 (16:22 +0000)]
Add kernel support for the VFP FPU/SIMD unit. Based on a diff by drahn@.
This allows us to use floating-pointer and vector instructions in userland
code. The current implementation assumes all 32 VFP registers are present.
This should be the case on all armv7 hardware currently supported by
OpenBSD.
ok patrick@
kettenis [Fri, 26 Jan 2018 16:15:26 +0000 (16:15 +0000)]
Cleanup VFP code.
ok patrick@
jca [Fri, 26 Jan 2018 13:12:08 +0000 (13:12 +0000)]
Document MODCMAKE_DEBUG
ok landry@
eric [Fri, 26 Jan 2018 08:00:54 +0000 (08:00 +0000)]
allow unpriviledged user to run "encrypt" and "spf walk"
ok todd@, gilles@, sunil@
ccardenas [Fri, 26 Jan 2018 05:34:41 +0000 (05:34 +0000)]
Fix Failure on Start
When attempting to start a vm from vm.conf that fails due to inadequate
resources and such, do not remote vm entry from vm list.
Reported by mpi@
ok mpi@
krw [Thu, 25 Jan 2018 15:43:51 +0000 (15:43 +0000)]
Add DPRINTF() and use it to replace log_debug() statements inside
#ifdef DEBUG/#endif blocks.
Suggestions on correct idiom (C99 vs gcc) from millert@
ok tom@
mpi [Thu, 25 Jan 2018 15:19:33 +0000 (15:19 +0000)]
Remove mutex implementations that now live in MI code.
mpi [Thu, 25 Jan 2018 15:06:29 +0000 (15:06 +0000)]
Move common mutex implementations to a MI place.
Archs not yet converted can to the jump by defining __USE_MI_MUTEX.
ok visa@
mpi [Thu, 25 Jan 2018 14:47:35 +0000 (14:47 +0000)]
Use a workaround for detached parent in carp_proto_input_c().
A NULL dereference can happen since processing protocol layer is
deffered to a second task. In other words the NET_LOCK() is released
then regrabbed between ip_input() and carp_proto_input().
The same workaround is already in use in carp_output() due to deffered
processing in case of IPsec.
The real fix is to make carp(4) MP-safe and use if_get(9) there, any
taker?
Found & fix tested by Hrvoje Popovski.
mpi [Thu, 25 Jan 2018 14:09:52 +0000 (14:09 +0000)]
Use a new LDFLAGS variable to pass "-melf_i386_obsd" on amd64.
Makes the linker generate a correct i386 gap.o file.
ok kettenis@, deraadt@
mpi [Thu, 25 Jan 2018 14:04:36 +0000 (14:04 +0000)]
Assert that ifiq_destroy() is not called with the NET_LOCK() held.
Calling taskq_barrier() on a softnet thread while holding the lock
is clearly a deadlock.
ok visa@, dlg@, bluhm@
djm [Thu, 25 Jan 2018 03:34:43 +0000 (03:34 +0000)]
certificate options are case-sensitive; fix case on one that had it wrong.
move a badly-place sentence to a less bad place
yasuoka [Thu, 25 Jan 2018 02:47:00 +0000 (02:47 +0000)]
Fix perl build not to install libperl* twice. This has caused an
actual error if "install" was done parallelly.
ok espie todd andrew1, input andrew1
kettenis [Wed, 24 Jan 2018 23:03:37 +0000 (23:03 +0000)]
Make the NEON codepaths conditional on __STRICT_ALIGNMENT not being
defined as they rely on unaligned access.
ok joel@
krw [Wed, 24 Jan 2018 19:12:49 +0000 (19:12 +0000)]
Don't display the seconds until renewal. i.e. "em0: bound to 1.2.3.4
-- renewal in 300000 seconds" becomes simply "em0: bound to 1.2.3.4"
While here avoid setting timeouts before the current time.
ok florian@
patrick [Wed, 24 Jan 2018 17:01:52 +0000 (17:01 +0000)]
Implement support for specifying multiple proposals. This means we can
have a higher flexibility in negotiating with other peers, or even ease
migration from one proposal to a more secure one.
ok sthen@
espie [Wed, 24 Jan 2018 16:52:44 +0000 (16:52 +0000)]
add the glue to generate future libset, which are currently 100% unused
millert [Wed, 24 Jan 2018 16:28:25 +0000 (16:28 +0000)]
POSIX requires that awk support \v and \a escapes. I used '\007'
for BEL since that is what lex.c uses, though we could safely use
'\a' there instead. OK martijn@
claudio [Wed, 24 Jan 2018 13:51:36 +0000 (13:51 +0000)]
Log some more errors in the ca code, since there seems to be still a bug
hidden somewhere. Also return after a poll timeout, there is no reason to
wait longer than a second for the answer of the ca process.
OK jsing@
tb [Wed, 24 Jan 2018 13:25:25 +0000 (13:25 +0000)]
Use closefrom(3) instead of manually closing all file descriptors
between 3 and 19.
ok martijn, millert, jca
patrick [Wed, 24 Jan 2018 13:10:20 +0000 (13:10 +0000)]
Do not print that the firmware was successfully loaded in the USB backend
driver. It is only useful to know if firmware loading has failed. This
means fewer clutter in dmesg(8).
Spotted by and ok stsp@
patrick [Wed, 24 Jan 2018 13:07:31 +0000 (13:07 +0000)]
Put the default case, which prints information about an event we do not yet
handle, into a debug printf. Also do not print a pointer to kernel buffers
so that we don't leak kernel addresses.
Spotted by and ok stsp@
patrick [Wed, 24 Jan 2018 13:04:22 +0000 (13:04 +0000)]
We don't do booleans in the kernel, so replace a few occurrences of 'true'
with nicer integer equivalents.
Spotted by and ok stsp@
dlg [Wed, 24 Jan 2018 00:33:45 +0000 (00:33 +0000)]
document bpfsattach and bpfsdetach
dlg [Wed, 24 Jan 2018 00:25:17 +0000 (00:25 +0000)]
add support for bpf on "subsystems", not just network interfaces
bpf assumed that it was being unconditionally attached to network
interfaces, and maintained a pointer to a struct ifnet *. this was
mostly used to get at the name of the interface, which is how
userland asks to be attached to a particular interface. this diff
adds a pointer to the name and uses it instead of the interface
pointer for these lookups. this in turn allows bpf to be attached
to arbitrary subsystems in the kernel which just have to supply a
name rather than an interface pointer. for example, bpf could be
attached to pf_test so you can see what packets are about to be
filtered. mpi@ is using this to look at usb transfers.
bpf still uses the interface pointer for bpfwrite, and for enabling
and disabling promisc. however, these are nopped out for subsystems.
ok mpi@
bluhm [Tue, 23 Jan 2018 22:30:34 +0000 (22:30 +0000)]
Add a smarter test that opens a file, unlinks it, and remounts the
file system read-only. After unmounting this should result in a
dirty file system that is not marked clean. Disable both tests
with dangling vnodes for now as they fail.
bluhm [Tue, 23 Jan 2018 22:06:42 +0000 (22:06 +0000)]
The IPv6 gateway address passed to rt6_flush() comes either from a
packet through ip6_input() or from the routing table. In both cases
the KAME hack has added the embeded scope to the address, so it is
not necessary to fill the scope id again in rt6_flush(). Assert
that it is already there.
OK mpi@
millert [Tue, 23 Jan 2018 21:54:04 +0000 (21:54 +0000)]
Update to tzdata2018c from ftp.iana.org
bluhm [Tue, 23 Jan 2018 21:41:17 +0000 (21:41 +0000)]
The TCP reaper timeout was still imlemented as soft timeout. So
it could run immediately and was not synchronized with the TCP
timeouts, although that was the intension when it was introduced
in revision 1.85. Convert the reaper to an ordinary TCP timeout
so it is scheduled on the same timeout thread after all timeouts
have finished. A net lock is not necessary as the process calling
tcp_close() will not access the tcpcb after arming the reaper
timeout.
OK mikeb@
bluhm [Tue, 23 Jan 2018 21:06:47 +0000 (21:06 +0000)]
Although it is a dead store here, always reassign the tcpcb after
calling tcp_close(), tcp_drop(), and tcp_disconnect(). Then no
freed memory can be used after closing a TCP connection.
OK mikeb@ mpi@
bluhm [Tue, 23 Jan 2018 20:49:58 +0000 (20:49 +0000)]
Bring back the PRU_ATTACH constant and description. Then trpt(8)
prints the ATTACH action for TCP debugging socketes correctly.
OK bluhm@
bluhm [Tue, 23 Jan 2018 20:41:42 +0000 (20:41 +0000)]
Fix printf(9) format strings so that a kernel with TCPDEBUG compiles.
Mark the string variables with TCP debugging names as constant.
OK mpi@
stsp [Tue, 23 Jan 2018 20:00:58 +0000 (20:00 +0000)]
Fix a logic bug in sshd_exchange_identification which prevented clients
using major protocol version 2 from connecting to the server.
ok millert@
stsp [Tue, 23 Jan 2018 18:33:49 +0000 (18:33 +0000)]
Add missing braces; fixes 'write: Socket is not connected' error in ssh.
ok deraadt@
deraadt [Tue, 23 Jan 2018 17:11:02 +0000 (17:11 +0000)]
use END_STRONG. Yes, everything in the sh ecosystem is different..
visa [Tue, 23 Jan 2018 14:47:21 +0000 (14:47 +0000)]
Always lock the kernel lock with non-MP-safe interrupt handlers.
Suggested by kettenis@
kettenis [Tue, 23 Jan 2018 12:38:14 +0000 (12:38 +0000)]
Revise 'struct fpreg' such that it can actually represent the full VFPv3-D32
state.
ok patrick@
fcambus [Tue, 23 Jan 2018 10:10:32 +0000 (10:10 +0000)]
Fix underline rotation on CCW (quarter counter-clockwise) rotated
screens.
The "underline" was actually drawn above text.
OK jcs@
otto [Tue, 23 Jan 2018 07:06:55 +0000 (07:06 +0000)]
Fix table wrt missing element and `, detailed analysis and diff from
David Fifield; ok tb@
djm [Tue, 23 Jan 2018 05:27:21 +0000 (05:27 +0000)]
Drop compatibility hacks for some ancient SSH implementations, including
ssh.com <=2.* and OpenSSH <= 3.*.
These versions were all released in or before 2001 and predate the
final SSH RFCs. The hacks in question aren't necessary for RFC-
compliant SSH implementations.
ok markus@
djm [Tue, 23 Jan 2018 05:17:04 +0000 (05:17 +0000)]
try harder to preserve errno during ssh_connect_direct() to make the
final error message possibly accurate; bz#2814, ok dtucker@
djm [Tue, 23 Jan 2018 05:12:12 +0000 (05:12 +0000)]
unbreak support for clients that advertise a protocol version
of "1.99" (indicating both v2 and v1 support). Busted by me during
SSHv1 purge in r1.358; bz2810, ok dtucker
djm [Tue, 23 Jan 2018 05:06:25 +0000 (05:06 +0000)]
don't attempt to force hostnames that are addresses to lowercase, but
instead canonicalise them through getnameinfo/getaddrinfo to remove
ambiguities (e.g. ::0001 => ::1) before they are matched against
known_hosts; bz#2763, ok dtucker@
djm [Tue, 23 Jan 2018 05:01:15 +0000 (05:01 +0000)]
avoid modifying pw->pw_passwd; let endpwent() clean up for us, but
keep a scrubbed copy; bz2777, ok dtucker@
kevlo [Tue, 23 Jan 2018 02:53:26 +0000 (02:53 +0000)]
Fix checks for error return from urtw_alloc_rx_data_list() and
urtw_alloc_tx_data_list() in 8187b init.
From James Jerkins, thanks.
bru [Mon, 22 Jan 2018 22:14:11 +0000 (22:14 +0000)]
1. Add a field for configuring the size of edge areas on touchpads.
2. Remove code that is obsolete because all touchpad drivers configure
wsmouse for compat mode now.
okan [Mon, 22 Jan 2018 20:56:47 +0000 (20:56 +0000)]
Add support for 'a:' and 'exists:' mechanisms.
ok gilles@
bluhm [Mon, 22 Jan 2018 20:27:28 +0000 (20:27 +0000)]
Bring back the detach messages in trpt(8) for tcp debugging. They
got lost with the pr_detach conversion. While there, remove some
dead code.
OK mpi@
espie [Mon, 22 Jan 2018 13:18:37 +0000 (13:18 +0000)]
Triggered by Klemens Nanni patch, move OLD_WRKDIR_NAME into OBSOLETE VARIABLES
and deprecate WRKDIR_LINKNAME.
helg [Mon, 22 Jan 2018 13:16:48 +0000 (13:16 +0000)]
Use the proper address space when using a kernel that supports
Supervisor Mode Access Prevention (SMAP) compiled with FUSE_DEBUG.
While here, add some sanity check to the debug function fuse_dump_buff.
Thanks to Thomas Jeunet.
OK mpi@, helg@
fcambus [Mon, 22 Jan 2018 12:20:54 +0000 (12:20 +0000)]
More sizes for free() in wscons(4).
OK visa@
mpi [Mon, 22 Jan 2018 10:04:46 +0000 (10:04 +0000)]
<machine/mutex.h> -> <sys/mutex.h>
mpi [Mon, 22 Jan 2018 09:40:45 +0000 (09:40 +0000)]
Include <sys/mutex.h> instead of <machine/mutex.h>
required by upcoming MI mutex change.
mpi [Mon, 22 Jan 2018 09:31:35 +0000 (09:31 +0000)]
Include <sys/mutex.h> rather than <machine/mutex.h>
Required by upcoming MI mutex change.
mpi [Mon, 22 Jan 2018 09:08:43 +0000 (09:08 +0000)]
Always grab the KERNEL_LOCK() for !IPL_MPSAFE handlers.
Suggested by kettenis@, ok visa@
mpi [Mon, 22 Jan 2018 09:06:22 +0000 (09:06 +0000)]
Use ip_send() to not call ip_output() recursively in *start() routine.
ok visa@
mpi [Mon, 22 Jan 2018 09:05:06 +0000 (09:05 +0000)]
Do not call ip_output() recursively in vxlan_start().
ip_output() currently needs the NET_LOCK() which is not held when an
interface is added to a pf(4) queue.
Fix an issue reported by Jason Tubnor, ok dlg@
mpi [Mon, 22 Jan 2018 09:01:39 +0000 (09:01 +0000)]
Add SHT_SYMTAB_SHNDX
Required by Karel Gardas to unbreak GHC head.
jsg [Mon, 22 Jan 2018 03:14:33 +0000 (03:14 +0000)]
regen
jsg [Mon, 22 Jan 2018 03:13:09 +0000 (03:13 +0000)]
add clang-local(1) to SEE ALSO
suggested by jmc@ ok patrick@
jsg [Mon, 22 Jan 2018 02:28:09 +0000 (02:28 +0000)]
Match on Iris Pro Graphics 580 and other skylake GT4 ids and correct
the Iris Graphics P555 GT3 id.
Derived from the following linux commits:
drm/i915/skl: Add SKL GT4 PCI IDs
From Mika Kuoppala
15620206ae87ba9643ffa6f5ddb5471be7192006 in mainline linux
drm/i915: Update SKL SRV GT4 pci ids reference.
From Rodrigo Vivi
5390974f981907cd02d1cb48145b03471279877a in mainline linux
drm/i915/skl: Add missing SKL ID
From Michal Winiarski
ca7a45ba6fb9e7ceca56d10b91db29c2f3451a2e in mainline linux
Expanded version of a diff from ccardenas@.
Reported and tested by Bryan Vyhmeister.
Tested by and ok ccardenas@
kettenis [Sun, 21 Jan 2018 22:30:41 +0000 (22:30 +0000)]
Move some code back from locore0.S to locore.S that we will need to bring up
secondary CPUs. This involves adjusting get_virt_delta() to account for the
fact that it may no longer live near the start of kernel code. Heavily based
on a diff from drahn@.
ok patrick@, deraadt@
kettenis [Sun, 21 Jan 2018 21:56:02 +0000 (21:56 +0000)]
Implement ffs(3) using the CLZ instructions which has been available ever
since ARMv5. Should be much faster but more importantly it removes the
data table from .text which could introduce unwanted ROP gadgets.
Based on changes in Android/Bionic by Elliott Hughes.
ok patrick@
patrick [Sun, 21 Jan 2018 21:37:01 +0000 (21:37 +0000)]
Add missing OpenBSD CVS tag
patrick [Sun, 21 Jan 2018 21:35:34 +0000 (21:35 +0000)]
Implement network boot support in efiboot(8). This changes efiboot(8)
to recognize if it has been booted via PXE. The new TFTP file system
layer will then use the matching PXE base code protocol handle to load
the files. Since this uses the PXE base code protocol for abstraction
instead of the raw Simple Network protocol this will at this point not
work on u-boot based machines.
ok kettenis@
jasper [Sun, 21 Jan 2018 20:18:20 +0000 (20:18 +0000)]
add new '-c' option which runs a command instead of an interactive shell
from Paul de Weerd
ok ian@ job@; manpage bits are ok jmc@
halex [Sun, 21 Jan 2018 19:58:37 +0000 (19:58 +0000)]
fix error handling while fetching sets
reported by naddy@ long ago
ok rpe@
mikeb [Sun, 21 Jan 2018 18:54:46 +0000 (18:54 +0000)]
Release interrupt source if the interrupt task is already scheduled
Tested by Imre Oolberg, thanks!
mikeb [Sun, 21 Jan 2018 18:51:19 +0000 (18:51 +0000)]
Improve panic message