openbsd
7 years agoUse calloc(3) and recallocarray(3) instead of *alloc* + memset(0).
tb [Wed, 12 Apr 2017 18:24:37 +0000 (18:24 +0000)]
Use calloc(3) and recallocarray(3) instead of *alloc* + memset(0).

ok deraadt

7 years agoSipHash_Final() was assuming the digest was 64-bit aligned, resulting in
deraadt [Wed, 12 Apr 2017 17:41:49 +0000 (17:41 +0000)]
SipHash_Final() was assuming the digest was 64-bit aligned, resulting in
misaligned memory accesses with armv7 ramdisk -Os bsd.rd ping
ok florian millert

7 years agoNew strstr() implementation from musl libc by Rich Felker. This
millert [Wed, 12 Apr 2017 16:06:12 +0000 (16:06 +0000)]
New strstr() implementation from musl libc by Rich Felker.  This
version uses the two-way string matching algorithm and is faster
than the old implementation.  With this change, ports that check
for strstr having linear complexity time strstr will no longer
replace the libc strstr with a private version.
OK deraadt@ espie@

7 years agoPrevent inosused from wrapping when soft updates is enabled while
millert [Wed, 12 Apr 2017 15:23:08 +0000 (15:23 +0000)]
Prevent inosused from wrapping when soft updates is enabled while
scanning the used inode map.  The code as written assumes inosused
is signed but this is no longer the case.  OK deraadt@

7 years agoisblank() is ANSI C since C99, no need to provide a replacement.
millert [Wed, 12 Apr 2017 14:53:27 +0000 (14:53 +0000)]
isblank() is ANSI C since C99, no need to provide a replacement.
OK deraadt@

7 years agobluhm discovered "script < /dev/null" attempts tty operations in violation
deraadt [Wed, 12 Apr 2017 14:49:05 +0000 (14:49 +0000)]
bluhm discovered "script < /dev/null" attempts tty operations in violation
of pledge.  We can wrap isatty() around those codepaths.
ok bluhm beck

7 years agoAdd comment what the test does.
bluhm [Wed, 12 Apr 2017 14:46:31 +0000 (14:46 +0000)]
Add comment what the test does.

7 years agoRTM_PROTO3 messages should not trigger a resolv.conf check.
krw [Wed, 12 Apr 2017 14:08:15 +0000 (14:08 +0000)]
RTM_PROTO3 messages should not trigger a resolv.conf check.

7 years agoThe pledge sigkill test is an outdated copy of sigabrt. Remove the
bluhm [Wed, 12 Apr 2017 13:14:08 +0000 (13:14 +0000)]
The pledge sigkill test is an outdated copy of sigabrt.  Remove the
former and activate the latter.
OK semarie@

7 years agoShuffle another function.
krw [Wed, 12 Apr 2017 12:22:25 +0000 (12:22 +0000)]
Shuffle another function.

7 years agoAdd comment how the test works.
bluhm [Wed, 12 Apr 2017 11:55:41 +0000 (11:55 +0000)]
Add comment how the test works.

7 years agoexplicitly set the ownership on installed include files as well
jsg [Wed, 12 Apr 2017 08:02:10 +0000 (08:02 +0000)]
explicitly set the ownership on installed include files as well

7 years agoInvoke install -d for each directory in the /usr/lib/clang hierarchy
jsg [Wed, 12 Apr 2017 07:57:06 +0000 (07:57 +0000)]
Invoke install -d for each directory in the /usr/lib/clang hierarchy
as they aren't in mtree.  Problem with wrong ownership and permission
of directories reported by sthen@.

ok deraadt@ sthen@ tb@

7 years agoCorrect a format string
guenther [Wed, 12 Apr 2017 05:46:59 +0000 (05:46 +0000)]
Correct a format string

Problem noted by Michael W. Bombardieri (mb(at)ii.net)
ok mlarkin@ deraadt@

7 years ago- Mention LIBCXX, prompted by espie@.
sthen [Tue, 11 Apr 2017 20:40:43 +0000 (20:40 +0000)]
- Mention LIBCXX, prompted by espie@.

