openbsd
3 years agoAdd 't' to options in man page. ok jmc@ kn@
lum [Fri, 19 Feb 2021 19:59:36 +0000 (19:59 +0000)]
Add 't' to options in man page. ok jmc@ kn@

3 years agoAppend .html suffix to temporary files enabling browsers to recognise it
kn [Fri, 19 Feb 2021 19:49:49 +0000 (19:49 +0000)]
Append .html suffix to temporary files enabling browsers to recognise it

Occasionally one might read a manual page in a webbrowser, e.g.
"MANPAGER=firefox man -T html jq", however temporary files created for
pagers lack file extensions and most web browsers are unable to detect a
file's content without it.

Special case mandoc(1)'s HTML output format by appending the ".html" suffix
to file names such that browsers will actually render HTML as such instead
of showing it as plain text.

Input schwarze

3 years agoPut duplicated code calculating backoff interval and packet 'secs'
krw [Fri, 19 Feb 2021 13:46:59 +0000 (13:46 +0000)]
Put duplicated code calculating backoff interval and packet 'secs'
into new set_interval()/set_secs() functions. send_request() and
send_discover() become much easier to understand.

No intentional functional change.

3 years agoMissed poll -> ppoll in log_warn() verbiage.
krw [Fri, 19 Feb 2021 13:33:37 +0000 (13:33 +0000)]
Missed poll -> ppoll in log_warn() verbiage.

3 years agoConvert reallocarray + memset to recallocarray.
tb [Fri, 19 Feb 2021 12:18:23 +0000 (12:18 +0000)]
Convert reallocarray + memset to recallocarray.

ok claudio

3 years agoAdd the same ASCII check to the URI in TAL files as we do for URI in .cer files
claudio [Fri, 19 Feb 2021 10:23:50 +0000 (10:23 +0000)]
Add the same ASCII check to the URI in TAL files as we do for URI in .cer files
OK tb@

3 years agoCheck return value of chdir() to stop a silly warning with some
nicm [Fri, 19 Feb 2021 09:09:16 +0000 (09:09 +0000)]
Check return value of chdir() to stop a silly warning with some
compilers, GitHub issue 2573.

3 years agoMove the mkpath() call from the rsync path to the main process. This allows
claudio [Fri, 19 Feb 2021 08:14:49 +0000 (08:14 +0000)]
Move the mkpath() call from the rsync path to the main process. This allows
to drop cpath from the rsync proc pledge (down to "stdio proc exec").
This will also make work easier with the upcoming http fetcher.
OK tb@

3 years agoAdd an EXAMPLES section
solene [Fri, 19 Feb 2021 07:56:56 +0000 (07:56 +0000)]
Add an EXAMPLES section

rewording by jmc@
ok jmc@

3 years agowe dont need to wrap some short lines.
dlg [Fri, 19 Feb 2021 06:14:07 +0000 (06:14 +0000)]
we dont need to wrap some short lines.

3 years agocheck the state for PF_ROUTE when undeferring a packet, not the rule.
dlg [Fri, 19 Feb 2021 06:12:44 +0000 (06:12 +0000)]
check the state for PF_ROUTE when undeferring a packet, not the rule.

3 years agoSave one allocation by passing msg_nonce ownership instead of using
tobhe [Thu, 18 Feb 2021 22:00:31 +0000 (22:00 +0000)]
Save one allocation by passing msg_nonce ownership instead of using
ibuf_dup().

ok patrick@

3 years agoRemove redundant ibuf_release. msg_ke is always NULL because of the
tobhe [Thu, 18 Feb 2021 21:39:36 +0000 (21:39 +0000)]
Remove redundant ibuf_release. msg_ke is always NULL because of the
duplicate check above.

3 years agoPass ownership instead of duplicating ibuf msg_ke.
tobhe [Thu, 18 Feb 2021 21:30:52 +0000 (21:30 +0000)]
Pass ownership instead of duplicating ibuf msg_ke.

ok patrick@

3 years agoPull in fix for EVP_CipherUpdate() overflow from OpenSSL.
tb [Thu, 18 Feb 2021 19:12:29 +0000 (19:12 +0000)]
Pull in fix for EVP_CipherUpdate() overflow from OpenSSL.

