openbsd
3 years agoFix a memory leak: use a single memory allocation for struct addrinfo and
eric [Wed, 23 Dec 2020 15:42:03 +0000 (15:42 +0000)]
Fix a memory leak: use a single memory allocation for struct addrinfo and
the sockaddr it contains, as expected by freeaddrinfo().
Move the allocation to a helper function for clarity.

comments from martijn@ millert@

ok millert@

3 years agoEnsure that filt_dead() takes effect
visa [Wed, 23 Dec 2020 13:59:09 +0000 (13:59 +0000)]
Ensure that filt_dead() takes effect

Invoke dead_filtops' f_event callback in klist_invalidate() to ensure
that filt_dead() modifies every invalidated knote. If a knote has
EV_ONESHOT set in its event flags, kqueue_scan() will not call f_event.

OK mpi@

3 years agoClear error before each iteration in kqueue_scan()
visa [Wed, 23 Dec 2020 13:53:44 +0000 (13:53 +0000)]
Clear error before each iteration in kqueue_scan()

This fixes a regression where kqueue_scan() may incorrectly return
EWOULDBLOCK after a timeout.

OK mpi@

3 years agoBGP uses KEEPALIVE packets and the HOLD timer to detect stalled sessions.
claudio [Wed, 23 Dec 2020 13:20:47 +0000 (13:20 +0000)]
BGP uses KEEPALIVE packets and the HOLD timer to detect stalled sessions.
The problem is that this timer only looks at the receive side of the TCP
session. If for some reason the send side stalls the system fully depends
on the remote BGP peer to reset the session. As seen in an ever growing
OutQ and as a result important changes can get stalled and cause routing
troubles.

This change introduces a SEND HOLD timer. The timer is reset whenever the
session engine was able to write data to the TCP socket. If the send hold
timer expires bgpd was not able to send any data to that neighbor for at
least 90 seconds and therefor the session is forcefully closed with a hold
timer expired notification.

The send hold timer acts as a last resort to detect faulty peers. On an
idle session it can take a long time until this timer triggers but the
main goal here is to reset a stuck session at some point which did not
happen before.

With and OK job@

3 years agoUpdate to tzdata2020e from www.iana.org. Major changes:
millert [Wed, 23 Dec 2020 13:06:27 +0000 (13:06 +0000)]
Update to tzdata2020e from iana.org.  Major changes:
 o Palestine ends DST earlier than predicted, on 2020-10-24.
 o Volgograd switches to Moscow time on 2020-12-27 at 02:00.

3 years agoFix regulators that use "active-low" polarity. Our implementation now
kettenis [Wed, 23 Dec 2020 11:58:36 +0000 (11:58 +0000)]
Fix regulators that use "active-low" polarity.  Our implementation now
ignores the presence "enable-active-high" property and relies on the
encode polarity of the GPIO in the flags in the device tree instead.
This might not be the case for older device trees; such device trees
should be fixed.

ok patrick@

3 years agoHandle a few more userland traps that would lead to a kernel panic.
kettenis [Wed, 23 Dec 2020 10:47:10 +0000 (10:47 +0000)]
Handle a few more userland traps that would lead to a kernel panic.

3 years agoUse regfree after we're done with preg.
martijn [Wed, 23 Dec 2020 08:12:14 +0000 (08:12 +0000)]
Use regfree after we're done with preg.

From gilles@

3 years agohave the ifrxr info stuff report the buffer size the hw handles.
dlg [Tue, 22 Dec 2020 23:25:37 +0000 (23:25 +0000)]
have the ifrxr info stuff report the buffer size the hw handles.

this makes it more consistent with other drivers.

3 years agoLog SPI with SPI_SH() wherever possible.
tobhe [Tue, 22 Dec 2020 21:01:55 +0000 (21:01 +0000)]
Log SPI with SPI_SH() wherever possible.

3 years agoUse SIGILL for the Facility Unavailable Interrupt in usermode.
gkoehler [Tue, 22 Dec 2020 18:17:28 +0000 (18:17 +0000)]
Use SIGILL for the Facility Unavailable Interrupt in usermode.

ok kettenis@