7 years ago- Mention LIBCXX, prompted by espie@.
sthen [Tue, 11 Apr 2017 20:40:33 +0000 (20:40 +0000)]
- Mention LIBCXX, prompted by espie@.

- Make it clear that CLANG_ARCHS, GCC3_ARCHS, GCC4_ARCHS refer to the base compiler.
Change "Clang 3.9.1" to just "Clang".

7 years agoEnsure that the version part of $_url_base is correctly removed by
rpe [Tue, 11 Apr 2017 19:23:10 +0000 (19:23 +0000)]
Ensure that the version part of $_url_base is correctly removed by
using $VNAME (x.y) instead of $VERSION (xy). This fixes the problem
that the version part ended up in installurl which is wrong anyway
and also confuses pkg_add.

Thanks to florian@ and trondd at kagu-tsuchi dot com for reporting
this.

OK tb@

7 years agosync
deraadt [Tue, 11 Apr 2017 19:01:24 +0000 (19:01 +0000)]
sync

7 years agoshorten introductory sentence and make deprecation clearer;
schwarze [Tue, 11 Apr 2017 17:01:11 +0000 (17:01 +0000)]
shorten introductory sentence and make deprecation clearer;
disgussed with deraadt@

7 years agoAdd SIOCATMARK to allow pledge("inet") programs to call sockatmark(3).
bluhm [Tue, 11 Apr 2017 15:55:41 +0000 (15:55 +0000)]
Add SIOCATMARK to allow pledge("inet") programs to call sockatmark(3).
from Matthias Pitzl; OK deraadt@

7 years agoRecognize break conditions and enter ddb if ddb.console is set.
kettenis [Tue, 11 Apr 2017 15:16:14 +0000 (15:16 +0000)]
Recognize break conditions and enter ddb if ddb.console is set.

ok visa@, deraadt@

7 years agoPartially revert previous mallocarray conversions that contain
dhill [Tue, 11 Apr 2017 14:43:49 +0000 (14:43 +0000)]
Partially revert previous mallocarray conversions that contain
constants.

The consensus is that if both operands are constant, we don't need
mallocarray.  Reminded by tedu@

ok deraadt@

7 years agoShuffle route/interface changing functions together into kroute.c. Try to
krw [Tue, 11 Apr 2017 13:59:27 +0000 (13:59 +0000)]
Shuffle route/interface changing functions together into kroute.c. Try to
group related functions in kroute.c together and comment them a bit.

No intentional functional change.

7 years agoRevert ssl_asn1.c r1.50 - CBB and freezero(3) do not play nicely together.
jsing [Tue, 11 Apr 2017 13:14:08 +0000 (13:14 +0000)]
Revert ssl_asn1.c r1.50 - CBB and freezero(3) do not play nicely together.
Back this out while we investigate and implement a solution.

Found the hard way by sthen@

7 years agodocument more thoroughly the special status of modules gnu, imake, perl5
espie [Tue, 11 Apr 2017 11:01:28 +0000 (11:01 +0000)]
document more thoroughly the special status of modules gnu, imake, perl5
(for historical reasons)

okay aja@

7 years agoFold priv_write_file() into its only remaining user
krw [Tue, 11 Apr 2017 10:40:14 +0000 (10:40 +0000)]
Fold priv_write_file() into its only remaining user
priv_write_resolv_conf() and move the latter into kroute.c
with all its priv_ friends.

No intentional functional change.

7 years agoUse freezero(3) for the imsg framework in imsg_free(3) and ibuf_free(3).
reyk [Tue, 11 Apr 2017 09:57:19 +0000 (09:57 +0000)]
Use freezero(3) for the imsg framework in imsg_free(3) and ibuf_free(3).

In our privsep model, imsg is often used to transport sensitive
information between processes.  But a process might free an imsg, and
reuse the memory for a different thing.  iked uses some
explicit_bzero() to clean imsg-buffer but doing it in the library with
the freezero() is less error-prone and also benefits other daemons.

OK deraadt@ jsing@ claudio@