ok inoguchi

commit 6a51b9e1d0cf0bf8515f7201b68fb0a3482b3dc1
Author: Matt Caswell <matt@openssl.org>
Date:   Tue Feb 2 17:17:23 2021 +0000

    Don't overflow the output length in EVP_CipherUpdate calls

    CVE-2021-23840

Reviewed-by: Paul Dale <pauli@openssl.org>
3 years agoMake kernel ld.script similar to octeon's on loongson and sgi.
visa [Thu, 18 Feb 2021 16:27:07 +0000 (16:27 +0000)]
Make kernel ld.script similar to octeon's on loongson and sgi.

3 years agoUse X509_get_ext_d2i() also for x509_get_aki() and x509_get_ski().
claudio [Thu, 18 Feb 2021 16:23:17 +0000 (16:23 +0000)]
Use X509_get_ext_d2i() also for x509_get_aki() and x509_get_ski().
Now x509_get_extensions() is no longer required to loop over all
extensions and the code becomes a lot simpler.
While there cleanup x509_get_crl(), as explained by tb@ X509_get_ext_d2i()
allocates memory so one needs to free the pointer at the end.
For x509_crl_get_aki() use X509_CRL_get_ext_d2i() and more or less
copy the rest over from x509_get_aki().
Warn if extensions are missing or present when not expected and also
check the the extensions are marked non-critical as required.
OK job@ tb@

3 years agoMention that U-Boot serial speed should be 115200.
visa [Thu, 18 Feb 2021 16:18:04 +0000 (16:18 +0000)]
Mention that U-Boot serial speed should be 115200.

Initial diff from Janne Johansson

3 years agoReduce len when moving past spaces in OSC 11 parameter.
nicm [Thu, 18 Feb 2021 13:30:24 +0000 (13:30 +0000)]
Reduce len when moving past spaces in OSC 11 parameter.

3 years agoRelease mbuf(9) chain with a simple m_freem(9) loop in sorflush().
mvs [Thu, 18 Feb 2021 11:40:19 +0000 (11:40 +0000)]
Release mbuf(9) chain with a simple m_freem(9) loop in sorflush().
Passing local copy of socket to sbrelease() is too complicated to just
free receive buffer. We don't allocate large object on the stack. Also
we don't pass unlocked socket to soassertlocked() within sbdrop(). This
was not triggered because we lock the whole layer with one lock.

Also sorflush() is now private to kern/uipc_socket.c, so it's definition
was made to be in accordance.

ok claudio@ mpi@

3 years agoAll the code for output handling was moved to output.c some time ago.
claudio [Thu, 18 Feb 2021 10:10:20 +0000 (10:10 +0000)]
All the code for output handling was moved to output.c some time ago.
Also move the license that came along with it to output.c.

3 years agoOnly pick up files matching alphanumeric and underscore characters under
ajacoutot [Thu, 18 Feb 2021 06:17:35 +0000 (06:17 +0000)]
Only pick up files matching alphanumeric and underscore characters under
/etc/rc.d. This prevents issues with editor backup files (foo~) or other bogus
files.

ok sthen@

3 years agoFix the hostkeys rotation extension documentation
djm [Thu, 18 Feb 2021 02:49:35 +0000 (02:49 +0000)]
Fix the hostkeys rotation extension documentation

The documentation was lacking the needed want-reply field in the initial
global request.

https://github.com/openssh/openssh-portable/pull/218 by dbussink

3 years agoadd rpki-rtr port 323; ok job
deraadt [Thu, 18 Feb 2021 02:30:29 +0000 (02:30 +0000)]
add rpki-rtr port 323; ok job

3 years agomake names in function prototypes match those in definition
djm [Thu, 18 Feb 2021 02:15:07 +0000 (02:15 +0000)]
make names in function prototypes match those in definition
from https://github.com/openssh/openssh-portable/pull/225
by ZenithalHourlyRate

3 years agounbreak SK_DEBUG builds
djm [Thu, 18 Feb 2021 02:13:58 +0000 (02:13 +0000)]
unbreak SK_DEBUG builds

from https://github.com/openssh/openssh-portable/pull/225 by
ZenithalHourlyRate

