openbsd
3 years agoFix indenting
job [Wed, 1 Sep 2021 16:11:30 +0000 (16:11 +0000)]
Fix indenting

Feedback from deraadt@

3 years agoUse ttopen in tty drivers open functions as ttysleep string, as the others do.
jan [Wed, 1 Sep 2021 16:10:39 +0000 (16:10 +0000)]
Use ttopen in tty drivers open functions as ttysleep string, as the others do.

ok patrick@

3 years agoSimplify code by replacing strtol() with strtonum()
job [Wed, 1 Sep 2021 16:09:54 +0000 (16:09 +0000)]
Simplify code by replacing strtol() with strtonum()

Feedback from deraadt@

3 years agopledge() timeout
job [Wed, 1 Sep 2021 16:04:40 +0000 (16:04 +0000)]
pledge() timeout

Feedback from deraadt@

3 years agoRemove sysexits.h reference and improve usage string.
job [Wed, 1 Sep 2021 16:00:48 +0000 (16:00 +0000)]
Remove sysexits.h reference and improve usage string.

Feedback from deraadt@

3 years agoinet_ntop(3) needs sys/socket.h for AF_INET / AF_INET6 so add the header
claudio [Wed, 1 Sep 2021 15:59:22 +0000 (15:59 +0000)]
inet_ntop(3) needs sys/socket.h for AF_INET / AF_INET6 so add the header
to the list. While here remove some of the headers from inet_net_ntop(3)
for balance.

3 years agoA couple commands don't need sys/param.h, but they do need sys/signal.h
deraadt [Wed, 1 Sep 2021 15:54:40 +0000 (15:54 +0000)]
A couple commands don't need sys/param.h, but they do need sys/signal.h

3 years agoneither ktrace(2) or utrace(2) require a caller to pull sys/param.h
deraadt [Wed, 1 Sep 2021 15:51:45 +0000 (15:51 +0000)]
neither ktrace(2) or utrace(2) require a caller to pull sys/param.h

3 years agoImport timeout(1) from NetBSD
job [Wed, 1 Sep 2021 15:50:33 +0000 (15:50 +0000)]
Import timeout(1) from NetBSD

The timeout(1) utility can be used to run commands with a time limit.

OK deraadt@ beck@

3 years agoAdd client side support for DNS configuration. Use RTM_PROPOSAL_STATIC
tobhe [Wed, 1 Sep 2021 15:30:06 +0000 (15:30 +0000)]
Add client side support for DNS configuration. Use RTM_PROPOSAL_STATIC
route messages to propose the name server to resolvd(8).
For now, iked will only propose a single name server from the first
established connection.

Automatic name server configuration is enabled by default for policies using
the 'iface' option.

discussed with deraadt@
ok for the DNS parts florian@
ok for the rest patrick@

3 years agoLet rpki-client(8) inform bgpd(8) when RPKI VRPs will expire.
job [Wed, 1 Sep 2021 15:21:10 +0000 (15:21 +0000)]
Let rpki-client(8) inform bgpd(8) when RPKI VRPs will expire.

This will help prevent machines loading outdated roa-sets.

OK claudio@

3 years agoremove sys/param.h use (few small repairs)
deraadt [Wed, 1 Sep 2021 15:19:00 +0000 (15:19 +0000)]
remove sys/param.h use (few small repairs)

3 years agoClarify maxlen is optional in roa-set
job [Wed, 1 Sep 2021 15:06:47 +0000 (15:06 +0000)]
Clarify maxlen is optional in roa-set

OK claudio@

3 years agoAs a first step towards safe signal handling, improve the h_int()
schwarze [Wed, 1 Sep 2021 14:28:15 +0000 (14:28 +0000)]
As a first step towards safe signal handling, improve the h_int()
and h_winch() signal handlers to make one single store to a
sig_atomic_t variable.  Note that the h_hup() and h_term() signal
handlers are still unsafe after this commit because they also set
the "killersig" (how fitting!) field in a global struct.

Despite storing information in static global variables rather than
in structs passed around as arguments, this patch does not cause a
change in behaviour because there is always exactly one GS object,
initialized using gs_init() called from the top of main(), and
screen_init() stores a pointer to this one and only GS object in
the .gp member of each and every SCR object.  Talk about useless
abstraction...