3 years agofurther tidy up the dynamic address section, and try to keep it and the static
jmc [Tue, 22 Dec 2020 17:18:09 +0000 (17:18 +0000)]
further tidy up the dynamic address section, and try to keep it and the static
section a little more consistent;

ok krw

3 years agoAdd PCIe clocks.
kettenis [Tue, 22 Dec 2020 15:23:51 +0000 (15:23 +0000)]
Add PCIe clocks.

3 years agoFor a while the kerrnel reports EACCES to userland if pf blocks a
bluhm [Tue, 22 Dec 2020 13:37:48 +0000 (13:37 +0000)]
For a while the kerrnel reports EACCES to userland if pf blocks a
packet.  IPv6 still had the old EHOSTUNREACH code.  Use the same
errno for dropped IPv6 packets as in IPv4.
OK kn@ phessler@ claudio@ florian@ sashan@

3 years agoImplement select(2) and pselect(2) on top of kqueue.
mpi [Tue, 22 Dec 2020 13:24:45 +0000 (13:24 +0000)]
Implement select(2) and pselect(2) on top of kqueue.

The given set of fds are converted to equivalent kevents using EV_SET(2)
and passed to the scanning internals of kevent(2): kqueue_scan().

ktrace(1) will now output the converted kevents on top of the usuals set
bits to be able to find possible error in the convertion.

This switch implies that select(2) and pselect(2) will now query the
underlying kqfilters instead of the *_poll() routines.

Based on similar work done on DragonFlyBSD with inputs from from visa@,
millert@, anton@, cheloha@, thanks!

ok visa@

3 years agoDestroy the mutex in tls_config objects when tls_config_free is called.
bcook [Tue, 22 Dec 2020 13:07:54 +0000 (13:07 +0000)]
Destroy the mutex in tls_config objects when tls_config_free is called.

Add a stub for pthread_mutex_destroy() for installers.

ok tb@

3 years agoDefer hardware initialization in order to give things like PCIe PHYs
kettenis [Tue, 22 Dec 2020 12:59:05 +0000 (12:59 +0000)]
Defer hardware initialization in order to give things like PCIe PHYs
a chance to attach.  Needed for future support of PCIe on Amlogic SoCs.

ok patrick@

3 years agoClear FSCR register. This gives us a sane default state where all facilities
kettenis [Tue, 22 Dec 2020 11:55:44 +0000 (11:55 +0000)]
Clear FSCR register.  This gives us a sane default state where all facilities
are disabled by default on all CPUs.

3 years agoFix typos
tobias [Tue, 22 Dec 2020 10:33:33 +0000 (10:33 +0000)]
Fix typos

ok jmc

3 years agoBreak cursor movement in grid into a common set of functions that can
nicm [Tue, 22 Dec 2020 09:22:14 +0000 (09:22 +0000)]
Break cursor movement in grid into a common set of functions that can
handle line wrapping and so on in one place and use them for the obvious
copy mode commands. From Anindya Mukherjee.

3 years agotweak the description of KnownHostsCommand in ssh_conf.5, and add
jmc [Tue, 22 Dec 2020 07:40:26 +0000 (07:40 +0000)]
tweak the description of KnownHostsCommand in ssh_conf.5, and add
entries for it to the -O list in scp.1 and sftp.1;

ok djm

3 years agoprint all the rings on a nic without limiting it to the number of mclpools
dlg [Tue, 22 Dec 2020 06:57:18 +0000 (06:57 +0000)]
print all the rings on a nic without limiting it to the number of mclpools

"makes sense" jmatthew@

3 years agoname the rx rings like ix does for systat mb
dlg [Tue, 22 Dec 2020 06:55:16 +0000 (06:55 +0000)]
name the rx rings like ix does for systat mb

3 years agomore detail for failing tests
djm [Tue, 22 Dec 2020 06:47:24 +0000 (06:47 +0000)]
more detail for failing tests

3 years agoregress test for KnownHostsCommand
djm [Tue, 22 Dec 2020 06:03:36 +0000 (06:03 +0000)]
regress test for KnownHostsCommand

3 years agosync
visa [Tue, 22 Dec 2020 04:32:42 +0000 (04:32 +0000)]
sync

3 years agoMake clang the default compiler on loongson.
visa [Tue, 22 Dec 2020 04:32:08 +0000 (04:32 +0000)]
Make clang the default compiler on loongson.