3 years agomark test-inlabel-wildcard-cert-no-CA-client as an expected failure
tb [Thu, 18 Feb 2021 00:34:14 +0000 (00:34 +0000)]
mark test-inlabel-wildcard-cert-no-CA-client as an expected failure

3 years agosftp-server: implement limits@openssh.com extension
djm [Thu, 18 Feb 2021 00:30:17 +0000 (00:30 +0000)]
sftp-server: implement limits@openssh.com extension

This is a simple extension that allows the server to clearly
communicate transfer limits it is imposing so the client doesn't
have to guess, or force the user to manually tune.  This is
particularly useful when an attempt to use too large of a value
causes the server to abort the connection.

Patch from Mike Frysinger; ok dtucker@

3 years agohandle "simple-pm-bus" in simplebus
jsg [Thu, 18 Feb 2021 00:04:13 +0000 (00:04 +0000)]
handle "simple-pm-bus" in simplebus

Enables a clock and/or power domain for a group of devices.
Required to use linux 5.11 dtbs on am335x and omap4.

ok kettenis@

3 years agoUnify unit initialization.
mglocker [Wed, 17 Feb 2021 17:21:58 +0000 (17:21 +0000)]
Unify unit initialization.

3 years agoIf the device driver open call fails, don't set sc_open since in that case
mglocker [Wed, 17 Feb 2021 17:09:12 +0000 (17:09 +0000)]
If the device driver open call fails, don't set sc_open since in that case
we don't get a file handle back which could be closed again, and therefore
we couldn't toggle sc_open back to zero.

Spotted and ok anton@

3 years agoSkip gp initialization in loongson bootblocks
visa [Wed, 17 Feb 2021 14:42:20 +0000 (14:42 +0000)]
Skip gp initialization in loongson bootblocks

The loongson bootblocks are compiled with -mno-abicalls and do not use
gp-relative addressing.

A similar change has been made to the mips64 kernels recently.

3 years agoDo not reprogram address filter after MII status change
visa [Wed, 17 Feb 2021 14:12:29 +0000 (14:12 +0000)]
Do not reprogram address filter after MII status change

The address filter is not affected by link parameter changes,
so its reprogramming can be skipped.

3 years agoAdd support for FIQs. We need these to support agtimer(4) on Apple M1 SoCs
kettenis [Wed, 17 Feb 2021 12:11:44 +0000 (12:11 +0000)]
Add support for FIQs.  We need these to support agtimer(4) on Apple M1 SoCs
since its interrupts seem to be hardwared to trigger an FIQ instead of an
IRQ.  This means we need to manipulate both the F and the I bit in the
DAIF register when enabling and disabling interrupts.

ok patrick@

3 years agoCall 'struct process' parameters 'pr' to distinguish from 'struct proc'
mglocker [Wed, 17 Feb 2021 08:51:40 +0000 (08:51 +0000)]
Call 'struct process' parameters 'pr' to distinguish from 'struct proc'
parameters which are usually called 'p'.

Spotted and ok anton@

3 years agoMove the call to setupterm() into the client and have it pass the
nicm [Wed, 17 Feb 2021 07:18:36 +0000 (07:18 +0000)]
Move the call to setupterm() into the client and have it pass the
results to the server over imsg, means the server does not need to enter
ncurses or read terminfo db. Old clients will not work with a new
server.

3 years agoCollect return code of video_stop() for ioctls calls.
mglocker [Wed, 17 Feb 2021 07:08:15 +0000 (07:08 +0000)]
Collect return code of video_stop() for ioctls calls.

Spotted and ok anton@

3 years agoMake sure puttygen is new enough to successfully run the PuTTY interop
dtucker [Wed, 17 Feb 2021 03:59:00 +0000 (03:59 +0000)]
Make sure puttygen is new enough to successfully run the PuTTY interop
tests, otherwise skip them.

3 years agoAdd support for the UART found on the Apple M1 SoC.
kettenis [Tue, 16 Feb 2021 21:58:14 +0000 (21:58 +0000)]
Add support for the UART found on the Apple M1 SoC.

ok patrick@

3 years agoAdd x509 certificate validation regression tests
jan [Tue, 16 Feb 2021 21:39:17 +0000 (21:39 +0000)]
Add x509 certificate validation regression tests