Problem pointed out by deraadt@.
Patch from Tim <trondd at kagu hyphen tsuchi dot com> on tech@.
OK deraadt@.

3 years agoPrevent lock ordering issue by raising ipl level of vcpu_pool to IPL_MPFLOOR.
mpi [Wed, 1 Sep 2021 14:03:24 +0000 (14:03 +0000)]
Prevent lock ordering issue by raising ipl level of vcpu_pool to IPL_MPFLOOR.

Reported-by: syzbot+c8905496cd61610f77e2@syzkaller.appspotmail.com
ok mlarkin@

3 years agocomment out the detailed description of SSL_get_servername(3),
schwarze [Wed, 1 Sep 2021 13:56:03 +0000 (13:56 +0000)]
comment out the detailed description of SSL_get_servername(3),
leaving only the basic description in the RETURN VALUES section;
tb@ pointed out LibreSSL does not currently provide all those guarantees,
and he also OK'ed this diff

3 years agoAdd lfence after ret in retpoline thunk.
mortimer [Wed, 1 Sep 2021 13:37:14 +0000 (13:37 +0000)]
Add lfence after ret in retpoline thunk.

Recommended by AMD white paper Software Techniques for Managing
Speculation on AMD Processors (9.17.20) mitigation V2-1.

Pointed out by bluhm@. ok bluhm@ kettenis@

3 years agoRergression for printing a @map after calling clear().
mpi [Wed, 1 Sep 2021 13:22:36 +0000 (13:22 +0000)]
Rergression for printing a @map after calling clear().

Adapted from a test case generated by AFL++.

ok jasper@

3 years agoHandle the case where map/hist can be read after calling clear().
mpi [Wed, 1 Sep 2021 13:21:24 +0000 (13:21 +0000)]
Handle the case where map/hist can be read after calling clear().

Fix a NULL-derference found by jasper@ with AFL++ (port coming soon!).

ok jasper@

3 years agoImplement roa-set data expiry. Every prefix in a roa-set can specify an
claudio [Wed, 1 Sep 2021 12:39:52 +0000 (12:39 +0000)]
Implement roa-set data expiry. Every prefix in a roa-set can specify an
optional expires timestamp. The rtr process is walking the roa-set every
5min and removes every prefix that is expired.
With this stale RPKI data will slowly disapear and not linger around.
OK job@

3 years agoRPKI only cares about *.{cer,crl,gbr,mft,roa} files. Use rsync --include
claudio [Wed, 1 Sep 2021 12:26:26 +0000 (12:26 +0000)]
RPKI only cares about *.{cer,crl,gbr,mft,roa} files. Use rsync --include
and --exclude to only fetch those files from the CA repositories.
OK job@

3 years agoremove unused functions and cleanup vmd.h
dv [Wed, 1 Sep 2021 11:08:21 +0000 (11:08 +0000)]
remove unused functions and cleanup vmd.h

Discussed with mlarkin@. These functions were implemented but never
used. While in vmd.h, fix the order to match current vmd(8) reality.

3 years agoAdd support for the more rare volume usage which differs compared to the
anton [Wed, 1 Sep 2021 10:41:39 +0000 (10:41 +0000)]
Add support for the more rare volume usage which differs compared to the
more common volume increment/decrement usages in which each volume
change direction is represented using a distinct usage. The volume usage
instead uses bits of the interrupt buffer to represent the wanted
volume. The same bits should be within the bounds given by the logical
min/max associated with the HID item. However, the volume is not
interpreted as an absolute value but rather just looking at the sign bit
in order to determine the volume change direction.

I couldn't find any documentation of this usage and the implementation is
therefore solely based on analysing actual data from Richard Toohey's
<richardjtoohey at gmail dot com> Dell keyboard.

3 years agoRename ucc_bits_to_usage() to ucc_bits_to_int() as it's about to be used
anton [Wed, 1 Sep 2021 10:40:19 +0000 (10:40 +0000)]
Rename ucc_bits_to_usage() to ucc_bits_to_int() as it's about to be used
in more than one context.

3 years agoOlder AMD CPUs that do not support IBRS need an lfence after ret
bluhm [Wed, 1 Sep 2021 09:50:21 +0000 (09:50 +0000)]
Older AMD CPUs that do not support IBRS need an lfence after ret
to stop speculation.  This seems to be necessary when the branch
predictor hits the ret for the first time.  In their white paper
to mitigate speculation attacks, AMD's retpoline example has an
explicit lfence.  Adjust our retpoline assembly macro in the kernel.
OK guenther@ mortimer@ deraadt@