OK deraadt@

3 years agostop showing amd l3 cache information
jsg [Tue, 22 Dec 2020 03:42:03 +0000 (03:42 +0000)]
stop showing amd l3 cache information

>= zen 2 based amd processors return a value of 9 for l3 cache assoc
via cpuid 0x80000006.  As that is a reserved value we end up incorrectly
claiming the l3 cache is disabled.  While it is possible to get l3 cache
information via cpuid 0x8000001d when TOPEXT is advertised that will
instead give information about the l3 cache available to the core
complex (CCX) that the cpu belongs to where previously the amount of l3
available to all core complexes was shown.

As we don't detail topology in dmesg or show the mapping of cores to
core complexes just stop displaying l3 information.  It already isn't
shown on intel.

ok gkoehler@

3 years agoRemove lines accidentally left behind in the ProxyJump parsing fix r1.345.
tb [Tue, 22 Dec 2020 03:05:31 +0000 (03:05 +0000)]
Remove lines accidentally left behind in the ProxyJump parsing fix r1.345.

ok djm

3 years agoRevert call to pthread_mutex_destroy until installers have a stub.
bcook [Tue, 22 Dec 2020 02:20:44 +0000 (02:20 +0000)]
Revert call to pthread_mutex_destroy until installers have a stub.

noted by deraadt@

3 years agoadd a ssh_config KnownHostsCommand that allows the client to obtain
djm [Tue, 22 Dec 2020 00:15:22 +0000 (00:15 +0000)]
add a ssh_config KnownHostsCommand that allows the client to obtain
known_hosts data from a command in addition to the usual files.

The command accepts bunch of %-expansions, including details of the
connection and the offered server host key. Note that the command may
be invoked up to three times per connection (see the manpage for
details).

ok markus@

3 years agomove subprocess() from auth.c to misc.c
djm [Tue, 22 Dec 2020 00:12:22 +0000 (00:12 +0000)]
move subprocess() from auth.c to misc.c

make privilege dropping optional but allow it via callbacks (to avoid
need to link uidswap.c everywhere)

add some other flags (keep environment, disable strict path safety check)
that make this more useful for client-side use.

feedback & ok markus@

3 years agotweak previous;
jmc [Tue, 22 Dec 2020 00:11:03 +0000 (00:11 +0000)]
tweak previous;

3 years agoUse policy_test() to reassign existing SAs to updated policies after
tobhe [Mon, 21 Dec 2020 22:49:36 +0000 (22:49 +0000)]
Use policy_test() to reassign existing SAs to updated policies after
'ikectl reload'.  This prevents initiation of new additional SAs
for each policy every time the config is reloaded.

ok patrick@

3 years agoRemove explicit rijndael-cbc@lysator.liu.se test since the cipher was
dtucker [Mon, 21 Dec 2020 22:48:41 +0000 (22:48 +0000)]
Remove explicit rijndael-cbc@lysator.liu.se test since the cipher was
removed.

3 years agoFix typo in mktime() year format description. From Paul de Weerd.
millert [Mon, 21 Dec 2020 19:58:29 +0000 (19:58 +0000)]
Fix typo in mktime() year format description.  From Paul de Weerd.

3 years agoSimplify verbiage in "DYNAMIC ADDRESS CONFIGURATION" section. Add
krw [Mon, 21 Dec 2020 16:57:56 +0000 (16:57 +0000)]
Simplify verbiage in "DYNAMIC ADDRESS CONFIGURATION" section. Add
mention of and Xr slaacd(8).

Usual help from jmc@

3 years agoAvoid issuing pointless 'ifconfig <if> up' when processing 'dhcp' in
krw [Mon, 21 Dec 2020 16:52:49 +0000 (16:52 +0000)]
Avoid issuing pointless 'ifconfig <if> up' when processing 'dhcp' in
hostname.if files. dhclient(8) does that itself. Part of the
"further script optimizations" promised in r1.200 of netstart.

Tested & ok gnezdo@