7 years agoRevise 'struct fpreg' and dump floating-point register in core dumps. Also
kettenis [Tue, 11 Apr 2017 06:52:13 +0000 (06:52 +0000)]
Revise 'struct fpreg' and dump floating-point register in core dumps.  Also
reset the floating-point register state upon exec.

ok guenther@

7 years agoRework -L logic to use the idiom used in handling the leases file.
krw [Mon, 10 Apr 2017 21:47:44 +0000 (21:47 +0000)]
Rework -L logic to use the idiom used in handling the leases file.
i.e. open FILE during program set up and use the FILE created for
the rest of the program lifetime after dropping privilege and
pledge()'ing. No need for passing messages to the priv process.

Tweak lease file handling a bit in passing.

Monitoring the -L file with external programs like sysutils/entr
still works.

Looks good to sthen@.

7 years agonew X25519(3) manual page;
schwarze [Mon, 10 Apr 2017 17:45:06 +0000 (17:45 +0000)]
new X25519(3) manual page;
from Dr. Stephen Henson <steve@openssl.org>, OpenSSL commit d218f3c3

7 years agoUse freezero() for the internal opaque structures, instead of the current
jsing [Mon, 10 Apr 2017 17:27:33 +0000 (17:27 +0000)]
Use freezero() for the internal opaque structures, instead of the current
explicit_bzero()/free(). Less code and potentially less overhead.

7 years agoUse freezero() for X25519 keys - same result with more readable code.
jsing [Mon, 10 Apr 2017 17:25:22 +0000 (17:25 +0000)]
Use freezero() for X25519 keys - same result with more readable code.

7 years agodocument three additional functions;
schwarze [Mon, 10 Apr 2017 17:14:44 +0000 (17:14 +0000)]
document three additional functions;
from Emilia Kasper <emilia at openssl dot org>, OpenSSL commit 4ac139b4

7 years agoRework and significantly extend TLS name verification tests to match
jsing [Mon, 10 Apr 2017 17:12:30 +0000 (17:12 +0000)]
Rework and significantly extend TLS name verification tests to match
changes in libtls.

7 years agoRework name verification code so that a match is indicated via an argument,
jsing [Mon, 10 Apr 2017 17:11:13 +0000 (17:11 +0000)]
Rework name verification code so that a match is indicated via an argument,
rather than return codes. More strictly follow RFC 6125, in particular only
check the CN if there are no SAN identifiers present in the certificate
(per section 6.4.4).

Previous behaviour questioned by Daniel Stenberg <daniel at haxx dot se>.

ok beck@ jca@

7 years agosync
deraadt [Mon, 10 Apr 2017 17:01:06 +0000 (17:01 +0000)]
sync

7 years agofreezero() the key block; simpler code and less of it.
jsing [Mon, 10 Apr 2017 16:48:43 +0000 (16:48 +0000)]
freezero() the key block; simpler code and less of it.

7 years agoUse freezero() for i2d_SSL_SESSION() - one line of code instead of three.
jsing [Mon, 10 Apr 2017 16:47:08 +0000 (16:47 +0000)]
Use freezero() for i2d_SSL_SESSION() - one line of code instead of three.
In this case the memory allocated can also be significant, in which case
freezero() will have less overhead than explicit_bzero() (munmap instead
of touching all of the memory to write zeros).

7 years agoFix tabs in example code.
jca [Mon, 10 Apr 2017 16:20:31 +0000 (16:20 +0000)]
Fix tabs in example code.

7 years agofix some .Xr errors that jmc@ found with mdoclint(1)
schwarze [Mon, 10 Apr 2017 16:11:50 +0000 (16:11 +0000)]
fix some .Xr errors that jmc@ found with mdoclint(1)

7 years agonew manual page SSL_get_server_tmp_key(3)
schwarze [Mon, 10 Apr 2017 15:54:46 +0000 (15:54 +0000)]
new manual page SSL_get_server_tmp_key(3)
from Matt Caswell <matt@openssl.org>, OpenSSL commit 508fafd8