3 years agoRemove from0 support. openrsync will not implement all bad ideas that
claudio [Wed, 1 Sep 2021 09:48:08 +0000 (09:48 +0000)]
Remove from0 support. openrsync will not implement all bad ideas that
were added to rsync. from0 is one of those and really not needed.
OK job@

3 years agoRemove assignment of value that is never read.
beck [Wed, 1 Sep 2021 09:42:28 +0000 (09:42 +0000)]
Remove assignment of value that is never read.

ok tb@

3 years agoFix bad logic I introduced before commit.
claudio [Wed, 1 Sep 2021 09:39:14 +0000 (09:39 +0000)]
Fix bad logic I introduced before commit.
Found by job@

3 years agollvm: Use Component in OpenBSD::getCompilerRT to find libraries
gnezdo [Wed, 1 Sep 2021 09:34:53 +0000 (09:34 +0000)]
llvm: Use Component in OpenBSD::getCompilerRT to find libraries

Clang uses runtime libraries for some advanced features like
sanitizers. Different systems have different preferences about file
placement. OpenBSD with this change would use this name for ASan:
/usr/lib/clang/11.1.0/lib/libclang_rt.asan.a

So far, no libraries are shipped, only their eventual location is chosen.

Discussed with deraadt@ and kettenis@, OK mortimer@

3 years agoRemove dead poweroff functions, as they not appear in other
jan [Wed, 1 Sep 2021 09:29:31 +0000 (09:29 +0000)]
Remove dead poweroff functions, as they not appear in other
serial drivers.

ok patrick@

3 years agoremove manual fiddling with MALLOC_OPTIONS from libc regress tests
jasper [Wed, 1 Sep 2021 09:26:32 +0000 (09:26 +0000)]
remove manual fiddling with MALLOC_OPTIONS from libc regress tests

these options should be set globally (sysctl) when running regress as opposed to having
individual tests set it, barring a few specific exceptions.

ok bluhm@

3 years agoDocument the http_proxy environment variable
claudio [Wed, 1 Sep 2021 08:17:37 +0000 (08:17 +0000)]
Document the http_proxy environment variable

3 years agoquietly attempt mounting of /var/log early, in case someone creates such
deraadt [Wed, 1 Sep 2021 08:15:53 +0000 (08:15 +0000)]
quietly attempt mounting of /var/log early, in case someone creates such
a partition to avoid /var overflow issues
ok benno beck

3 years agoAdd a regression test to verify that we call the callback in the same
beck [Wed, 1 Sep 2021 08:12:15 +0000 (08:12 +0000)]
Add a regression test to verify that we call the callback in the same
order on success for both the legacy and the new verifier, This avoids
problems as seen in perl's regression tests for some of the crazy things
net:ssleay does.

This is currently marked as expected to fail, it will be expected to
succeed after a forthcoming commit from me.

3 years agoAdd http_proxy support to rpki-client's http handler.
claudio [Wed, 1 Sep 2021 08:09:41 +0000 (08:09 +0000)]
Add http_proxy support to rpki-client's http handler.
OK tb@

3 years agoImitate how free(3) behaves and make map_clear() works on NULL map.
mpi [Wed, 1 Sep 2021 08:06:49 +0000 (08:06 +0000)]
Imitate how free(3) behaves and make map_clear() works on NULL map.

3 years agoAlways print non-empty map & hist on exit even if there's an END rule.
mpi [Wed, 1 Sep 2021 08:01:09 +0000 (08:01 +0000)]
Always print non-empty map & hist on exit even if there's an END rule.

Match bpftrace behavior.

3 years agoSupport for insert pid/tid/cpu builtins in map/hist.
mpi [Wed, 1 Sep 2021 07:35:21 +0000 (07:35 +0000)]
Support for insert pid/tid/cpu builtins in map/hist.

3 years agoFix ssh-rsa fallback for old PuTTY interop tests.
dtucker [Wed, 1 Sep 2021 03:16:06 +0000 (03:16 +0000)]
Fix ssh-rsa fallback for old PuTTY interop tests.