3 years agoRename syntax test of the \O escape sequence (suppress output groff
schwarze [Mon, 21 Dec 2020 14:55:58 +0000 (14:55 +0000)]
Rename syntax test of the \O escape sequence (suppress output groff
extension; mandoc only implements syntax checking but ignores the
sequence) to please Bill Gates and didickman@: avoid path names that
only differ by case, like o.in vs. O.in.

3 years agoDestroy the mutex in a tls_config object when tls_config_free is called.
bcook [Mon, 21 Dec 2020 14:45:17 +0000 (14:45 +0000)]
Destroy the mutex in a tls_config object when tls_config_free is called.

ok inoguchi@

3 years agoOnly enable rasops1_putchar8() and rasops1_putchar16() optomizations on
kettenis [Mon, 21 Dec 2020 12:58:42 +0000 (12:58 +0000)]
Only enable rasops1_putchar8() and rasops1_putchar16() optomizations on
big-endian architectectures.  These functions assume big-endian bit order
whereas rasops1_putchar() assumes native-endian bit order.  Since ssdfb(4)
assumes little-endian bit order and is the only consumer of these interfaces
on little-endian platforms, go with the rasop1_putchar() convention for now.

ok mpi@

3 years agoThe plumbing already allowed for smtp authentication, hook it up to the -a
martijn [Mon, 21 Dec 2020 11:48:38 +0000 (11:48 +0000)]
The plumbing already allowed for smtp authentication, hook it up to the -a
flag.

Manpage order feedback jmc@
OK eric@

3 years agoUse NI_NUMERICSERV. We don't use the result and it's faster and is a
martijn [Mon, 21 Dec 2020 11:44:07 +0000 (11:44 +0000)]
Use NI_NUMERICSERV. We don't use the result and it's faster and is a
workaround for the memory-leak in asr.

smtp_session part from eric@
OK eric@ gilles@

3 years agoRewrite parse_netprefix to no longer use isc_sockaddr_fromin{,6}.
florian [Mon, 21 Dec 2020 11:41:08 +0000 (11:41 +0000)]
Rewrite parse_netprefix to no longer use isc_sockaddr_fromin{,6}.
Since this was the last user of those functions we can delete them.
OK otto

3 years agoNow that a NULL string is marshalled as NULL again we can drop some
claudio [Mon, 21 Dec 2020 11:35:55 +0000 (11:35 +0000)]
Now that a NULL string is marshalled as NULL again we can drop some
extra has_xyz integers to indicate if the following buffer is present
or not. At the same time sprinkle some asserts for strings which must
be not NULL.
OK tb@

3 years agoRemove the pre-standardization cipher rijndael-cbc@lysator.liu.se.
dtucker [Mon, 21 Dec 2020 11:09:32 +0000 (11:09 +0000)]
Remove the pre-standardization cipher rijndael-cbc@lysator.liu.se.
It is an alias for aes256-cbc which was standardized in RFC4253 (2006),
has been deprecated and disabled by default since OpenSSH 7.2 (2016)
and was only briefly documented in ssh.1 in 2001.

This will reduce the amount of work the cipher/kex regression tests need
to do by a little bit.  ok markus@ djm@

3 years agoAlways call endservent_r() after getservbyport_r().
eric [Mon, 21 Dec 2020 09:40:35 +0000 (09:40 +0000)]
Always call endservent_r() after getservbyport_r().
Fix a memory leak when no entry is matched.

ok florian

3 years agoproperly fix ProxyJump parsing; Thanks to tb@ for pointing out my error
djm [Mon, 21 Dec 2020 09:19:53 +0000 (09:19 +0000)]
properly fix ProxyJump parsing; Thanks to tb@ for pointing out my error
(parse_ssh_uri() can return -1/0/1, that I missed). Reported by Raf
Czlonka via bugs@

ok tb@

3 years agoShow scope id when set; ok florian@
otto [Mon, 21 Dec 2020 07:47:37 +0000 (07:47 +0000)]
Show scope id when set; ok florian@

3 years agoadapt to API change in hostkeys_foreach()/load_hostkeys()
djm [Mon, 21 Dec 2020 01:31:06 +0000 (01:31 +0000)]
adapt to API change in hostkeys_foreach()/load_hostkeys()

3 years agoTest that IPv4 path MTU discovery works over IPsec in tunnel mode.
bluhm [Mon, 21 Dec 2020 00:47:18 +0000 (00:47 +0000)]
Test that IPv4 path MTU discovery works over IPsec in tunnel mode.

3 years agoplumb ssh_conn_info through to sshconnect.c; feedback/ok markus@
djm [Sun, 20 Dec 2020 23:40:19 +0000 (23:40 +0000)]
plumb ssh_conn_info through to sshconnect.c; feedback/ok markus@

3 years agoallow UserKnownHostsFile=none; feedback and ok markus@
djm [Sun, 20 Dec 2020 23:38:00 +0000 (23:38 +0000)]
allow UserKnownHostsFile=none; feedback and ok markus@

3 years agoload_hostkeys()/hostkeys_foreach() variants for FILE*
djm [Sun, 20 Dec 2020 23:36:51 +0000 (23:36 +0000)]
load_hostkeys()/hostkeys_foreach() variants for FILE*

Add load_hostkeys_file() and hostkeys_foreach_file() that accept a
FILE* argument instead of opening the file directly.

Original load_hostkeys() and hostkeys_foreach() are implemented using
these new interfaces.

Add a u_int note field to the hostkey_entry and hostkey_foreach_line
structs that is passed directly from the load_hostkeys() and
hostkeys_foreach() call. This is a lightweight way to annotate results
between different invocations of load_hostkeys().

ok markus@

3 years agoUse regress framework for setup and shorten target names.
bluhm [Sun, 20 Dec 2020 22:45:22 +0000 (22:45 +0000)]
Use regress framework for setup and shorten target names.

3 years agoslightly tweak the jot regress tests to avoid file name clashes on
tb [Sun, 20 Dec 2020 21:59:37 +0000 (21:59 +0000)]
slightly tweak the jot regress tests to avoid file name clashes on
case insensitive file systems.

3 years agoAccept reject and blackhole routes for IPsec PMTU discovery.
bluhm [Sun, 20 Dec 2020 21:15:47 +0000 (21:15 +0000)]
Accept reject and blackhole routes for IPsec PMTU discovery.

Since revision 1.87 of ip_icmp.c icmp_mtudisc_clone() ignored reject
routes.  Otherwise TCP would clone these routes for PMTU discovery.
They will not work, even after dynamic routing has found a better
route than the reject route.

With IPsec the use case is different.  First you need a route, but
then the flow handles the packet without routing.  Usually this
route should be a reject route to avoid sending unencrypted traffic
if the flow is missing.  But IPsec needs this route for PMTU
discovery, so use it for that.

OK claudio@ tobhe@

3 years agoFix typo.
kettenis [Sun, 20 Dec 2020 21:03:53 +0000 (21:03 +0000)]
Fix typo.

3 years agoDon't leak ipsec_hosts when building hosts_list.
tobhe [Sun, 20 Dec 2020 17:44:50 +0000 (17:44 +0000)]
Don't leak ipsec_hosts when building hosts_list.

ok patrick@

3 years agorename pkg_add's pod files to avoid filenames with colons
daniel [Sun, 20 Dec 2020 15:30:58 +0000 (15:30 +0000)]
rename pkg_add's pod files to avoid filenames with colons

Filenames with colons are not allowed on windows filesystems. So we rename
the pod files to avoid this. Should get us closer to being able to check
out the openbsd source code on a windows system.

ok espie@ (who suggested the current approach); sthen@ was ok with a
previous version of the diff

3 years agoOnlly call event_del if there are events enabled, since not all libevents
martijn [Sun, 20 Dec 2020 14:06:12 +0000 (14:06 +0000)]
Onlly call event_del if there are events enabled, since not all libevents
are created equal.

From gilles@

3 years agoFree filter_name in lka_filter_end
martijn [Sun, 20 Dec 2020 13:27:46 +0000 (13:27 +0000)]
Free filter_name in lka_filter_end

From gilles@
OK millert@ eric@

3 years agoThe TCE table needs to be aligned on a boundary that is a multiple of its
kettenis [Sun, 20 Dec 2020 13:02:10 +0000 (13:02 +0000)]
The TCE table needs to be aligned on a boundary that is a multiple of its
size.  Fixes booting on machines that have memory banks higher up in
physical address space which needs a larger TCE table.

3 years agoIntroduce klistops
visa [Sun, 20 Dec 2020 12:54:05 +0000 (12:54 +0000)]
Introduce klistops

This patch extends struct klist with a callback descriptor and
an argument. The main purpose of this is to let the kqueue subsystem
assert when a klist should be locked, and operate the klist lock
in klist_invalidate().

Access to a knote list of a kqueue-monitored object has to be
serialized somehow. Because the object often has a lock for protecting
its state, and because the object often acquires this lock at the latest
in its f_event callback function, it makes sense to use this lock also
for the knote lists. The existing uses of NOTE_SUBMIT already show
a pattern that is likely to become more prevalent.

There could be an embedded lock in klist. However, such a lock would be
redundant in many cases. The code cannot rely on a single lock type
(mutex, rwlock, something else) because the needs of monitored objects
vary. In addition, an embedded lock would introduce new lock order
constraints. Note that the patch does not rule out use of dedicated
klist locks.

The patch introduces a way to associate lock operations with a klist.
The caller can provide a custom implementation, or use a ready-made
interface with a mutex or rwlock.

For compatibility with old code, the new code falls back to using the
kernel lock if no specific klist initialization has been done. The
existing code already relies on implicit initialization of klist.

Sadly, this change increases the size of struct klist. dlg@ thinks this
is not fatal, though.

OK mpi@

3 years agoFix EDNS Client Subnet option (+subnet=)
florian [Sun, 20 Dec 2020 12:02:00 +0000 (12:02 +0000)]
Fix EDNS Client Subnet option (+subnet=)

This got broken when we introduced ecs_plen so that we can use
natural socket types.

3 years agoFix IPv6 link-local address handling for nameservers to talk to as
florian [Sun, 20 Dec 2020 11:27:47 +0000 (11:27 +0000)]
Fix IPv6 link-local address handling for nameservers to talk to as
well as address to bind to.
Reported by Jordan Geoghegan (jordan AT geoghegan.ca), thanks!
Debugged by & initial fix by otto
Input & OK otto

3 years agoFix copy-pasto when selecting the addresses read from resolv.conf by
otto [Sun, 20 Dec 2020 10:29:50 +0000 (10:29 +0000)]
Fix copy-pasto when selecting the addresses read from resolv.conf by
address family.  ok florian@

3 years agoConvert uvm_km_valloc(9) calls to km_alloc(9). Tested in qemu with
jmatthew [Sun, 20 Dec 2020 09:49:53 +0000 (09:49 +0000)]
Convert uvm_km_valloc(9) calls to km_alloc(9).  Tested in qemu with
acpi disabled, no real mpbios hardware in sight.

ok kettenis@

3 years agosync with i915_pciids.h
jsg [Sun, 20 Dec 2020 04:13:12 +0000 (04:13 +0000)]
sync with i915_pciids.h

3 years agodrm/i915: Remove dubious Valleyview PCI IDs
jsg [Sun, 20 Dec 2020 04:12:14 +0000 (04:12 +0000)]
drm/i915: Remove dubious Valleyview PCI IDs

From Alexei Podtelezhnikov
f2bde2546b81b64fb58aa04888fdd82a090b3908 in mainline linux

3 years agoremove duplicate device id caused by subids in INTEL_IVB_Q_IDS
jsg [Sun, 20 Dec 2020 03:58:42 +0000 (03:58 +0000)]
remove duplicate device id caused by subids in INTEL_IVB_Q_IDS

3 years agotest against [VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS] in access_ok()
jsg [Sun, 20 Dec 2020 03:42:01 +0000 (03:42 +0000)]
test against [VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS] in access_ok()

ok kettenis@

3 years agoPrint client kem key with correct length.
tobhe [Sat, 19 Dec 2020 22:09:21 +0000 (22:09 +0000)]
Print client kem key with correct length.

ok markus@

3 years agoremove extra s
tb [Sat, 19 Dec 2020 18:05:44 +0000 (18:05 +0000)]
remove extra s

3 years agoApply r1.86 of amd64 acpi_machdep.c to arm64 and i386, converting a few
jmatthew [Sat, 19 Dec 2020 06:28:42 +0000 (06:28 +0000)]
Apply r1.86 of amd64 acpi_machdep.c to arm64 and i386, converting a few
uvm_km_valloc(9) to km_alloc(9).

tested on arm64 by bluhm@, i386 by me
ok kettenis@

3 years agorename filenames ending in a period
daniel [Sat, 19 Dec 2020 02:57:03 +0000 (02:57 +0000)]
rename filenames ending in a period

While windows may technically allow filenames to end in a period, the
recommendation is to avoid this as the shell does not support such files.
As of git 2.25, the behaviour was apparently changed to not allow files
with names ending in a period to be checked out on windows.

A second problem is upper/lower case conflicts for filenames.

To allow the source tree to be checked out on windows we follow FreeBSD
and rename a few files:

ss.. -> ss_
ssA  -> ss10
ssB  -> ss11

(FreeBSD svn revision 210167 from 2010)

as usual, this issue was extensively researched by jsg@

3 years agoThere's no need to include the OFW GPIO header.
patrick [Sat, 19 Dec 2020 01:21:35 +0000 (01:21 +0000)]
There's no need to include the OFW GPIO header.

3 years agoAdd support for the i.MX8MP PCIe clocks.
patrick [Sat, 19 Dec 2020 01:18:11 +0000 (01:18 +0000)]
Add support for the i.MX8MP PCIe clocks.

3 years agoAdd support for the i.MX8MP second ethernet. The Plus SoC not only has the
patrick [Fri, 18 Dec 2020 22:18:56 +0000 (22:18 +0000)]
Add support for the i.MX8MP second ethernet.  The Plus SoC not only has the
usual fec(4), but also a variant of dwge(4).  Unfortunately it seems to be
a newer version, which isn't compatible to the one currently in our tree.

3 years agoEmulate open drain GPIOs. This replaces the hack added in the last commit.
kettenis [Fri, 18 Dec 2020 22:15:29 +0000 (22:15 +0000)]
Emulate open drain GPIOs.  This replaces the hack added in the last commit.

ok patrick@

3 years agoAdd symbolic constants related to open source and open drain GPIOs.
kettenis [Fri, 18 Dec 2020 22:14:13 +0000 (22:14 +0000)]
Add symbolic constants related to open source and open drain GPIOs.

ok patrick@

3 years agoMake large read and write transactions work.
kettenis [Fri, 18 Dec 2020 22:13:06 +0000 (22:13 +0000)]
Make large read and write transactions work.

3 years agoUpdate awk to December 18, 2020 version.
millert [Fri, 18 Dec 2020 21:36:24 +0000 (21:36 +0000)]
Update awk to December 18, 2020 version.
Includes the official fix for +-inf and +-nan handling.

3 years agoAdd glue for the USB3 controller on the i.MX8MP SoC. NXP had this glue for
patrick [Fri, 18 Dec 2020 18:24:44 +0000 (18:24 +0000)]
Add glue for the USB3 controller on the i.MX8MP SoC.  NXP had this glue for
the i.MX8MQ as well, but while upstreaming they were told to shove it.  Now
for the i.MX8MP this glue is making a comeback.  Apparently there's some
divergence in low power handling to the regular DWC3 IP with special IRQs.
Now the question remains if this driver will be obsolete soon again, or if
this time it's here to stay.  The fun part is that while this driver was
written independent from the previous version, the diff is basically zero.

ok kettenis@

3 years agoAdd code to initialize the USB 3 PHY on i.MX8MP.
patrick [Fri, 18 Dec 2020 18:13:17 +0000 (18:13 +0000)]
Add code to initialize the USB 3 PHY on i.MX8MP.

ok kettenis@

3 years agoUse regress framework.
bluhm [Fri, 18 Dec 2020 18:05:29 +0000 (18:05 +0000)]
Use regress framework.

3 years agoIn io_str_read() return 0-length strings as NULL pointers instead of
claudio [Fri, 18 Dec 2020 16:58:59 +0000 (16:58 +0000)]
In io_str_read() return 0-length strings as NULL pointers instead of
empty strings. There are no empty strings being passed around but a
fair amount of optional strings and this will simplify this code.
OK tb@

3 years agoAdd support for the i.MX8MP USB clocks.
patrick [Fri, 18 Dec 2020 16:29:57 +0000 (16:29 +0000)]
Add support for the i.MX8MP USB clocks.

3 years agoAttach imxgpc(4) to i.MX8MP as well.
patrick [Fri, 18 Dec 2020 16:26:21 +0000 (16:26 +0000)]
Attach imxgpc(4) to i.MX8MP as well.

3 years agoAdd fd close notification for kqueue-based poll() and select()
visa [Fri, 18 Dec 2020 16:16:14 +0000 (16:16 +0000)]
Add fd close notification for kqueue-based poll() and select()

When the file descriptor of an __EV_POLL-flagged knote is closed,
post EBADF through the kqueue instance to the caller of kqueue_scan().
This lets kqueue-based poll() and select() preserve their current
behaviour of returning EBADF when a polled file descriptor is closed
concurrently.

OK mpi@

3 years agoMake knote_{activate,remove}() internal to kern_event.c.
visa [Fri, 18 Dec 2020 16:10:57 +0000 (16:10 +0000)]
Make knote_{activate,remove}() internal to kern_event.c.

OK mpi@

3 years agoAdd details to -F flag
solene [Fri, 18 Dec 2020 15:03:40 +0000 (15:03 +0000)]
Add details to -F flag

If you add alternatives domain names to
acme-client.conf, using -F is required to
renew the certificate with the new names.

ok jmc@

3 years agoUse asprintf with %.*s to construct the path based on the mft file
claudio [Fri, 18 Dec 2020 12:31:06 +0000 (12:31 +0000)]
Use asprintf with %.*s to construct the path based on the mft file
location and the filename of the referenced file. Use the same method
both in main.c and mft.c which is a fair bit simpler than using calloc
and strlcpy/strlcat to build the string by hand.
OK tb@

3 years agoMake sure the first packet of an SA has sequence number 1 (as described in
tobhe [Fri, 18 Dec 2020 12:30:23 +0000 (12:30 +0000)]
Make sure the first packet of an SA has sequence number 1 (as described in
RFC 4302 and RFC 4303).  It seems this was changed by accident when support
for 64 bit sequence numbers was added.

ok bluhm@ patrick@

3 years agotht(4): more tsleep(9) -> tsleep_nsec(9)
cheloha [Thu, 17 Dec 2020 23:36:47 +0000 (23:36 +0000)]
tht(4): more tsleep(9) -> tsleep_nsec(9)

The first wait-loop in tht_fw_load() can sleep for at least 10ms per
iteration instead of up to 1 tick per iteration with no ill effects.
The worst-case scenario is that we sleep a little longer than we do
now while we wait.

The second wait-loop can be simplified to sleep for at least 10ms per
iteration for up to 2000ms instead of using a timeout.  This method is
less precise and less efficient but is far simpler to read and
understand than using a timeout.  We can then remove all the
timeout-related stuff from if_tht.c.

Discussed with mpi@.

ok dlg@

3 years agofix possible error("%s", NULL) on error paths
djm [Thu, 17 Dec 2020 23:28:50 +0000 (23:28 +0000)]
fix possible error("%s", NULL) on error paths

3 years agorefactor client percent_expand() argument passing; consolidate the
djm [Thu, 17 Dec 2020 23:26:11 +0000 (23:26 +0000)]
refactor client percent_expand() argument passing; consolidate the
common arguments into a single struct and pass that around instead
of using a bunch of globals. ok markus@

3 years agoprepare readconf.c for fuzzing; remove fatal calls and fix some
djm [Thu, 17 Dec 2020 23:10:27 +0000 (23:10 +0000)]
prepare readconf.c for fuzzing; remove fatal calls and fix some
(one-off) memory leaks; ok markus@

3 years agoOnly enable the USB 3.0 port and PHY if it is enabled on a board.
kettenis [Thu, 17 Dec 2020 22:39:45 +0000 (22:39 +0000)]
Only enable the USB 3.0 port and PHY if it is enabled on a board.

3 years agoReset pin 3 of the GPIOAO bank to input mode to work around a hardware
kettenis [Thu, 17 Dec 2020 21:52:09 +0000 (21:52 +0000)]
Reset pin 3 of the GPIOAO bank to input mode to work around a hardware
bug in the Odroid C4/HC4 boards.