7 years agoAdditional SSL_SESSION documentation
schwarze [Mon, 10 Apr 2017 15:37:55 +0000 (15:37 +0000)]
Additional SSL_SESSION documentation
from Matt Caswell <matt at openssl dot org>, OpenSSL commit b31db505.
Improve crosslinking while here.

7 years agoslaacdctl -> slaacctl;
jmc [Mon, 10 Apr 2017 14:46:13 +0000 (14:46 +0000)]
slaacdctl -> slaacctl;

7 years agoUse __ASSEMBLER__ instead of __LANGUAGE_ASSEMBLY.
visa [Mon, 10 Apr 2017 14:35:30 +0000 (14:35 +0000)]
Use __ASSEMBLER__ instead of __LANGUAGE_ASSEMBLY.
The latter is not defined by clang.

OK guenther@, kettenis@

7 years agoFound another len += snprintf...
deraadt [Mon, 10 Apr 2017 14:32:47 +0000 (14:32 +0000)]
Found another len += snprintf...
ok mikeb

7 years agosync
deraadt [Mon, 10 Apr 2017 14:22:03 +0000 (14:22 +0000)]
sync

7 years agofor pure *_ctrl() wrapper macros, move the reference from ssl(3)
schwarze [Mon, 10 Apr 2017 14:00:51 +0000 (14:00 +0000)]
for pure *_ctrl() wrapper macros, move the reference from ssl(3)
to SSL_CTX_ctrl(3) to make ssl(3) slightly more palatable

7 years agoClean up disabled declaration in the text struct.
fcambus [Mon, 10 Apr 2017 13:56:16 +0000 (13:56 +0000)]
Clean up disabled declaration in the text struct.

OK deraadt@

7 years agosync
jsg [Mon, 10 Apr 2017 13:40:36 +0000 (13:40 +0000)]
sync

7 years agoGenerate and install arm_neon.h on arm and arm64.
kettenis [Mon, 10 Apr 2017 13:36:04 +0000 (13:36 +0000)]
Generate and install arm_neon.h on arm and arm64.

ok jsg@

7 years agoThe canonical name for ctl programs is without 'd'.
florian [Mon, 10 Apr 2017 13:35:42 +0000 (13:35 +0000)]
The canonical name for ctl programs is without 'd'.
Pointed out by Brad.
OK deraadt@

7 years agonew manual page SSL_CTX_set_tlsext_servername_callback(3) for SNI;
schwarze [Mon, 10 Apr 2017 13:05:06 +0000 (13:05 +0000)]
new manual page SSL_CTX_set_tlsext_servername_callback(3) for SNI;
from <Jon dot Spillett at oracle dot com>
via OpenSSL commit 8c55c461

7 years agoCheck early if the mandatory carp "interface" was configured.
reyk [Mon, 10 Apr 2017 09:27:08 +0000 (09:27 +0000)]
Check early if the mandatory carp "interface" was configured.

This allows the new -n config check to work correctly.

OK jsg@ deraadt@

7 years agoRemove always false comparison: inosused type is ino_t, which is
fcambus [Mon, 10 Apr 2017 08:19:12 +0000 (08:19 +0000)]
Remove always false comparison: inosused type is ino_t, which is
unsigned.

While there, fix a whitespace issue.

OK deraadt@

7 years agotweak previous;
jmc [Mon, 10 Apr 2017 06:31:31 +0000 (06:31 +0000)]
tweak previous;

7 years agoConvert various client key exchange functions to freezero(3). The memory
jsing [Mon, 10 Apr 2017 06:09:32 +0000 (06:09 +0000)]
Convert various client key exchange functions to freezero(3). The memory
contents needs to be made inaccessible - this is simpler and less error
prone than the current "if not NULL, explicit_bzero(); free()" dance.

7 years agosync
deraadt [Mon, 10 Apr 2017 05:47:33 +0000 (05:47 +0000)]
sync

7 years agoIntroducing freezero(3) a version of free that guarantees the process
otto [Mon, 10 Apr 2017 05:45:02 +0000 (05:45 +0000)]
Introducing freezero(3) a version of free that guarantees the process
no longer has access to the content of a memmory object. It does
this by either clearing (if the object memory remains cached) or
by calling munmap(2). ok millert@, deraadt@, guenther@