The validation tests are originaly createtd by Steffen Ullrich.

OK tb@
No objection jsing@

3 years agoFail on duplicate KE payload.
tobhe [Tue, 16 Feb 2021 21:07:43 +0000 (21:07 +0000)]
Fail on duplicate KE payload.

ok patrick@

3 years agoIntroduce debug levels since the current debug output is too noisy by
mglocker [Tue, 16 Feb 2021 19:36:03 +0000 (19:36 +0000)]
Introduce debug levels since the current debug output is too noisy by
default.

3 years agoPoll battery sensors less frequently. The previous period was quite
anton [Tue, 16 Feb 2021 18:36:43 +0000 (18:36 +0000)]
Poll battery sensors less frequently. The previous period was quite
arbitrary and inspired by other USB drivers.

3 years agoTrim uhidpp_device_features() by extracting two pure protocol functions.
anton [Tue, 16 Feb 2021 18:35:26 +0000 (18:35 +0000)]
Trim uhidpp_device_features() by extracting two pure protocol functions.

3 years agoPrevent double free by copying the URI string from struct tal to the repo.
claudio [Tue, 16 Feb 2021 16:50:41 +0000 (16:50 +0000)]
Prevent double free by copying the URI string from struct tal to the repo.

3 years agomake use of getline(3) in ftp(1)
naddy [Tue, 16 Feb 2021 16:27:34 +0000 (16:27 +0000)]
make use of getline(3) in ftp(1)

Replace fparseln(3) with getline(3).  This removes the only use of
libutil.a(fparseln.o) from the ramdisk.
Replace a complicated fgetln(3) idiom with the much simpler getline(3).

ok jca@

3 years agoRevery previous hash alignment fix
afresh1 [Tue, 16 Feb 2021 15:13:15 +0000 (15:13 +0000)]
Revery previous hash alignment fix

Unintentionally changes ABI and breaks perl ports

3 years agosync
deraadt [Tue, 16 Feb 2021 14:21:53 +0000 (14:21 +0000)]
sync

3 years agoEnable multiple opens of a video(4) device as described in the V4L2
mglocker [Tue, 16 Feb 2021 13:50:46 +0000 (13:50 +0000)]
Enable multiple opens of a video(4) device as described in the V4L2
specification:

https://www.kernel.org/doc/html/v5.10/userspace-api/media/v4l/open.html#f1

The discussion has been started by jca@, who has implemented this
behavior recently, but limited to the same process.  This diff extends
this behavior to any process.  The first process which opens a stream
will become the device owner.  Other processes are still allowed to call
certain ioctls, but none which are related to the start/stop of a
stream, or manipulation of the streaming buffers.  At the moment only
VIDIOC_G_CTRL and VIDIOC_S_CTRL are supported to be called by non-
device owner processes, which should be extended further in the future.

There is no additional kernel locking implemented at the moment, since
video(4) already runs under the KERNEL_LOCK(), which we expect to be
sufficient for now (as discussed with claudio@).

A lot of improvement input received from anton@.

ok anton@

3 years agoIntroduce BUS_SPACE_MAP_POSTED such that we can distinguish between
kettenis [Tue, 16 Feb 2021 12:33:22 +0000 (12:33 +0000)]
Introduce BUS_SPACE_MAP_POSTED such that we can distinguish between
posted and non-posted device memory mappings and set the right memory
attributes for them.  Needed because on the Apple M1 using the wrong
mapping will fault.

ok patrick@, dlg@

3 years agoComments & style cleanup, no functional change intended.
mpi [Tue, 16 Feb 2021 09:10:17 +0000 (09:10 +0000)]
Comments & style cleanup, no functional change intended.

- Sync comments with NetBSD including locking details.
- Remove superfluous parenthesis and spaces.
- Add brackets, even if questionable, to reduce diff with NetBSD
- Use for (;;) instead of while(1)
- Rename a variable from 'result' into 'error'.
- Move uvm_fault() and uvm_fault_upper_lookup()
- Add an locking assert in uvm_fault_upper_lookup()

ok tb@, mlarkin@