3 years agoAdd a function to skip remaining tests. Many tests skip tests for
dtucker [Wed, 1 Sep 2021 00:50:27 +0000 (00:50 +0000)]
Add a function to skip remaining tests.  Many tests skip tests for
various reasons but not in a consistent way and don't always clean
up, so add that and switch the tests that do that over.

3 years agoHonour netinet6 when generating symlinks to tags files
kn [Tue, 31 Aug 2021 23:53:42 +0000 (23:53 +0000)]
Honour netinet6 when generating symlinks to tags files

"make tags" needs "make links" to have tags available in subdirectories and
netinet6 has been missing all the time.

OK tb

3 years agoMake include bsd.prog.mk is supporting PROGS for a while. Allow
bluhm [Tue, 31 Aug 2021 23:33:05 +0000 (23:33 +0000)]
Make include bsd.prog.mk is supporting PROGS for a while.  Allow
multiple programs also in bsd.regress.mk for consistency.
OK anton@

3 years agoImplement suspend/resume for bwfm(4) with PCIe backend. We try to send the
patrick [Tue, 31 Aug 2021 23:05:11 +0000 (23:05 +0000)]
Implement suspend/resume for bwfm(4) with PCIe backend.  We try to send the
device into D3 and do a hot-resume if possible.  Otherwise we need to clean
up the resources to allow complete HW re-initialization to take place.

3 years agoregen
jmatthew [Tue, 31 Aug 2021 22:56:24 +0000 (22:56 +0000)]
regen

3 years agoAdd Aquantia USB ethernet devices
jmatthew [Tue, 31 Aug 2021 22:55:56 +0000 (22:55 +0000)]
Add Aquantia USB ethernet devices

from Brad originally

3 years agoClean up the list of chips upon detach and mark us uninitialized.
patrick [Tue, 31 Aug 2021 21:46:00 +0000 (21:46 +0000)]
Clean up the list of chips upon detach and mark us uninitialized.

3 years agoProperly deallocate some more structures upon detach, and make sure we're
patrick [Tue, 31 Aug 2021 21:13:24 +0000 (21:13 +0000)]
Properly deallocate some more structures upon detach, and make sure we're
not considered initialized anymore.

3 years agoInitialize some struct variables to make sure that upon reinit, caused by
patrick [Tue, 31 Aug 2021 21:02:09 +0000 (21:02 +0000)]
Initialize some struct variables to make sure that upon reinit, caused by
a suspend/resume cycle, the values are set to a sane default.

3 years agoInitialize ring read/write pointers to make sure that upon reinit, caused
patrick [Tue, 31 Aug 2021 20:58:51 +0000 (20:58 +0000)]
Initialize ring read/write pointers to make sure that upon reinit, caused
by a suspend/resume cycle, the pointers are set to a sane default.

3 years agoAdjust .Bl width
kn [Tue, 31 Aug 2021 20:28:45 +0000 (20:28 +0000)]
Adjust .Bl width

3 years agoSay autoconf not dhcp
kn [Tue, 31 Aug 2021 20:18:03 +0000 (20:18 +0000)]
Say autoconf not dhcp

Do not abuse "dhcp" to say "DHCP and SLAAC".
unwind.conf(5) does so but unwindctl(8) does not;  in fact, the latter
already has `status autoconf' to
    Show nameservers learned from dhclient(8), dhcpleased(8) or slaacd(8).

Adjust unwind's config manual and internal code accordingly;  still accept
the old keyword but do not document it.

hostname.if(5) already advises for `inet[6] autoconf' instead of `dhcp' and
other related daemons don't abuse the word "dhcp" like unwind does.

Feedback sthen
OK florian

3 years agoRemove some dead code that was missed in an earlier cleanup and
tb [Tue, 31 Aug 2021 20:14:40 +0000 (20:14 +0000)]
Remove some dead code that was missed in an earlier cleanup and
fix a stale comment.

Found by mortimer with clang 13's -Wunused-but-set-variable.

ok beck

3 years agoMake includes follow style(9).
florian [Tue, 31 Aug 2021 18:12:47 +0000 (18:12 +0000)]
Make includes follow style(9).

3 years agovmm(4): add ipi for vmclear, unlock kernel
dv [Tue, 31 Aug 2021 17:40:59 +0000 (17:40 +0000)]
vmm(4): add ipi for vmclear, unlock kernel

