openbsd
6 years agoadd dmi_match() and change dmi_found() to use it
jsg [Wed, 31 Jan 2018 03:26:00 +0000 (03:26 +0000)]
add dmi_match() and change dmi_found() to use it

6 years agoNo need to add ffs.c as we use .VPATH to reach over into libc/string.
kettenis [Tue, 30 Jan 2018 21:08:05 +0000 (21:08 +0000)]
No need to add ffs.c as we use .VPATH to reach over into libc/string.

ok otto@

6 years agosync
zhuk [Tue, 30 Jan 2018 20:58:13 +0000 (20:58 +0000)]
sync

6 years agoAdd D-Link DWA-125 rev B2 to list of devices supported by run(4).
zhuk [Tue, 30 Jan 2018 20:56:38 +0000 (20:56 +0000)]
Add D-Link DWA-125 rev B2 to list of devices supported by run(4).
Works for me on amd64.

okay stsp@, who also noted this matches Linux commit
fd7b9270120ca7e53fbf0469febe0c68acf6a0a2

6 years agoregroup some commands in a more logical way;
jmc [Tue, 30 Jan 2018 20:48:35 +0000 (20:48 +0000)]
regroup some commands in a more logical way;
ok sunil gilles

6 years agoFix TFTP reading of zero-size files:
naddy [Tue, 30 Jan 2018 20:19:06 +0000 (20:19 +0000)]
Fix TFTP reading of zero-size files:

The AllocatePages EFI call returns an error when the allocation
size is 0.  Skip allocating memory and actually transferring the
file when it is empty.

Properly return the number of unread bytes so that a read() of n
bytes does not return n if no bytes were read.

While here, disallow lseek() beyond the TFTP file buffer for SEEK_CUR
as we already do for SEEK_SET.

ok patrick@

6 years agoprovide ffs, gcc generates calls to it, even when __builtin_ffs() is used.
otto [Tue, 30 Jan 2018 20:15:25 +0000 (20:15 +0000)]
provide ffs, gcc generates calls to it, even when __builtin_ffs() is used.
ok deraadt@

6 years agokeep in sync with ld.so malloc.c
otto [Tue, 30 Jan 2018 17:46:41 +0000 (17:46 +0000)]
keep in sync with ld.so malloc.c

6 years agokill a gcc warning
otto [Tue, 30 Jan 2018 17:45:53 +0000 (17:45 +0000)]
kill a gcc warning

6 years agoport over the malloc changes from libc. prompted by deraadt@
otto [Tue, 30 Jan 2018 16:40:20 +0000 (16:40 +0000)]
port over the malloc changes from libc. prompted by deraadt@

6 years agoAdd support for switching CPUs in ddb on arm64. Based on a diff from drahn@.
kettenis [Tue, 30 Jan 2018 15:46:12 +0000 (15:46 +0000)]
Add support for switching CPUs in ddb on arm64.  Based on a diff from drahn@.

ok patrick@

6 years agoExpand "bound to ..." message to include the source of the lease,
krw [Tue, 30 Jan 2018 13:22:42 +0000 (13:22 +0000)]
Expand "bound to ..." message to include the source of the lease,
either the server IP/MAC or the name of the leases file.

Prompted by phessler@ and landry@ feedback to another diff.

ok phessler@

6 years agodon't reject smtp responses containing non-printable chars as long
eric [Tue, 30 Jan 2018 12:44:55 +0000 (12:44 +0000)]
don't reject smtp responses containing non-printable chars as long
as the status is valid. use strnvis() for displaying status lines
in "smtpctl show queue".

ok gilles@ sunil@

6 years agoword fix; from edgar pettijohn
jmc [Tue, 30 Jan 2018 11:37:58 +0000 (11:37 +0000)]
word fix; from edgar pettijohn

6 years agoadd more pci defines and pci_pcie_cap()/pcie_capability_read_dword()
jsg [Tue, 30 Jan 2018 09:57:58 +0000 (09:57 +0000)]
add more pci defines and pci_pcie_cap()/pcie_capability_read_dword()