3 years agoPrint AIA in rpki-client test utility
job [Tue, 16 Feb 2021 08:53:53 +0000 (08:53 +0000)]
Print AIA in rpki-client test utility

3 years agoRework the repository handling. Split the handling of trust anchors into
claudio [Tue, 16 Feb 2021 08:52:00 +0000 (08:52 +0000)]
Rework the repository handling. Split the handling of trust anchors into
ta_lookup() while regular repositories (to fetch .mft files) are handled
by repo_lookup(). Also the cache directory layout changed; moving the
trust anchors to ./ta/{tal basename}/ the other repositories end up in
./rsync/
OK tb@

3 years agoAdd `bgpctl show rtr` to display basic information about RTR sessions.
claudio [Tue, 16 Feb 2021 08:30:21 +0000 (08:30 +0000)]
Add `bgpctl show rtr` to display basic information about RTR sessions.
OK job@

3 years agoAdd RTR support to OpenBGPD. Add basic support for the protocol.
claudio [Tue, 16 Feb 2021 08:29:16 +0000 (08:29 +0000)]
Add RTR support to OpenBGPD. Add basic support for the protocol.
The RTR client runs in a new process where the protocol handling is done
and when new data is available all sources are merged into one ROA set
which is then loaded into the RDE. The roa-set from the config is also
handled by the new RTR engine.
Tested by and ok job@

3 years agoget Authority Information Access (AIA) from CA & EE certs
job [Tue, 16 Feb 2021 07:58:30 +0000 (07:58 +0000)]
get Authority Information Access (AIA) from CA & EE certs

In the context of the RPKI, the AIA extension identifies the publication
point of the certificate of the issuer of the certificate in which the
extension appears. A single reference to the publication point of the
immediate superior certificate MUST be present, except for a
"self-signed" certificate.

Thanks tb@ for review

OK claudio@

3 years agouse rtalloc_mpath in pf_route and pf_route6.
dlg [Tue, 16 Feb 2021 03:12:32 +0000 (03:12 +0000)]
use rtalloc_mpath in pf_route and pf_route6.

if you have multiple links to the same destination, this will let
you use them with route-to/reply-to/dup-to.

ok claudio@

3 years agoBackport upstream perl 64bit hash alignment fixes
afresh1 [Tue, 16 Feb 2021 02:12:52 +0000 (02:12 +0000)]
Backport upstream perl 64bit hash alignment fixes

Different flags triggering new compiler optimizations means that
luck has run out on this working by chance with the strict alignment
of octeon.

Upstream issue:
https://github.com/Perl/perl5/issues/18555

This is a combination of three commits from upstream.
https://github.com/Perl/perl5/commit/d18575f18c6ee61ce80492e82cae7361358d570a
https://github.com/Perl/perl5/commit/6027b190154088fbbcbde08a80c49531e4e4c012
https://github.com/Perl/perl5/commit/f43079cb514e3d0be0036424695438ae3fb58451

works on all arch deraadt@

3 years agosome phy are not needed anymore since the ethernet drivers went away
deraadt [Tue, 16 Feb 2021 00:03:54 +0000 (00:03 +0000)]
some phy are not needed anymore since the ethernet drivers went away

3 years agoFix invalid config error in run-psk-fail.
tobhe [Mon, 15 Feb 2021 20:53:24 +0000 (20:53 +0000)]
Fix invalid config error in run-psk-fail.

3 years agoWhile it should be possible to use "normal uncachable" mappings for
kettenis [Mon, 15 Feb 2021 20:44:08 +0000 (20:44 +0000)]
While it should be possible to use "normal uncachable" mappings for
write-combining on arm64 as Linux does, this doesn't seem to work on
NXP's LX2160A SoC.  So switch to using "device" mappings for now to
make amdgpu(4) work better.

ok patrick@

3 years agossh: add PermitRemoteOpen for remote dynamic forwarding with SOCKS
markus [Mon, 15 Feb 2021 20:43:15 +0000 (20:43 +0000)]
ssh: add PermitRemoteOpen for remote dynamic forwarding with SOCKS
ok djm@, dtucker@

3 years agofactor out opt_array_append; ok djm@
markus [Mon, 15 Feb 2021 20:36:35 +0000 (20:36 +0000)]
factor out opt_array_append; ok djm@