On Intel VMX hosts, when a guest migrates cpus, VMCS state needs
to be flushed to physical memory before being reloaded on the new
cpu. This diff adds a new ipi to allow a guest resuming on a new
cpu to signal to the old that it needs to vmclear.

To better surface the potential race conditions, unlock the kernel
after handling the ioctl to vmm and simplify the run loops for both
vmx and svm. This requires a new vcpu lock.

Tested by some on tech@. "go for it" @mlarkin

3 years agoOnly use the i8254 delay code if we are specifically using the i8254 as
patrick [Tue, 31 Aug 2021 15:53:36 +0000 (15:53 +0000)]
Only use the i8254 delay code if we are specifically using the i8254 as
delay func.  Otherwise simply delay for a second to calibrate the LAPIC.
Install the lapic delay func only if we were using the i8254 before as
delay func.

Discussed with the hackroom
ok kettenis@

3 years agoIdentify the paravirtual bus earlier, as we need to make sure that we have
patrick [Tue, 31 Aug 2021 15:52:59 +0000 (15:52 +0000)]
Identify the paravirtual bus earlier, as we need to make sure that we have
a working delay func ready before the first occurence of delay().  This is
necessary on Hyper-V Gen 2 VMs where we don't use the TSC.

Discussed with the hackroom
ok kettenis@

3 years agoWhen running on Hyper-V, make use of its timecounter as delay func in case
patrick [Tue, 31 Aug 2021 15:52:10 +0000 (15:52 +0000)]
When running on Hyper-V, make use of its timecounter as delay func in case
we're still using the i8254 for that.  On Hyper-V Gen 2 VMs there is no
i8254 we can trust, so we need some kind of fallback, especially if there
is no TSC either.

Discussed with the hackroom
ok kettenis@

3 years agoaplpinctrl(4)
kettenis [Tue, 31 Aug 2021 15:37:40 +0000 (15:37 +0000)]
aplpinctrl(4)

3 years agoSwap lock flags so that LK_EXCLUSIVE is first like in all other places.
claudio [Tue, 31 Aug 2021 15:31:28 +0000 (15:31 +0000)]
Swap lock flags so that LK_EXCLUSIVE is first like in all other places.

3 years agoDo pinctrl stuff.
kettenis [Tue, 31 Aug 2021 15:21:19 +0000 (15:21 +0000)]
Do pinctrl stuff.

ok patrick@

3 years agoAdd aplpinctrl(4), a driver for the Apple GPIO controller found on M1 SoCs.
kettenis [Tue, 31 Aug 2021 15:20:06 +0000 (15:20 +0000)]
Add aplpinctrl(4), a driver for the Apple GPIO controller found on M1 SoCs.

ok patrick@

3 years agomemset the pfds array in the poll loop and not only at the start.
claudio [Tue, 31 Aug 2021 15:18:53 +0000 (15:18 +0000)]
memset the pfds array in the poll loop and not only at the start.

3 years agoUse the TSC delay(9) backend earlier on machines where we can. Also use
kettenis [Tue, 31 Aug 2021 15:11:54 +0000 (15:11 +0000)]
Use the TSC delay(9) backend earlier on machines where we can.  Also use
the TSC for delays even if there is a skew between the TSCs of the cores
as this doesn't matter for delay(9).

Gets rid of te unreasonable clock speed reports on Intel Tiget Lake CPUs
where the i8254 behaves in weird ways.

ok patrick@, deraadt@, mlarkin@

3 years agoprinting the hibernate image size in MB is easier on the eyes
deraadt [Tue, 31 Aug 2021 14:45:25 +0000 (14:45 +0000)]
printing the hibernate image size in MB is easier on the eyes
ok mlarkin

3 years agoAdd "machine sysregs" command to DDB
mlarkin [Tue, 31 Aug 2021 14:37:49 +0000 (14:37 +0000)]
Add "machine sysregs" command to DDB

From Alex Wilson, Thanks!

3 years agoDefragment DTLS.
jsing [Tue, 31 Aug 2021 13:34:55 +0000 (13:34 +0000)]
Defragment DTLS.

In normal TLS, it is possible for record fragments to be sent that contain
one byte of alert or handshake message payload. In this case we have to
read and collate multiple message fragments before we can decide what to
do with the record.