6 years agoadd module_init()/module_exit()/signal_pending()
jsg [Tue, 30 Jan 2018 09:05:23 +0000 (09:05 +0000)]
add module_init()/module_exit()/signal_pending()

6 years agoadd stubs for pci_clear_master()/pci_save_state()/pci_restore_state()/
jsg [Tue, 30 Jan 2018 08:54:10 +0000 (08:54 +0000)]
add stubs for pci_clear_master()/pci_save_state()/pci_restore_state()/
pci_set_power_state()

6 years agoadd mutex_destroy()/down_read_trylock()
jsg [Tue, 30 Jan 2018 08:50:59 +0000 (08:50 +0000)]
add mutex_destroy()/down_read_trylock()

6 years agoadd create_singlethread_workqueue()/system_power_efficient_wq
jsg [Tue, 30 Jan 2018 08:49:38 +0000 (08:49 +0000)]
add create_singlethread_workqueue()/system_power_efficient_wq

6 years agoadd pm_runtime_* stubs
jsg [Tue, 30 Jan 2018 08:46:49 +0000 (08:46 +0000)]
add pm_runtime_* stubs

6 years agoDon't limit vga_switcheroo stubs to amd64/i386 and add
jsg [Tue, 30 Jan 2018 08:44:23 +0000 (08:44 +0000)]
Don't limit vga_switcheroo stubs to amd64/i386 and add
vga_switcheroo_fini_domain_pm_ops() stub.

6 years agoadd iowrite64()/writeq()
jsg [Tue, 30 Jan 2018 08:40:19 +0000 (08:40 +0000)]
add iowrite64()/writeq()

6 years agoadd GFP_USER/__user/vmalloc()
jsg [Tue, 30 Jan 2018 08:37:44 +0000 (08:37 +0000)]
add GFP_USER/__user/vmalloc()

6 years agoadd ilog2()/order_base_2()/gcd()
jsg [Tue, 30 Jan 2018 08:35:21 +0000 (08:35 +0000)]
add ilog2()/order_base_2()/gcd()

6 years agodisable -Wformat-zero-length when building with gcc
jsg [Tue, 30 Jan 2018 08:31:38 +0000 (08:31 +0000)]
disable -Wformat-zero-length when building with gcc

-Wformat includes -Wformat-zero-length with gcc 4.2 which breaks
building unmodified atom.c with the SDEBUG macro

"warning: zero-length kprintf format string"

6 years agoadd i2c_bit_add_bus()
jsg [Tue, 30 Jan 2018 08:27:17 +0000 (08:27 +0000)]
add i2c_bit_add_bus()

6 years agoadd more endian macros
jsg [Tue, 30 Jan 2018 08:25:06 +0000 (08:25 +0000)]
add more endian macros

6 years agoadd drm_invalid_op()
jsg [Tue, 30 Jan 2018 08:17:31 +0000 (08:17 +0000)]
add drm_invalid_op()

6 years agoadd atomic_cmpxchg()/atomic64_add()/atomic64_sub()
jsg [Tue, 30 Jan 2018 08:15:17 +0000 (08:15 +0000)]
add atomic_cmpxchg()/atomic64_add()/atomic64_sub()

6 years agoRepair botched retry loop when generating RTM_PROPOSAL
krw [Mon, 29 Jan 2018 23:16:36 +0000 (23:16 +0000)]
Repair botched retry loop when generating RTM_PROPOSAL
messages at startup. Reproducible situation found on
vnet(4) and fix tested by jca@.

6 years agopms: minor cleanups in the alps code.
bru [Mon, 29 Jan 2018 21:54:11 +0000 (21:54 +0000)]
pms: minor cleanups in the alps code.

1. Update the ALPS_*_BEZEL values, which don't match the actual limits
accurately. The new values are used by Linux for all models with the
protocols "V1" and "V2".

2. Models with the ID 0x7331 are not supported properly, remove it
from the list.

3. Report to wsmouse that multiple contacts aren't recognized.