3 years agoExtraneous blank line.
krw [Mon, 15 Feb 2021 19:33:21 +0000 (19:33 +0000)]
Extraneous blank line.

3 years agoSimplify error path in in route_attach(). We always call it in thread
mvs [Mon, 15 Feb 2021 19:01:30 +0000 (19:01 +0000)]
Simplify error path in in route_attach(). We always call it in thread
context so we always have `curproc' Also protocol control block is not
required for soreserve() so we can do it before `rop' allocation.

ok bluhm@

3 years agoOnly print the certificate file once on verifification failure.
jsing [Mon, 15 Feb 2021 17:57:58 +0000 (17:57 +0000)]
Only print the certificate file once on verifification failure.

Noted by Steffen Ullrich.

ok tb@

3 years agoMake SGR 6 (rapid blink) the same as SGR 5 (blink) and make SGR 21 to
nicm [Mon, 15 Feb 2021 14:22:35 +0000 (14:22 +0000)]
Make SGR 6 (rapid blink) the same as SGR 5 (blink) and make SGR 21 to
the same as SGR 4:2, it is an old alternative. GitHub issue 2567.

3 years agoRework tick_msg() to make messages displayed during startup more
krw [Mon, 15 Feb 2021 14:20:11 +0000 (14:20 +0000)]
Rework tick_msg() to make messages displayed during startup more
reliable and consistant.

Eliminate unused time_t parameter since we only tick during the first
link_timeout seconds. Replace it with 'action' parameter to clearly
indicated what tick_msg() is supposed to do.

Fix issuance of '\n' before log_debug() messages. Properly
reinitialize static variables.

Use more precise 'timespec' timers, hewing to idiom suggested by
cheloha@.

3 years agoFix double unlock in uvmfault_anonget().
mpi [Mon, 15 Feb 2021 12:12:54 +0000 (12:12 +0000)]
Fix double unlock in uvmfault_anonget().

Reported by and ok jsg@

3 years agoBack-out USB data toggle fix for HID devices, since we received multiple
mglocker [Mon, 15 Feb 2021 11:26:00 +0000 (11:26 +0000)]
Back-out USB data toggle fix for HID devices, since we received multiple
reports about broken devices, e.g. for ukbd(4) and fido(4).

ok mpi@

3 years agoProxyJump takes "none" to disable processing like ProxyCommand does
dlg [Mon, 15 Feb 2021 11:09:22 +0000 (11:09 +0000)]
ProxyJump takes "none" to disable processing like ProxyCommand does

ok djm@ jmc@

3 years agoSupport X11 colour names and some other variations for OSC 10/11, also
nicm [Mon, 15 Feb 2021 09:39:37 +0000 (09:39 +0000)]
Support X11 colour names and some other variations for OSC 10/11, also
add OSC 110 and 111. GitHub issue 2567.

3 years agoMove single_thread_set() out of KERNEL_LOCK().
mpi [Mon, 15 Feb 2021 09:35:59 +0000 (09:35 +0000)]
Move single_thread_set() out of KERNEL_LOCK().