However, in the case of DTLS, one record is effectively one packet and
while it is possible to send handshake messages across multiple
records/packets, the minimum payload is the DTLS handshake message header
(plus one byte of data if the handshake message has a payload) - without
this, there is insufficient information available to be able to reassemble
the handshake message. Likewise, splitting an alert across multiple DTLS
records simply does not work, as we have no way of knowing if we're
collating the same alert or two different alerts that we lost half of each
from (unfortunately, these details are not really specified in the DTLS
RFC).

This means that for DTLS we can expect to receive a full alert message
(a whole two bytes) or a handshake record with at least the handshake
message header (12 bytes). If we receive messages with less than these
lengths we discard them and carry on (which is what the DTLS code already
does).

Remove all of the pointless fragment handling code from DTLS, while also
fixing an issue where one case used rr->data instead of the handshake
fragment.

ok inoguchi@ tb@

3 years agoFix use of wrong pointer argument when freeing firmware paging info in iwx(4).
stsp [Tue, 31 Aug 2021 13:19:32 +0000 (13:19 +0000)]
Fix use of wrong pointer argument when freeing firmware paging info in iwx(4).

Found by mpi@ and gnezdo@
ok gnezdo@

3 years agoMake "relayctl reload" when agentx enabling is toggled in relayd.conf work
martijn [Tue, 31 Aug 2021 13:19:29 +0000 (13:19 +0000)]
Make "relayctl reload" when agentx enabling is toggled in relayd.conf work
consistently.

OK benno@

3 years agoRemove a nonsensical s->version == TLS1_VERSION from DTLS code.
jsing [Tue, 31 Aug 2021 13:14:43 +0000 (13:14 +0000)]
Remove a nonsensical s->version == TLS1_VERSION from DTLS code.

ok inoguchi@ tb@ (as part of a larger diff)

3 years ago'if' tests.
mpi [Tue, 31 Aug 2021 12:51:56 +0000 (12:51 +0000)]
'if' tests.

3 years agoBasic test, if (no else atm), support with a single statement.
mpi [Tue, 31 Aug 2021 12:51:24 +0000 (12:51 +0000)]
Basic test, if (no else atm), support with a single statement.

3 years agoUsing suser() instead of doing it manually.
jan [Tue, 31 Aug 2021 12:24:15 +0000 (12:24 +0000)]
Using suser() instead of doing it manually.

ok patrick@

3 years agoSupport storing syscall arguments in a map/hist.
mpi [Tue, 31 Aug 2021 11:30:21 +0000 (11:30 +0000)]
Support storing syscall arguments in a map/hist.

3 years agowhitespace
tb [Tue, 31 Aug 2021 11:19:19 +0000 (11:19 +0000)]
whitespace

3 years agoAdjust rde_decide test vectors to the fact that struct prefix got changed.
claudio [Tue, 31 Aug 2021 10:54:40 +0000 (10:54 +0000)]
Adjust rde_decide test vectors to the fact that struct prefix got changed.
Reminded by bluhm@ that bgpd regress tests failed

3 years agoenter uuid/
jasper [Tue, 31 Aug 2021 09:58:17 +0000 (09:58 +0000)]
enter uuid/

3 years agoadd initial tests for uuid_from_string, uuid_to_string, uuid_create_nil
jasper [Tue, 31 Aug 2021 09:57:27 +0000 (09:57 +0000)]
add initial tests for uuid_from_string, uuid_to_string, uuid_create_nil

prompted by the bug krw@ fixed yesterday in uuid_from_string()

3 years agoshorten some code
deraadt [Tue, 31 Aug 2021 09:56:12 +0000 (09:56 +0000)]
shorten some code

3 years agoSpacing. OK tb@
claudio [Tue, 31 Aug 2021 09:51:25 +0000 (09:51 +0000)]
Spacing. OK tb@

3 years agoTest for operator precedence
mpi [Tue, 31 Aug 2021 08:39:46 +0000 (08:39 +0000)]
Test for operator precedence

3 years agoRewrite grammar to implement operator precedence without using %right or %prec.
mpi [Tue, 31 Aug 2021 08:39:26 +0000 (08:39 +0000)]
Rewrite grammar to implement operator precedence without using %right or %prec.

Arithmetic operator should now behave as expeted and tests can now be written
without superfluous parenthesis, for example:

syscall:select:entry
/($1 == 0) || (pid == $1)/
{
}

Can now be written:

syscall:select:entry
/$1 == 0 || pid == $1/
{
}

While here improve filter debugging support.

3 years agoremove empty forward structs fro bge_ring_data as found with ctfconv.
jasper [Tue, 31 Aug 2021 08:06:56 +0000 (08:06 +0000)]
remove empty forward structs fro bge_ring_data as found with ctfconv.

tested by and ok jmatthew@

3 years agoSpecify path to PuTTY keys. Portable needs this and it makes no
dtucker [Tue, 31 Aug 2021 07:13:59 +0000 (07:13 +0000)]
Specify path to PuTTY keys.  Portable needs this and it makes no
difference on OpenBSD, so resync them.

3 years agoWhen running PuTTY interop tests and using a PuTTY version older than
dtucker [Tue, 31 Aug 2021 06:13:23 +0000 (06:13 +0000)]
When running PuTTY interop tests and using a PuTTY version older than
0.76, re-enable the ssh-rsa host key algorithm (the 256 and 512 variants
of RSA were added some time between 0.73 and 0.76).

3 years agoadd support for obtaining sense status and source slot of a media
robert [Tue, 31 Aug 2021 05:29:55 +0000 (05:29 +0000)]
add support for obtaining sense status and source slot of a media

this fixes a bug in bacula where the catalog was not properly kept
up-to-date if a tape was in a drive becuse its source slot was
unknown

based on code from FreeBSD; ok krw@

picker 0:  sense: <0x00/0x00> voltag: <:0> avoltag: <:0> source: <>
slot 0: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1168L1:0> avoltag: <:0> source: <slot 0>
slot 1: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1187L1:0> avoltag: <:0> source: <slot 1>
slot 2: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1184L1:0> avoltag: <:0> source: <slot 2>
slot 3: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1195L1:0> avoltag: <:0> source: <slot 3>
slot 4: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1037L1:0> avoltag: <:0> source: <slot 4>
slot 5: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1038L1:0> avoltag: <:0> source: <slot 5>
slot 6: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1166L1:0> avoltag: <:0> source: <slot 6>
slot 7: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1167L1:0> avoltag: <:0> source: <slot 7>
slot 8: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1180L1:0> avoltag: <:0> source: <slot 8>
slot 9: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1186L1:0> avoltag: <:0> source: <slot 9>
slot 10: <ACCESS> sense: <0x00/0x00> voltag: <:0> avoltag: <:0> source: <picker 0>
slot 11: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1182L1:0> avoltag: <:0> source: <slot 11>
slot 12: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1181L1:0> avoltag: <:0> source: <slot 12>
slot 13: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1196L1:0> avoltag: <:0> source: <slot 13>
slot 14: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1169L1:0> avoltag: <:0> source: <slot 14>
slot 15: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1197L1:0> avoltag: <:0> source: <slot 15>
slot 16: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1165L1:0> avoltag: <:0> source: <slot 16>
slot 17: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1199L1:0> avoltag: <:0> source: <slot 17>
slot 18: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1189L1:0> avoltag: <:0> source: <slot 18>
slot 19: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1185L1:0> avoltag: <:0> source: <slot 19>
slot 20: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1198L1:0> avoltag: <:0> source: <slot 20>
slot 21: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1039L1:0> avoltag: <:0> source: <slot 21>
slot 22: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1035L1:0> avoltag: <:0> source: <slot 22>
slot 23: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1188L1:0> avoltag: <:0> source: <slot 23>
drive 0: <ACCESS,FULL> sense: <0x00/0x00> voltag: <XX1183L1:0> avoltag: <:0> source: <slot 10>

3 years agoIn enumerating mode, calculate the bit offset using the HID input
anton [Tue, 31 Aug 2021 05:17:49 +0000 (05:17 +0000)]
In enumerating mode, calculate the bit offset using the HID input
location as the product of the corresponding Report Count and Report
Size can be greater than one.

Fixes Richard Toohey's <richardjtoohey at gmail dot com> Dell keyboard.

3 years agoProtect against missing bit to key symbols in ucc_bit_to_sym(). This can
anton [Tue, 31 Aug 2021 05:16:45 +0000 (05:16 +0000)]
Protect against missing bit to key symbols in ucc_bit_to_sym(). This can
only happen if ucc_hid_parse() has a bug, better play it safe.