7 years agomonir bump for freezero
otto [Mon, 10 Apr 2017 05:10:56 +0000 (05:10 +0000)]
monir bump for freezero

7 years agoAttempt to map msk(4) interrupt via MSI.
jsg [Mon, 10 Apr 2017 02:15:54 +0000 (02:15 +0000)]
Attempt to map msk(4) interrupt via MSI.

The device tree that ships with the overdrive 1000 has an interrupt-map
property that is known to be wrong.  Using MSI on msk makes the builtin
Ethernet on the overdrive 1000 work.

Tested on arm64 with
"Marvell Yukon 88E8059" rev 0x00, Yukon-2 Optima (0x1)

and i386 with
"Marvell Yukon 88E8072" rev 0x10, Yukon-2 Extreme rev. B0 (0x2)

Committing this early in the release cycle to try find cases where using
MSI doesn't work.

Based on part of an earlier patch from jmatthew@
ok jmatthew@ kettenis@

7 years agopasto; from <Jon dot Spillett at oracle dot com> via OpenSSL commit 3aaa1bd0
schwarze [Mon, 10 Apr 2017 01:46:37 +0000 (01:46 +0000)]
pasto; from <Jon dot Spillett at oracle dot com> via OpenSSL commit 3aaa1bd0

7 years agotypo fix; from <Jon dot Spillett at oracle dot com>
schwarze [Mon, 10 Apr 2017 01:26:54 +0000 (01:26 +0000)]
typo fix; from <Jon dot Spillett at oracle dot com>
via OpenSSL commit 7bd27895

7 years agoAdd a few missing quad-precision support functions on arm64 and reorder the
kettenis [Sun, 9 Apr 2017 21:47:05 +0000 (21:47 +0000)]
Add a few missing quad-precision support functions on arm64 and reorder the
list to match what's in CMakeLists.txt.

ok sthen@

7 years agoSync symbol lists for trap/interrupt frame detection with what ddb(4) uses
guenther [Sun, 9 Apr 2017 21:32:42 +0000 (21:32 +0000)]
Sync symbol lists for trap/interrupt frame detection with what ddb(4) uses

ok deraadt@

7 years agoSeven casts, a couple of tweaks and CFLAGS+=-Wsign-compare for the
krw [Sun, 9 Apr 2017 20:44:13 +0000 (20:44 +0000)]
Seven casts, a couple of tweaks and CFLAGS+=-Wsign-compare for the
win.

No intentional functional change.

7 years agomalloc -> mallocarray; a typo
deraadt [Sun, 9 Apr 2017 19:59:43 +0000 (19:59 +0000)]
malloc -> mallocarray; a typo

7 years agoConvert some malloc(9) to mallocarray(9)
dhill [Sun, 9 Apr 2017 18:16:00 +0000 (18:16 +0000)]
Convert some malloc(9) to mallocarray(9)

ok deraadt@

7 years agoConvert a malloc(9) to mallocarray(9)
dhill [Sun, 9 Apr 2017 18:15:32 +0000 (18:15 +0000)]
Convert a malloc(9) to mallocarray(9)

ok deraadt@

7 years agoConvert a malloc(9) to mallocarray(9)
dhill [Sun, 9 Apr 2017 18:15:09 +0000 (18:15 +0000)]
Convert a malloc(9) to mallocarray(9)

ok deraadt@

7 years agoConvert a malloc(9) to mallocarray(9)
dhill [Sun, 9 Apr 2017 18:14:39 +0000 (18:14 +0000)]
Convert a malloc(9) to mallocarray(9)

ok deraadt@

7 years agoConvert some malloc(9) to mallocarray(9)
dhill [Sun, 9 Apr 2017 18:09:41 +0000 (18:09 +0000)]
Convert some malloc(9) to mallocarray(9)

ok deraadt@

7 years agoConvert some malloc(9) to mallocarray(9)
dhill [Sun, 9 Apr 2017 18:07:19 +0000 (18:07 +0000)]
Convert some malloc(9) to mallocarray(9)