6 years agoacknowledge that DPB_PROPERTIES exists and is documented in dpb.1
espie [Mon, 29 Jan 2018 18:39:28 +0000 (18:39 +0000)]
acknowledge that DPB_PROPERTIES exists and is documented in dpb.1

6 years agoMissed a couple of log_info()'s in previous commit. Use #ifdef DEBUG
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.

6 years agoDrop unused field `ci_ipiih'.
visa [Mon, 29 Jan 2018 14:53:01 +0000 (14:53 +0000)]
Drop unused field `ci_ipiih'.

6 years agoLet the interrupt subsystem allocate memory for the IPI handle,
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.

6 years agoUse log_init(), log_setverbose() and log_debug() more
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.

6 years agoAttach ampintc/ampintcmsi early so pci devices can be attached with
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@

6 years agoRefactor and simplify the logic to select and invoke the
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.

6 years agotrampoline.o depends on assym.h
kettenis [Sun, 28 Jan 2018 17:19:29 +0000 (17:19 +0000)]
trampoline.o depends on assym.h

6 years agotypo
otto [Sun, 28 Jan 2018 14:55:24 +0000 (14:55 +0000)]
typo

6 years agoadd malloc_threaderr
otto [Sun, 28 Jan 2018 13:42:17 +0000 (13:42 +0000)]
add malloc_threaderr

6 years ago- An error in the multithreaded case could print the wrong function name
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

6 years agoTest for correct error when on thread allocates, and another does a double free
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

6 years agoSpin up secondary CPUs and add IPI infrastructure. Heavily based on diffs
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@

6 years agoremove the emulex link: it's dead, and i can;t see any obvious replacement;
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

6 years agoStore PSCI function ids as uint32_t not int in the softc.
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@

6 years agoBring this more in line with our other architectures.
kettenis [Sun, 28 Jan 2018 12:41:39 +0000 (12:41 +0000)]
Bring this more in line with our other architectures.

ok patrick@

6 years agoA few fatal() -> fatalx() where errno is not
krw [Sun, 28 Jan 2018 11:29:30 +0000 (11:29 +0000)]
A few fatal() -> fatalx() where errno is not
relevant.

6 years agoInitialize variables to avoid compiler warnings
inoguchi [Sun, 28 Jan 2018 09:21:34 +0000 (09:21 +0000)]
Initialize variables to avoid compiler warnings

ok jsing@

6 years agotypo
otto [Sun, 28 Jan 2018 09:02:55 +0000 (09:02 +0000)]
typo

6 years agosync
jsg [Sun, 28 Jan 2018 00:54:06 +0000 (00:54 +0000)]
sync

6 years agoSync the nam2blk entries with the bdevsw table, which is the
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@

6 years agoUpdate regress to match removal of ssl_parse_clienthello_tlsext().
jsing [Sat, 27 Jan 2018 15:30:43 +0000 (15:30 +0000)]
Update regress to match removal of ssl_parse_clienthello_tlsext().

6 years agoComplete the TLS extension handling rewrite for the server-side.
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@

6 years agoClarify the comment re the F5 EC curves extension bug.
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.

6 years agoConvert ssl3_put_cipher_by_char() to CBB.
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@

6 years agoFix an interrupt storm issue in vnet(4) mpi@ managed to trigger on my T5220,
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@

6 years agoAdd missing `l' prefix to linker flag and markup SIGHUP; ok jmc@
anton [Sat, 27 Jan 2018 08:38:06 +0000 (08:38 +0000)]
Add missing `l' prefix to linker flag and markup SIGHUP; ok jmc@

6 years agoAvoid passing NULL to vprintf() by assigning a name to client processes. While
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@

6 years agoAdd kernel support for the VFP FPU/SIMD unit. Based on a diff by drahn@.
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@

6 years ago- do not junk pages returned by free_bytes(), all freed chunks are already
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

6 years agoHandle the transfer size option when faking up /etc/random.seed.
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@

6 years agoAdd kernel support for the VFP FPU/SIMD unit. Based on a diff by drahn@.
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@