3 years agosprinkle barriers and dmamem_syncs around the hibernate io path.
dlg [Tue, 31 Aug 2021 04:21:04 +0000 (04:21 +0000)]
sprinkle barriers and dmamem_syncs around the hibernate io path.

at the very least it stops the compiler omgoptimising away important
code.

tested by and ok deraadt@ jmatthew@

3 years agorevert change to use single rockchip U-Boot image in rev 1.13
jsg [Tue, 31 Aug 2021 01:54:12 +0000 (01:54 +0000)]
revert change to use single rockchip U-Boot image in rev 1.13
abieber@ reports it fails to boot on pinebook-pro-rk3399

3 years agoSpecify hostkeyalgorithms in sshd's default set for the SSHFP test,
dtucker [Tue, 31 Aug 2021 01:25:27 +0000 (01:25 +0000)]
Specify hostkeyalgorithms in sshd's default set for the SSHFP test,
from djm@.  Make the reason for when the test is skipped a bit clearer.

3 years agoMake uuid_from_string() reject a string of the correct length but having a
krw [Mon, 30 Aug 2021 20:41:33 +0000 (20:41 +0000)]
Make uuid_from_string() reject a string of the correct length but having a
non-hex digit in the last character.

Inspired by code in uuid_parse() from Ted Ts'o.

ok millert@

3 years agoDocument new include*/exclude* options in the man page
job [Mon, 30 Aug 2021 20:25:24 +0000 (20:25 +0000)]
Document new include*/exclude* options in the man page

3 years agoAdd include/exclude to usage()
job [Mon, 30 Aug 2021 20:25:01 +0000 (20:25 +0000)]
Add include/exclude to usage()

OK claudio@

3 years agoClean up and simplify info and msg callbacks.
jsing [Mon, 30 Aug 2021 19:25:43 +0000 (19:25 +0000)]
Clean up and simplify info and msg callbacks.

The info and msg callbacks result in duplication - both for code that
refers to the function pointers and for the call sites. Avoid this by
providing typedefs for the function pointers and pulling the calling
sequences into their own functions.

ok inoguchi@ tb@

3 years agoAccept dns proposals for the loopback addresses
kn [Mon, 30 Aug 2021 19:14:30 +0000 (19:14 +0000)]
Accept dns proposals for the loopback addresses

Don't reserve^Wignore them for unwind(8);  there are non-unwind use-cases
and so far resolvd(8) always seems to do the right thing when proposing
localhost while unwind is running.

OK benno

3 years agoReplace DTLS r_epoch with the read epoch from the TLSv1.2 record layer.
jsing [Mon, 30 Aug 2021 19:12:25 +0000 (19:12 +0000)]
Replace DTLS r_epoch with the read epoch from the TLSv1.2 record layer.

ok inoguchi@ tb@

3 years agoMove to an AEAD nonce allocated in the TLSv1.2 record layer.
jsing [Mon, 30 Aug 2021 19:00:49 +0000 (19:00 +0000)]
Move to an AEAD nonce allocated in the TLSv1.2 record layer.

There is little to gain by mallocing and freeing the AEAD nonce for each
record - move to an AEAD nonce allocated for the record layer, which
matches what we do for TLSv1.3.

ok inoguchi@ tb@

3 years agoFix max nameserver proposals limit
kn [Mon, 30 Aug 2021 18:49:19 +0000 (18:49 +0000)]
Fix max nameserver proposals limit

Count the total number of proposals and not five per address family each.
Don't print ignored addresses by default anymore and leave that to `-v'.

OK benno

3 years agoRemove magic offset from data structures. This makes it much easier to
kettenis [Mon, 30 Aug 2021 18:40:19 +0000 (18:40 +0000)]
Remove magic offset from data structures.  This makes it much easier to
compare the data structures with the Linux code which unfortunately is
the only documentation we have for the pin numbers used by ACPI.
While there make the data structures const.

ok jcs@

3 years agosync with OpenSSL 1.1.1, which is still under a free license;
schwarze [Mon, 30 Aug 2021 18:18:16 +0000 (18:18 +0000)]
sync with OpenSSL 1.1.1, which is still under a free license;
in particular, this includes new text by Matt Caswell
from OpenSSL commit 721eb8f6 Nov 28 12:03:00 2019 +0000
and corrects a wrong argument type that i introduced into the SYNOPSIS;
requested by tb@