ok deraadt@

7 years agoConvert some malloc(9) to mallocarray(9)
dhill [Sun, 9 Apr 2017 18:05:17 +0000 (18:05 +0000)]
Convert some malloc(9) to mallocarray(9)

ok deraadt@

7 years agoUse mallocarray to allocate multicast group memberships.
dhill [Sun, 9 Apr 2017 17:57:58 +0000 (17:57 +0000)]
Use mallocarray to allocate multicast group memberships.

ok deraadt@

7 years agoCorrect wakeup() dance in sensor_task_work()
deraadt [Sun, 9 Apr 2017 15:47:18 +0000 (15:47 +0000)]
Correct wakeup() dance in sensor_task_work()
Problem noticed by krw

7 years agoSimplify/clean up BUF_MEM_grow_clean().
jsing [Sun, 9 Apr 2017 15:06:20 +0000 (15:06 +0000)]
Simplify/clean up BUF_MEM_grow_clean().

ok beck@

7 years agoWith recallocarray() BUF_MEM_grow() is essentially the same as
jsing [Sun, 9 Apr 2017 15:03:54 +0000 (15:03 +0000)]
With recallocarray() BUF_MEM_grow() is essentially the same as
BUF_MEM_grow_clean() (the only difference is clearing on internal down
sizing), so make it a wrapper.

ok beck@ deraadt@

7 years agoExplicitly test for NULL.
jsing [Sun, 9 Apr 2017 14:33:21 +0000 (14:33 +0000)]
Explicitly test for NULL.

ok beck@

7 years agoImprove unknown protocol version handling.
jsing [Sun, 9 Apr 2017 14:31:44 +0000 (14:31 +0000)]
Improve unknown protocol version handling.

7 years agoRemove unused #define's and struct.
natano [Sun, 9 Apr 2017 09:58:53 +0000 (09:58 +0000)]
Remove unused #define's and struct.

7 years agoimage/svg+xml is a default inbuilt media type.
florian [Sun, 9 Apr 2017 09:13:28 +0000 (09:13 +0000)]
image/svg+xml is a default inbuilt media type.
Pointed out by Anton Lindqvist (anton.lindqvist AT gmail), thanks!

7 years agoFix multiple cases of reading past the end of a buffer in the sasyncd(8)
jsg [Sun, 9 Apr 2017 02:40:24 +0000 (02:40 +0000)]
Fix multiple cases of reading past the end of a buffer in the sasyncd(8)
config parser found with afl.

feedback and ok millert@ ok deraadt@

7 years agosnprintf() format string should be literal
gsoares [Sat, 8 Apr 2017 22:59:09 +0000 (22:59 +0000)]
snprintf() format string should be literal
avoid compiler silly warnings

sure deraadt@

7 years agoformat string is better be literal
gsoares [Sat, 8 Apr 2017 22:50:41 +0000 (22:50 +0000)]
format string is better be literal
OK deraadt

7 years agoFor legacy interrupt use the tag of the topmost bridge to establish the
kettenis [Sat, 8 Apr 2017 22:38:17 +0000 (22:38 +0000)]
For legacy interrupt use the tag of the topmost bridge to establish the
interrupt.  We already correctly swizzle the pin.

ok patrick@

7 years agoBring over the changes I made to the armv7 version of this driver such that
kettenis [Sat, 8 Apr 2017 22:31:33 +0000 (22:31 +0000)]
Bring over the changes I made to the armv7 version of this driver such that
interrupts are correctly routed to the boot cpu if that isn't the one
connected to CPU interface zero on the interrupt controller.

ok patrick@

7 years agore-enable POOL_DEBUG after the release; ok deraadt@
naddy [Sat, 8 Apr 2017 20:53:54 +0000 (20:53 +0000)]
re-enable POOL_DEBUG after the release; ok deraadt@

7 years agouse .Em for emphasis, not .Pa
schwarze [Sat, 8 Apr 2017 20:36:50 +0000 (20:36 +0000)]
use .Em for emphasis, not .Pa