6 years agoCleanup VFP code.
kettenis [Fri, 26 Jan 2018 16:15:26 +0000 (16:15 +0000)]
Cleanup VFP code.

ok patrick@

6 years agoDocument MODCMAKE_DEBUG
jca [Fri, 26 Jan 2018 13:12:08 +0000 (13:12 +0000)]
Document MODCMAKE_DEBUG

ok landry@

6 years agoallow unpriviledged user to run "encrypt" and "spf walk"
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@

6 years agoFix Failure on Start
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@

6 years agoAdd DPRINTF() and use it to replace log_debug() statements inside
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@

6 years agoRemove mutex implementations that now live in MI code.
mpi [Thu, 25 Jan 2018 15:19:33 +0000 (15:19 +0000)]
Remove mutex implementations that now live in MI code.

6 years agoMove common mutex implementations to a MI place.
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@

6 years agoUse a workaround for detached parent in carp_proto_input_c().
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.

6 years agoUse a new LDFLAGS variable to pass "-melf_i386_obsd" on amd64.
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@

6 years agoAssert that ifiq_destroy() is not called with the NET_LOCK() held.
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@

6 years agocertificate options are case-sensitive; fix case on one that had it wrong.
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

6 years agoFix perl build not to install libperl* twice. This has caused an
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

6 years agoMake the NEON codepaths conditional on __STRICT_ALIGNMENT not being
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@

6 years agoDon't display the seconds until renewal. i.e. "em0: bound to 1.2.3.4
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@

6 years agoImplement support for specifying multiple proposals. This means we can
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@

6 years agoadd the glue to generate future libset, which are currently 100% unused
espie [Wed, 24 Jan 2018 16:52:44 +0000 (16:52 +0000)]
add the glue to generate future libset, which are currently 100% unused

6 years agoPOSIX requires that awk support \v and \a escapes. I used '\007'
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@

6 years agoLog some more errors in the ca code, since there seems to be still a bug
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@

6 years agoUse closefrom(3) instead of manually closing all file descriptors
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

6 years agoDo not print that the firmware was successfully loaded in the USB backend
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@

6 years agoPut the default case, which prints information about an event we do not yet
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@

6 years agoWe don't do booleans in the kernel, so replace a few occurrences of 'true'
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@

6 years agodocument bpfsattach and bpfsdetach
dlg [Wed, 24 Jan 2018 00:33:45 +0000 (00:33 +0000)]
document bpfsattach and bpfsdetach

6 years agoadd support for bpf on "subsystems", not just network interfaces
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@

6 years agoAdd a smarter test that opens a file, unlinks it, and remounts the
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.

6 years agoThe IPv6 gateway address passed to rt6_flush() comes either from a
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@

6 years agoUpdate to tzdata2018c from ftp.iana.org
millert [Tue, 23 Jan 2018 21:54:04 +0000 (21:54 +0000)]
Update to tzdata2018c from ftp.iana.org

6 years agoThe TCP reaper timeout was still imlemented as soft timeout. So
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@

6 years agoAlthough it is a dead store here, always reassign the tcpcb after
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@

6 years agoBring back the PRU_ATTACH constant and description. Then trpt(8)
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@

6 years agoFix printf(9) format strings so that a kernel with TCPDEBUG compiles.
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@

6 years agoFix a logic bug in sshd_exchange_identification which prevented clients
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@

6 years agoAdd missing braces; fixes 'write: Socket is not connected' error in ssh.
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@

6 years agouse END_STRONG. Yes, everything in the sh ecosystem is different..
deraadt [Tue, 23 Jan 2018 17:11:02 +0000 (17:11 +0000)]
use END_STRONG.  Yes, everything in the sh ecosystem is different..

6 years agoAlways lock the kernel lock with non-MP-safe interrupt handlers.
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@

6 years agoRevise 'struct fpreg' such that it can actually represent the full VFPv3-D32
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@

6 years agoFix underline rotation on CCW (quarter counter-clockwise) rotated
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@