schwarze [Sun, 30 Apr 2017 15:05:27 +0000 (15:05 +0000)]
Mention that escaping "^" as "\(ha" in source code samples improves
portability, in particular when rendering to formats such as PDF
with real typesetters such as groff.
While here, make it even more explicit that the rendering of raw
ASCII accents ( ` ' ~ ^ ) found in the input is kind of a mess and
varies among implementations, software versions, macro sets, and
output devices.
Issue noticed when reading the groff_char(7) manual, and confirmed
by testing with current groff.
OK bentley@, "certainly no objection" jmc@
N.B.: Nobody will get scolded for ignoring this subtlety.
kettenis [Sun, 30 Apr 2017 14:03:44 +0000 (14:03 +0000)]
Add xhci@fdt, and move ehci(4) from the sunxi block to the generic block.
kettenis [Sun, 30 Apr 2017 14:00:06 +0000 (14:00 +0000)]
Add rkgrf(4), a driver that makes the "generic register file" of the Rockchip
RK3399 available to other drivers through the regmap interface.
kettenis [Sun, 30 Apr 2017 13:54:00 +0000 (13:54 +0000)]
Make early attrbute work here as well. Remove unreachable panic while there.
ok visa@
ajacoutot [Sun, 30 Apr 2017 13:41:10 +0000 (13:41 +0000)]
Tweak error message when running on an unsupported release.
mpi [Sun, 30 Apr 2017 13:04:49 +0000 (13:04 +0000)]
Unifdef KGDB.
It doesn't compile und hasn't been working during the last decade.
ok kettenis@, deraadt@
mpi [Sun, 30 Apr 2017 10:11:03 +0000 (10:11 +0000)]
Check that unsupported operation returns ENOSYS.
mpi [Sun, 30 Apr 2017 10:10:21 +0000 (10:10 +0000)]
Return ENOSYS for unsupported operation.
mpi [Sun, 30 Apr 2017 09:03:58 +0000 (09:03 +0000)]
Regression tests for futex(2).
mpi [Sun, 30 Apr 2017 09:01:14 +0000 (09:01 +0000)]
Add futex(2) shim, bump minor.
Inputs from guenther@, ok kettenis@, visa@
beck [Sun, 30 Apr 2017 05:43:05 +0000 (05:43 +0000)]
Make BIO_get_host_ip just yet another getaddrinfo wrapper
beck [Sun, 30 Apr 2017 05:09:22 +0000 (05:09 +0000)]
Rework BIO_accept to be more like modern code.
ok jsing@
jsing [Sun, 30 Apr 2017 04:44:58 +0000 (04:44 +0000)]
Only enable -Werror on libcrypto/libssl/libtls if we are building with
gcc4. This should avoid failed builds while transitioning compilers.
While here also make the CFLAGS blocks consistent across makefiles.
Discussed with deraadt@, ok beck@
visa [Sun, 30 Apr 2017 04:32:58 +0000 (04:32 +0000)]
Remove unused POW status functions. Makes clang happier.
jsing [Sun, 30 Apr 2017 04:21:53 +0000 (04:21 +0000)]
Switch back to freezero() and explicitly initialise data_len to zero. The
previous code was safe since data would always be NULL if data_len was
uninitialised, however compilers cannot know this.
beck [Sun, 30 Apr 2017 04:18:58 +0000 (04:18 +0000)]
Microsoft Windows hates BIO_get_accept_socket in portable. Fix it to
not be awful or have any claims on supporting ipv6 when it does so
very badly
ok jsing@
jsing [Sun, 30 Apr 2017 03:53:31 +0000 (03:53 +0000)]
Add missing tls_init() and tls_free() calls.
jsing [Sun, 30 Apr 2017 02:10:22 +0000 (02:10 +0000)]
Add a tls_keypair_clear_key() function that uses freezero() to make key
material inaccessible, then call it from the appropriate places.
ok beck@
jsing [Sat, 29 Apr 2017 23:38:49 +0000 (23:38 +0000)]
Fix a bug caused by the return value being set early to signal successful
DTLS cookie validation. This can mask a later failure and result in a
positive return value being returned from ssl3_get_client_hello(), when
it should return a negative value to propagate the error.
Ironically this was introduced in OpenSSL
2e9802b7a7b with the commit
message "Fix DTLS cookie management bugs".
Fix based on OpenSSL.
Issue reported by Nicolas Bouliane <nbouliane at jive dot com>.
ok beck@
beck [Sat, 29 Apr 2017 22:31:42 +0000 (22:31 +0000)]
Revert previous - we still want to do this, but I forgot about the installer
and want to avoid the wrath of theo when he arrives home in a couple
of hours :)
beck [Sat, 29 Apr 2017 22:22:24 +0000 (22:22 +0000)]
We now require you to have a working libpthread
beck [Sat, 29 Apr 2017 21:54:54 +0000 (21:54 +0000)]
Make it safe to call SSL_library_init more than once.
We are basically admitting that pthread is everywhere, and
we will be using it for other things too.
ok jsing@
jsing [Sat, 29 Apr 2017 21:48:43 +0000 (21:48 +0000)]
Stop calling OPENSSL_init() internally, since it is a no-op. Also place
it under #ifndef LIBRESSL_INTERNAL.
ok beck@
nicm [Sat, 29 Apr 2017 21:27:46 +0000 (21:27 +0000)]
Fix UTF-8 combining characters in column 0, based on a diff from Keith
Winstein.
kettenis [Sat, 29 Apr 2017 20:49:09 +0000 (20:49 +0000)]
Replace sxiehci.c with more generic glue in ehci_fdt.c that is similiar in
spirit to the xhci_fdt.c glue. The new code sets up any attached USB PHYs
based on their "compatible" property. All the hardware supported by sxiehci.c
should be supported by this new code. In addition to that this adds support
for the EHCI controllers found on various Rockchip hardware such as the
RK3288 and RK3399 SoCs.
ok patrick@
jung [Sat, 29 Apr 2017 19:03:45 +0000 (19:03 +0000)]
fix argument check, this should never trigger because it is a libexec called by
smtpd, but for the sake of correctness
from Edgar Pettijohn
ok gilles@
beck [Sat, 29 Apr 2017 18:43:31 +0000 (18:43 +0000)]
Switch Linux getrandom() usage to non-blocking mode, continuing to
use fallback mechanims if unsuccessful.
The design of Linux getrandom is broken. It has an
uninitialized phase coupled with blocking behaviour, which
is unacceptable from within a library at boot time without
possible recovery.
ok deraadt@ jsing@
kettenis [Sat, 29 Apr 2017 18:13:25 +0000 (18:13 +0000)]
Decrement ci_idepth on all returns from agintc_irq_handler().
kettenis [Sat, 29 Apr 2017 17:24:41 +0000 (17:24 +0000)]
Add agintc(4), a driver for interrupt controllers conforming to ARM's
generic interrupt controller architecture specification v3/4.
The hard work was done by drahn@, I just cleaned it up a bit and fixed
a couple of bugs.
ok patrick@, drahn@
kettenis [Sat, 29 Apr 2017 17:10:43 +0000 (17:10 +0000)]
Move the userret() call out of data_abort() and simply call it just before we
return from do_el0_sync(). Prevents future mistakes.
kettenis [Sat, 29 Apr 2017 17:07:09 +0000 (17:07 +0000)]
Call refreshcreds() in ast() since we may get there without going through
do_el0_sync() or mi_syscall().
jsg [Sat, 29 Apr 2017 14:28:21 +0000 (14:28 +0000)]
put clang headers into clang sets
ok deraadt@
schwarze [Sat, 29 Apr 2017 12:43:55 +0000 (12:43 +0000)]
Parser unification: use nice ohashes for all three request and macro tables;
no functional change, minus two source files, minus 200 lines of code.
jsg [Sat, 29 Apr 2017 10:05:49 +0000 (10:05 +0000)]
store cpu model information in the buffer used by the hw.model sysctl
ok kettenis@
mpi [Sat, 29 Apr 2017 08:02:56 +0000 (08:02 +0000)]
Mark futex(2) as PLEDGE_STDIO like all other thread-related syscalls.
From semarie@, ok deraadt@
jmc [Sat, 29 Apr 2017 06:06:01 +0000 (06:06 +0000)]
tweak previous;
djm [Sat, 29 Apr 2017 04:12:25 +0000 (04:12 +0000)]
allow ssh-keygen to include arbitrary string or flag certificate
extensions and critical options. ok markus@ dtucker@
bluhm [Sat, 29 Apr 2017 01:57:04 +0000 (01:57 +0000)]
Test that suslogd's UDP sockets bound to *.514 do not receive packets
if the -u insecure mode is not selected.
deraadt [Sat, 29 Apr 2017 00:32:21 +0000 (00:32 +0000)]
sync
krw [Fri, 28 Apr 2017 23:33:07 +0000 (23:33 +0000)]
Restore calculation of volume size. Accidentally removed in
r1.25. Fixes creation of concat volumes.
Noticed by and diff from Thordur I. Bjornsson via tech@
ok jsing@
beck [Fri, 28 Apr 2017 23:03:58 +0000 (23:03 +0000)]
Revert previous change that forced consistency between return value and
error code, since this breaks the documented API. Under certain circumstances
this will result in incorrect successful certiticate verification (where
a user supplied callback always returns 1, and later code checks the error
code to potentially abort post verification)
beck [Fri, 28 Apr 2017 22:46:40 +0000 (22:46 +0000)]
revert previous accidental commit
beck [Fri, 28 Apr 2017 22:38:51 +0000 (22:38 +0000)]
*** empty log message ***
millert [Fri, 28 Apr 2017 22:16:43 +0000 (22:16 +0000)]
Quiet a clang warning from -Wstring-plus-int. OK naddy@
nicm [Fri, 28 Apr 2017 19:13:55 +0000 (19:13 +0000)]
Log what is happening with window and session reference counts much more
obviously.
nicm [Fri, 28 Apr 2017 19:12:15 +0000 (19:12 +0000)]
Remove a reference from the right window when removing from a winlink's
list.
nicm [Fri, 28 Apr 2017 19:10:48 +0000 (19:10 +0000)]
Do not put the window on the alerts queue and add a reference unless the
alert is enabled and we are actually going to add the alerts event.
nicm [Fri, 28 Apr 2017 17:58:44 +0000 (17:58 +0000)]
Konsole incorrectly ignores SU (CSI S) if the parameter is bigger than
the scroll region, so clamp it. Reported by Moritz Bunkus.
mpi [Fri, 28 Apr 2017 17:54:24 +0000 (17:54 +0000)]
Reference the "Futexes Are Tricky" paper.
With schwarze@
schwarze [Fri, 28 Apr 2017 16:23:30 +0000 (16:23 +0000)]
Delete .Pp right before the first .Sh and right before any .Ss,
and warn about it; mdoclint(1) does so, and it makes sense.
bluhm [Fri, 28 Apr 2017 15:04:49 +0000 (15:04 +0000)]
Check that non existing log files in syslog.conf are reported to
/dev/console during startup and restart. Startup warnings contain
the pid now. Console logging creates additional errors if the file
descriptor limit is exhausted.
bluhm [Fri, 28 Apr 2017 14:52:13 +0000 (14:52 +0000)]
When syslogd(8) failed to open a logfile, the error message could
get lost. Remove log_setdebug() as it adds too much abstraction,
use the global variable Started instead. Set the Started value
before the init() function. Then errors during config file processing
will be logged to the console as Initialize is still 0. This is
better than stderr as the latter may be redirected to /dev/null.
Print the timestamp and hostname also for direct messages to console,
so that they look like all others.
bug report jung@; OK benno@
jmc [Fri, 28 Apr 2017 14:30:54 +0000 (14:30 +0000)]
errant space;
mikeb [Fri, 28 Apr 2017 14:15:45 +0000 (14:15 +0000)]
Remove double assignments
schwarze [Fri, 28 Apr 2017 14:11:01 +0000 (14:11 +0000)]
Start deleting redundant features that are already covered
by mandoc(1) -Tlint, as suggested by the upstream author
and maintainer Thomas Klausner <wiz @ NetBSD>.
The ultimate goal is to get rid of mdoclint and integrate
all its functionality into mandoc, but that will still take
some time, so simplify mdoclint for the time being.
jmc@ "go ahead", OK wiz@, also committed upstream
This first patch removes the AUTHORS check that mandoc does, too.
mpi [Fri, 28 Apr 2017 14:02:57 +0000 (14:02 +0000)]
Document futex(2) with a lot of inputs from schwarze@
mpi [Fri, 28 Apr 2017 13:53:05 +0000 (13:53 +0000)]
Display futex(2) operations and arguments.
mpi [Fri, 28 Apr 2017 13:51:14 +0000 (13:51 +0000)]
regen
mpi [Fri, 28 Apr 2017 13:50:54 +0000 (13:50 +0000)]
Add futex(2) syscall based on a sane subset of its Linux equivalent.
The syscall is marked NOLOCK and only FUTEX_WAIT grabs the KERNEL_LOCK()
because of PCATCH and the signal nightmare.
Serialization of threads is currently done with a global & exclusive
rwlock.
Note that the current implementation still use copyin(9) which is not
guaranteed to be atomic. Committing now such that remaining issues can
be addressed in-tree.
With inputs from guenther@, kettenis@ and visa@.
ok deraadt@, visa@
benno [Fri, 28 Apr 2017 13:50:02 +0000 (13:50 +0000)]
add City of Derry Airport
ok "i have been there"@
nicm [Fri, 28 Apr 2017 13:39:59 +0000 (13:39 +0000)]
Default for xterm-keys was wrong, stop documenting it.
kettenis [Fri, 28 Apr 2017 11:28:20 +0000 (11:28 +0000)]
Install a few more x86 intrinsics header files.
spotted by espie@
mlarkin [Fri, 28 Apr 2017 10:09:37 +0000 (10:09 +0000)]
add some comments. no functional change
mlarkin [Fri, 28 Apr 2017 08:14:48 +0000 (08:14 +0000)]
rename i8253 "counter" to "channel", a better name for what we are
emulating
mlarkin [Fri, 28 Apr 2017 07:44:36 +0000 (07:44 +0000)]
vmm: don't use invvpid if we didn't detect vpid capability during
vcpu setup
jmc [Fri, 28 Apr 2017 06:15:03 +0000 (06:15 +0000)]
sort;
dtucker [Fri, 28 Apr 2017 04:16:27 +0000 (04:16 +0000)]
Merge missing bits from Colin Watson's patch in bz#2658 which make integrity
tests more robust against timeouts. ok djm@
dtucker [Fri, 28 Apr 2017 04:00:14 +0000 (04:00 +0000)]
Pull back some shell portability fixes from -portable to make future syncs
easier. Note that this also changes the number of bytes skipped on "Bad
Packet" errors from 2 to 3 because the worst case is changing the high byte
of the length field in which case skipping 3 bytes is needed. ok djm@
djm [Fri, 28 Apr 2017 03:24:53 +0000 (03:24 +0000)]
include key fingerprint in "Offering public key" debug message
millert [Fri, 28 Apr 2017 03:21:12 +0000 (03:21 +0000)]
Avoid relying on implementation-specific behavior when detecting
whether the timestamp or file size overflowed. If time_t and
off_t are not either 32-bit or 64-bit scp will exit with an error.
OK djm@
dtucker [Fri, 28 Apr 2017 03:20:27 +0000 (03:20 +0000)]
Add SyslogFacility option to ssh(1) matching the equivalent option in
sshd(8). bz#2705, patch from erahn at arista.com, ok djm@
millert [Thu, 27 Apr 2017 23:54:08 +0000 (23:54 +0000)]
ntohl() returns uint32_t so it cannot be < 0. Since we're storing
the result in an int check for > INT_MAX instead. OK bluhm@
millert [Thu, 27 Apr 2017 23:52:35 +0000 (23:52 +0000)]
Remove "len < 0" check; len is socklen_t (uint32_t) so can't be
negative. Quiets a warning from clang. OK bluhm@
kettenis [Thu, 27 Apr 2017 22:41:46 +0000 (22:41 +0000)]
Bring over the changes to mainbus(4) and simplebus(4) from arm64.
schwarze [Thu, 27 Apr 2017 22:27:43 +0000 (22:27 +0000)]
Merge trivial patches from pkgsrc to get rid of gratuitious differences;
no functional change on OpenBSD: rev.s 1.50, 1.52, 1.62, 1.63
Of course, keep intentional differences.
schwarze [Thu, 27 Apr 2017 22:07:06 +0000 (22:07 +0000)]
Detect links to self by parsing .Nm in SYNOPSIS.
Functionality suggested and patch OK'ed by jmc@.
Patch also accepted upstream in pkgsrc by wiz@.
bluhm [Thu, 27 Apr 2017 21:39:27 +0000 (21:39 +0000)]
Enforce that sysctl kern.somaxconn and sominconn can only be set
to valid values. The so_qlimit is type short.
report Dillon Jay Pena; OK deraadt@
millert [Thu, 27 Apr 2017 21:28:00 +0000 (21:28 +0000)]
Change len arg of getidle() from size_t to int since it is used as
a length parameter to a "%.*s" printf format. Quiets a compiler
warning (both gcc and clang).
millert [Thu, 27 Apr 2017 20:55:52 +0000 (20:55 +0000)]
challenge is an array, not a pointer, therefore cannot be NULL.
Quiets a clang warning.
schwarze [Thu, 27 Apr 2017 20:41:08 +0000 (20:41 +0000)]
tls_free(3) and tls_config_free(3) accept NULL;
patch from Matthew Martin <phy1729 at gmail dot com>,
slightly tweaked by me
robert [Thu, 27 Apr 2017 17:41:47 +0000 (17:41 +0000)]
syspatch needs to create shared libs with the same object sequence instead
of randomizing the order so let's read the libs on the system and link the
same way in case a syspatch is being built
deraadt [Thu, 27 Apr 2017 16:34:18 +0000 (16:34 +0000)]
track size of pss allocation, so that length can be passed to free(9)
ok mlarkin
tedu [Thu, 27 Apr 2017 16:09:32 +0000 (16:09 +0000)]
clang warns about some of the strlcpy arguments here, which aren't the
typical idiom because there's invisible size dependencies. rewrite some
of it to use memcpy, which makes clear the lengths are the same.
millert [Thu, 27 Apr 2017 15:46:14 +0000 (15:46 +0000)]
Remove the "volatile" attribute from bpf_error(). The "volatile"
attribute is an obsolete way of saying "noreturn". clang doesn't
recognize it and the function is already marked __dead so it is
superfluous anyway.
millert [Thu, 27 Apr 2017 15:35:36 +0000 (15:35 +0000)]
Remove useless check for ks_env_table being NULL. Since ks_env_table
is an array embedded in struct keynote_session it can never be NULL.
Quiets a clang warning.
jsg [Thu, 27 Apr 2017 13:40:05 +0000 (13:40 +0000)]
remove a static array unused since rev 1.306 spotted by clang
ok djm@
mikeb [Thu, 27 Apr 2017 13:30:54 +0000 (13:30 +0000)]
Don't send multiple error messages in response to a single command
While a few commands (such as HELP and NOOP) are allowed in between
USER and PASS, most of the others are not. However if such command
is issued, ftpd should abort the command evaluation early and reply
with "530 Please login with USER and PASS."
From form@, with input from deraadt@ and OK millert@
millert [Thu, 27 Apr 2017 11:53:12 +0000 (11:53 +0000)]
Avoid potential signed int overflow when parsing the file size.
Use strtoul() instead of parsing manually. OK djm@
mpi [Thu, 27 Apr 2017 11:48:08 +0000 (11:48 +0000)]
Unifdef KADB.
ok deraadt@
kettenis [Thu, 27 Apr 2017 10:57:05 +0000 (10:57 +0000)]
Use (32-bit) word-sized access in the a4x bus space routine even if only
a byte or a half-word is needed. Certain implementations of the Synopsis
Designware copy-and-paste logic blocks don't respond to transactions that
are smaller than a word.
Fixes the serial console on boards with a Rockchip RK3288.
kettenis [Thu, 27 Apr 2017 10:23:19 +0000 (10:23 +0000)]
Add code to identify the CPUs on arm64 systems. The primary CPU is attached
and identified early on. For the secondary CPUs this happens late, such that
the drivers we need to spin up CPUs, such as psci(4), will be available.
This also fixes some code in simplebus(4) where the return value of
OF_getprop() was not properly checked.
Heavily based on an earlier diff from drahn@.
ok drahn@, jsg@
mlarkin [Thu, 27 Apr 2017 07:15:35 +0000 (07:15 +0000)]
rename a struct that was denoted as "VMX only" to make it more clear
that it can be used in SVM and VMX.
no functional change
mlarkin [Thu, 27 Apr 2017 06:49:05 +0000 (06:49 +0000)]
use a more descriptive value from the VEI_DIR_xxx enum instead of a
hardcoded number. no functional change
jmc [Thu, 27 Apr 2017 06:22:11 +0000 (06:22 +0000)]
spelling;
mlarkin [Thu, 27 Apr 2017 06:16:39 +0000 (06:16 +0000)]
vmm(4): proper save/restore of FPU context during entry/exit.
tested by reyk, dcoppa, and a few others.
ok kettenis@ on the fpu bits
ok deraadt@ on the vmm bits
stsp [Thu, 27 Apr 2017 06:14:23 +0000 (06:14 +0000)]
Restore if_iwm.c r1.173 (mira retry change) which got incarcerated by
the backout police even though it wasn't responsible for anything.
pointed out by tb@
stsp [Thu, 27 Apr 2017 05:49:32 +0000 (05:49 +0000)]
iwm(4) monitor mode support was backed out for now.
stsp [Thu, 27 Apr 2017 05:46:51 +0000 (05:46 +0000)]
Revert if_iwm.c to the state of r1.170 because ETOOMANYDRAGONSATONCE.
Performance regression reported by deraadt@ and uvm_fault reported by fcambus@.
I will be poking further at this out of tree.
dlg [Thu, 27 Apr 2017 00:02:03 +0000 (00:02 +0000)]
add support for -msave-args in gcc on amd64
i got sick of not having arguments in ddb stack traces on amd64,
which is because amd64 passes arguments in registers, and it's
impossible to figure out where they go without dwarf info, and when
you have dwarf info it is complicated.
solaris has a simple solution for this. they tweaked their compilers
to accept an -msave-args option which makes functions store their
arguments on the stack, while maintaining compatability with the
System V AMD64 ABI. tools (eg, ddb) can then look at the stack to
get access to function arguments in traces.
this ports their changes to gcc 3 to our gcc.
ok deraadt@
naddy [Wed, 26 Apr 2017 21:25:43 +0000 (21:25 +0000)]
silence clang warnings: add an extra pair of parentheses and stop
passing empty format strings to printf-family functions; ok millert@