7 years agoReduce the overburden of signed vs unsigned comparisons by sprinkling
krw [Sat, 8 Apr 2017 20:16:04 +0000 (20:16 +0000)]
Reduce the overburden of signed vs unsigned comparisons by sprinkling
'int' -> 'unsigned int' (and visa versa) where obvious.

Steal a couple of 'unsigned' -> u_int32_t from reyk@'s dhcrelay
tweaks.

No intentional functional change.

7 years agochange a log message from "warn" to "debug" level, as the condition it is
mlarkin [Sat, 8 Apr 2017 19:08:18 +0000 (19:08 +0000)]
change a log message from "warn" to "debug" level, as the condition it is
reporting is not actually a warning.

7 years agoimplement nonspecific EOI mode for the legacy PIC
mlarkin [Sat, 8 Apr 2017 19:06:29 +0000 (19:06 +0000)]
implement nonspecific EOI mode for the legacy PIC

ok deraadt

7 years agoimplement channels 1 and 2 of the legacy PIT.
mlarkin [Sat, 8 Apr 2017 19:06:04 +0000 (19:06 +0000)]
implement channels 1 and 2 of the legacy PIT.

ok otto, deraadt

7 years agoReplace another snprintf() dance with easier to read code using
krw [Sat, 8 Apr 2017 18:54:52 +0000 (18:54 +0000)]
Replace another snprintf() dance with easier to read code using
strlcat(). Shorter, clearer, fewer signed vs unsigned questions.

Use an 8K static buffer for pretty_print_classless() and use it
rather scribbling intermediate values into the final destination.

No intentional functional change.

7 years agoReplace a mess of snprintf() dances with easier to read code using
krw [Sat, 8 Apr 2017 17:00:10 +0000 (17:00 +0000)]
Replace a mess of snprintf() dances with easier to read code using
strlcat(). Shorter, clearer, fewer signed vs unsigned questions.

Shrink static buffer for the string version of an option value from
32K to 8K. Since the string version of the entire lease is constructed
in a 8K buffer, bigger option values are pointless.

Use 8K of the saved space for a static buffer for pretty_print_string()
and use it rather scribbling intermediate values into the final
destination.

No intentional functional change.

7 years agoDocument the devel/meson MODULE.
ajacoutot [Sat, 8 Apr 2017 13:29:37 +0000 (13:29 +0000)]
Document the devel/meson MODULE.

7 years agoMake network ports work on Shasta.
visa [Sat, 8 Apr 2017 10:53:48 +0000 (10:53 +0000)]
Make network ports work on Shasta.

7 years ago- localize the if, file and stat variables which also ensures that
rpe [Sat, 8 Apr 2017 08:33:05 +0000 (08:33 +0000)]
- localize the if, file and stat variables which also ensures that
  variables are not named like commands.
- change test from [] to [[]]

OK tb@ halex@

7 years agoSensors are run as callbacks inside tasks. During suspend a sensor
deraadt [Sat, 8 Apr 2017 04:06:01 +0000 (04:06 +0000)]
Sensors are run as callbacks inside tasks.  During suspend a sensor
could be running inside a driver that will be force-detached, or due
to tsleep end up disrupting the softstate/hardstate contract.  At
suspend time, quisce all these callbacks by waiting for completion.
This issue has never been observed for real, but may be implicated in
suspend/resume failures.
ok kettenis guenther mlarkin

7 years agoUse ADDR64 opcodes to specify 64bit DMA addresses for all buffers. This
jmatthew [Sat, 8 Apr 2017 03:36:50 +0000 (03:36 +0000)]
Use ADDR64 opcodes to specify 64bit DMA addresses for all buffers.  This
consumes two ring entries per segment, halving the effective size of the
rings, but keeps things simple.  This is required for the onboard nic
on the Overdrive 1000 to work.

ok kettenis@, tested on i386 by jsg@

7 years agoRemove some #if 0 code that dates back to r1.1
mlarkin [Sat, 8 Apr 2017 03:29:13 +0000 (03:29 +0000)]
Remove some #if 0 code that dates back to r1.1

Pointed out by Michael W. Bombardieri