Use the SCHED_LOCK() to ensure `ps_thread' isn't being modified by a sibling
when entering tsleep(9) w/o KERNEL_LOCK().

ok visa@

3 years agodistrib: arm64: avoid customization in mr.fs target
semarie [Mon, 15 Feb 2021 07:06:03 +0000 (07:06 +0000)]
distrib: arm64: avoid customization in mr.fs target

arm64 ramdisk has customization in mr.fs target, in order to create
usr/mdec/pine64 and usr/mdec/rpi directories (files will be copied
inside them by runlist.sh).

uses MKDIR directive to create these directories instead of.

it put back mr.fs target identical to others archs.

ok deraadt@

3 years agoThings are too tight. Retaining even those two symbols is too much.
deraadt [Mon, 15 Feb 2021 06:59:03 +0000 (06:59 +0000)]
Things are too tight.  Retaining even those two symbols is too much.
When dealing with install floppies, the Makefiles will need to carry
some differences.

3 years agomove the rearming of the cq after the refill of the rq.
dlg [Mon, 15 Feb 2021 03:42:00 +0000 (03:42 +0000)]
move the rearming of the cq after the refill of the rq.

this is the only real diff we have left outstanding on a box that
experienced rx lockups. since adding this change it's been happy
for the last 4 weeks and counting so far.

ok jmatthew@

3 years agoEnable clocks and adjust for removal of subnodes in upstream Linux
kettenis [Sun, 14 Feb 2021 19:24:38 +0000 (19:24 +0000)]
Enable clocks and adjust for removal of subnodes in upstream Linux
device trees.

3 years agoEnable clocks.
kettenis [Sun, 14 Feb 2021 19:23:58 +0000 (19:23 +0000)]
Enable clocks.

3 years agoRaise match priority to beat syscon(4).
kettenis [Sun, 14 Feb 2021 19:22:44 +0000 (19:22 +0000)]
Raise match priority to beat syscon(4).
Use the right clock for the Cortex-A7 cores.
Support CPU clocks and remove exclock_cpuspeed().

ok patrick@

3 years agoregen
kettenis [Sun, 14 Feb 2021 17:21:16 +0000 (17:21 +0000)]
regen

3 years agoAdd a few more devices that show up on the Apple M1 mini.
kettenis [Sun, 14 Feb 2021 17:20:47 +0000 (17:20 +0000)]
Add a few more devices that show up on the Apple M1 mini.

ok patrick@, deraadt@

3 years agodistrib: restore rdsetroot -x usage (extract the disk.fs image) on stripped bsd.rd
semarie [Sun, 14 Feb 2021 17:14:42 +0000 (17:14 +0000)]
distrib: restore rdsetroot -x usage (extract the disk.fs image) on stripped bsd.rd

It passes options to keep rd_root_size and rd_root_image symbols while
stripping. These symbols are the ones used by rdsetroot to insert or
extract disk image into RAMDISK.

ok danj@ deraadt@

3 years agodistrib: use ${MACHINE} instead of hardcoded value
semarie [Sun, 14 Feb 2021 17:11:02 +0000 (17:11 +0000)]
distrib: use ${MACHINE} instead of hardcoded value

ok deraadt@

3 years agoShuffle how lldb register contexts are built.
mortimer [Sun, 14 Feb 2021 16:16:02 +0000 (16:16 +0000)]
Shuffle how lldb register contexts are built.

Instead of using #if defined(__arch__) to include / exclude the entire contents
of the NativeRegisterContext implementations, use a single NativeRegisterContextOpenBSD_arch
which includes the right arch specific register context, and provides a dummy implementation
for unsupported architectures.

This allows building lldb on architectures which do not have a register context implementation
so it can be used as a remote client.

ok patrick@

3 years agoPostpone installation of the periodic sensor task until at least one
anton [Sun, 14 Feb 2021 14:41:35 +0000 (14:41 +0000)]
Postpone installation of the periodic sensor task until at least one
device has connected.

3 years agoBail out earlier during attach if no devices are paired with the
anton [Sun, 14 Feb 2021 14:40:38 +0000 (14:40 +0000)]
Bail out earlier during attach if no devices are paired with the
receiver.

3 years agoEnumerate all features supported by a device on connect.
anton [Sun, 14 Feb 2021 14:39:25 +0000 (14:39 +0000)]
Enumerate all features supported by a device on connect.
Should help diagnose various reports regarding missing battery sensors.

3 years agoIntroduce variables to deal with bit layout differences in the UFSTAT
kettenis [Sun, 14 Feb 2021 13:39:24 +0000 (13:39 +0000)]
Introduce variables to deal with bit layout differences in the UFSTAT
register.  Use 32-bit reads and writes to access the URXH and UTXH
registers.  They're documented as 32-bit registers in the Exynos 4 and
Exynos 5 User Manuals and accessing URXH with an 8-bit read triggers a
fault on Apple's M1 SoC.

ok patrick@

3 years agoRecent device trees have the syscon-reboot and syscon-poweroff nodes as
kettenis [Sun, 14 Feb 2021 10:57:40 +0000 (10:57 +0000)]
Recent device trees have the syscon-reboot and syscon-poweroff nodes as
children of the node claimed by expower(4).  That node also fained a
"syscon" compatible in the process.  Deal with these changes,

ok patrick@

3 years agocorrect drm work flush behaviour
jsg [Sun, 14 Feb 2021 03:42:55 +0000 (03:42 +0000)]
correct drm work flush behaviour

Don't set taskq to system_wq in INIT_WORK().  Test if taskq pointer is
non-NULL before calling taskq_barrier() in flush functions.

fixes a black screen on boot problem with 5.10.y drm using nano x1
bisected by jcs@ to
'drm/i915: Always flush the active worker before returning from the wait'

3 years agoCleanup lldb amd64 support.
mortimer [Sat, 13 Feb 2021 21:33:54 +0000 (21:33 +0000)]
Cleanup lldb amd64 support.

- Remove watchpoint support since we do not support hardware watchpoints.

- Support floating point regsisters in the ReadAll/WriteAll interface.

- Standardize the sizes used in GerGPRSize() and GetFPRSize() to correspond
  to the sizes we get from ptrace.

- Fix the r/w of the mmx registers to map onto the st fp registers instead
  of xmm registers.

- Normalize some variable names to be architecture neutral.

ok patrick@

3 years agodistrib: remove .comment section systematically
semarie [Sat, 13 Feb 2021 18:52:08 +0000 (18:52 +0000)]
distrib: remove .comment section systematically

remove this section as part of crunchgen generated commands.
it avoids calling "strip -R .comment" for some but not all architectures.

ok deraadt@ danj@

3 years agodistrib: remove .SUNW_ctf only on kernels
semarie [Sat, 13 Feb 2021 18:48:23 +0000 (18:48 +0000)]
distrib: remove .SUNW_ctf only on kernels

the .SUNW_ctf section is added by ctfstrip(1), which is only used for kernels.

ok deraadt@ danj@

3 years agodistrib: merge "cp a b; strip b" to "objcopy -S a b"
semarie [Sat, 13 Feb 2021 18:46:52 +0000 (18:46 +0000)]
distrib: merge "cp a b; strip b" to "objcopy -S a b"

ok deraadt@ danj@

3 years agodistrib: remove duplicate strip(1) calls
semarie [Sat, 13 Feb 2021 18:44:17 +0000 (18:44 +0000)]
distrib: remove duplicate strip(1) calls

"strip -R section" command run "strip" (without option) as well.
there is no need to call both.

(binaries checked with sha1)

original diff from danj@

ok deraadt@

3 years agodistrib: merge objcopy -Sg and strip commands
semarie [Sat, 13 Feb 2021 18:41:52 +0000 (18:41 +0000)]
distrib: merge objcopy -Sg and strip commands

in the command "objcopy -Sg", the -g option (STRIP_DEBUG) overrides
the -S option (STRIP_ALL). so it is the same as "objcopy -g".

"strip" command without option is doing STRIP_ALL.

merge the both commands to "objcopy -S"

ok deraadt@ danj@

3 years agodistrib: remove STRIPOPTS variable from alpha and sparc64 Makefile
semarie [Sat, 13 Feb 2021 18:39:40 +0000 (18:39 +0000)]
distrib: remove STRIPOPTS variable from alpha and sparc64 Makefile

ok deraadt@ danj@

3 years agoRevise cnmac(4)'s address filter setup
visa [Sat, 13 Feb 2021 17:12:38 +0000 (17:12 +0000)]
Revise cnmac(4)'s address filter setup

Set up the DMAC filter in one go instead of doing it separately for
unicast and multicast DMACs. This attempts to make the code a little
more readable. The setup should now run a bit faster as well because
it now does fewer register accesses.

Tested on CN5020, CN6120 and CN7130.

3 years agoAdd dynamic address configuration for roadwarrior clients.
tobhe [Sat, 13 Feb 2021 16:14:12 +0000 (16:14 +0000)]
Add dynamic address configuration for roadwarrior clients.
The new 'iface' config option can be used to specify an interface
for the virtual addresses received from the peer.
Routes are automatically added based on the configured flows.

Input from sthen@ and claudio@
ok patrick@

3 years ago-h does not display version; from larry hynes
jmc [Sat, 13 Feb 2021 08:07:48 +0000 (08:07 +0000)]
-h does not display version; from larry hynes