openbsd
3 years agoAdd -V to usage. Reported by Pier Carlo Chiodi.
claudio [Tue, 20 Jul 2021 12:07:46 +0000 (12:07 +0000)]
Add -V to usage. Reported by Pier Carlo Chiodi.

3 years agoCheck pointer variable if it is NULL in ca.c
inoguchi [Tue, 20 Jul 2021 12:04:53 +0000 (12:04 +0000)]
Check pointer variable if it is NULL in ca.c

missed with r1.32

3 years agoSimplify DHCP lease file parer after switch to dhcpleased
kn [Tue, 20 Jul 2021 11:20:09 +0000 (11:20 +0000)]
Simplify DHCP lease file parer after switch to dhcpleased

dhcpleased(8)'s lease files are much simpler than dhclient.leases(5):
- exactly one lease per file (not many)
- only option lines (not statement, declaration, etc.)
- every option/value is separated by a single ": " (no optional leading
  "option ")
- values are not quoted or escaped (like dhclient does)

lease_value() is hard to read, mostly because it strips optional double
quotes around option values as was required with dhclient.

dhclient VIS_ALL's values if they contain backticks, backslashes and
other characters, otherwise it VIS_SAFE's (and optionally quotes them).

dhcpleased VIS_SAFE's all value strings equally.

All install.sub users of lease_value() quote its output so they should
be safe without any special unescaping as previously done.

OK florian

3 years agoRemove bogus use of CPU_MAXID and get cpu_info only once.
visa [Tue, 20 Jul 2021 07:53:39 +0000 (07:53 +0000)]
Remove bogus use of CPU_MAXID and get cpu_info only once.

3 years agoRemove unneeded __sync_* library functions from the kernel.
visa [Tue, 20 Jul 2021 07:51:08 +0000 (07:51 +0000)]
Remove unneeded __sync_* library functions from the kernel.

These library functions were added as stopgaps because GCC 4.2.1
lacks the corresponding __sync_* builtins on mips64. However,
the builtins are now provided by Clang.

3 years agoFix trailing whitespace in a few places.
mlarkin [Tue, 20 Jul 2021 00:41:54 +0000 (00:41 +0000)]
Fix trailing whitespace in a few places.

No code change.

3 years agoTweak one comment and nuke a bunch of pointless ones.
krw [Mon, 19 Jul 2021 23:24:54 +0000 (23:24 +0000)]
Tweak one comment and nuke a bunch of pointless ones.

3 years agoAbstract reading the built-in MBR or MBR file into
krw [Mon, 19 Jul 2021 19:46:20 +0000 (19:46 +0000)]
Abstract reading the built-in MBR or MBR file into
a separate function.

No functional change.

3 years agoMBR_protective_mbr() can take a const struct mbr *.
krw [Mon, 19 Jul 2021 19:30:35 +0000 (19:30 +0000)]
MBR_protective_mbr() can take a const struct mbr *.

No functional change.

3 years agoAn MBR knows (mbr_lba_self) where it is supposed to go, no
krw [Mon, 19 Jul 2021 19:23:50 +0000 (19:23 +0000)]
An MBR knows (mbr_lba_self) where it is supposed to go, no
need to pass the value to MBR_write().

Let MBR_write() do the translation from struct mbr to the
struct dos_mbr that will be written to the disk. Thus
eliminating unnecessary struct dos_mbr variables and the
parsing thereof.

No intentional functional change.

3 years agoFix an alignment fault observed on an octeon machine while pppoe(4) was
stsp [Mon, 19 Jul 2021 19:00:58 +0000 (19:00 +0000)]
Fix an alignment fault observed on an octeon machine while pppoe(4) was
attempting to negotiate a large MTU.

Copy the peer's max payload size from the discovery packet with memcpy()
instead of using a pointer to this value's offset in the packet buffer.

tweak and ok visa@
additional testing and ok sthen@

3 years agoMarkup optional ICMP/ICMP6 codes as such
kn [Mon, 19 Jul 2021 16:23:56 +0000 (16:23 +0000)]
Markup optional ICMP/ICMP6 codes as such

Only icmp(4)/icmp6(4) types are required for `icmp-type'/`icmp6-type' rules
while codes are optional.

From Martin Vahlensieck < openbsd at academicsolutions dot ch >, thanks!

3 years agoRemove `ids' from `ipsec_ids_tree' while following ipsp_ids_insert()
mvs [Mon, 19 Jul 2021 14:49:55 +0000 (14:49 +0000)]
Remove `ids' from `ipsec_ids_tree' while following ipsp_ids_insert()
error path. This fixes use-after-free issue. Also fix debug message
mistype pointed by bluhm@ in error path.

ok millert@ bluhm@

3 years agoRevert incorrect tweaks to disk geometry calculations and
krw [Mon, 19 Jul 2021 14:30:08 +0000 (14:30 +0000)]
Revert incorrect tweaks to disk geometry calculations and
non '-b' MBR disk initialization.

Detected by bluhm@'s ever vigilant regress testing.

3 years agodocument X509_CRL_print(3) and X509_CRL_print_fp(3)
schwarze [Mon, 19 Jul 2021 13:16:43 +0000 (13:16 +0000)]
document X509_CRL_print(3) and X509_CRL_print_fp(3)

3 years agodrm/i915/display: Do not zero past infoframes.vsc
jsg [Mon, 19 Jul 2021 10:51:58 +0000 (10:51 +0000)]
drm/i915/display: Do not zero past infoframes.vsc

From Kees Cook
3f9c2a058e61b8df9fef196ad6180fbf9932ed80 in linux 5.10.y/5.10.51
07b72960d2b4a087ff2445e286159e69742069cc in mainline linux

3 years agodrm/amd/display: Reject non-zero src_y and src_x for video planes
jsg [Mon, 19 Jul 2021 10:49:37 +0000 (10:49 +0000)]
drm/amd/display: Reject non-zero src_y and src_x for video planes

From Harry Wentland
c6016936171a7b179b2c478ceb7fbd092ee4f9f8 in linux 5.10.y/5.10.51
c6c6a712199ab355ce333fa5764a59506bb107c1 in mainline linux

3 years agodrm/amd/display: fix incorrrect valid irq check
jsg [Mon, 19 Jul 2021 10:47:20 +0000 (10:47 +0000)]
drm/amd/display: fix incorrrect valid irq check

From Guchun Chen
b13574fa83ac55a9c3aa7f075ef5db62b444f7b5 in linux 5.10.y/5.10.51
e38ca7e422791a4d1c01e56dbf7f9982db0ed365 in mainline linux

3 years agodrm/dp: Handle zeroed port counts in drm_dp_read_downstream_info()
jsg [Mon, 19 Jul 2021 10:45:08 +0000 (10:45 +0000)]
drm/dp: Handle zeroed port counts in drm_dp_read_downstream_info()

From Lyude Paul
2998599fb16cd99b0384d2517bbd409a233a9695 in linux 5.10.y/5.10.51
205bb69a90363541a634a662a599fddb95956524 in mainline linux

3 years agodrm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
jsg [Mon, 19 Jul 2021 10:42:27 +0000 (10:42 +0000)]
drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64

From Tiezhu Yang
0d50d93d05d6571347f3ab9d28d0b80e5d142d81 in linux 5.10.y/5.10.51
c1bfd74bfef77bcefc88d12eaf8996c0dfd51331 in mainline linux

3 years agodrm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()
jsg [Mon, 19 Jul 2021 10:39:54 +0000 (10:39 +0000)]
drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()

From Jing Xiangfeng
7aa28f2f67421d7ba9957275bc211a7782238f31 in linux 5.10.y/5.10.51
9ba85914c36c8fed9bf3e8b69c0782908c1247b7 in mainline linux

3 years agodrm/amdgpu: enable sdma0 tmz for Raven/Renoir(V2)
jsg [Mon, 19 Jul 2021 10:37:21 +0000 (10:37 +0000)]
drm/amdgpu: enable sdma0 tmz for Raven/Renoir(V2)

From Aaron Liu
2674ffcad0aef41425e1a4a40d3508caed989a1a in linux 5.10.y/5.10.51
e2329e74a615cc58b25c42b7aa1477a5e3f6a435 in mainline linux

3 years agodrm/amdgpu: Update NV SIMD-per-CU to 2
jsg [Mon, 19 Jul 2021 10:35:16 +0000 (10:35 +0000)]
drm/amdgpu: Update NV SIMD-per-CU to 2

From Joseph Greathouse
8f933b27cbf1cd176f0a73ddeae19fae5e9bc189 in linux 5.10.y/5.10.51
aa6158112645aae514982ad8d56df64428fcf203 in mainline linux

3 years agodrm/amdkfd: Walk through list with dqm lock hold
jsg [Mon, 19 Jul 2021 10:33:03 +0000 (10:33 +0000)]
drm/amdkfd: Walk through list with dqm lock hold

From xinhui pan
4cd713e48c272a80af935424afaa607ea125aed4 in linux 5.10.y/5.10.51
56f221b6389e7ab99c30bbf01c71998ae92fc584 in mainline linux

3 years agodrm/amdgpu: fix bad address translation for sienna_cichlid
jsg [Mon, 19 Jul 2021 10:30:39 +0000 (10:30 +0000)]
drm/amdgpu: fix bad address translation for sienna_cichlid

From Stanley.Yang
a2122e07920456e5d43f32e61d52be59634ddcab in linux 5.10.y/5.10.51
6ec598cc9dfbf40433e94a2ed1a622e3ef80268b in mainline linux

3 years agodrm/amdkfd: Fix circular lock in nocpsch path
jsg [Mon, 19 Jul 2021 10:27:52 +0000 (10:27 +0000)]
drm/amdkfd: Fix circular lock in nocpsch path

From Amber Lin
0e72b151e394106ad3e3d5bebd1118952970047a in linux 5.10.y/5.10.51
a7b2451d31cfa2e8aeccf3b35612ce33f02371fc in mainline linux

3 years agodrm/amdkfd: fix circular locking on get_wave_state
jsg [Mon, 19 Jul 2021 10:26:13 +0000 (10:26 +0000)]
drm/amdkfd: fix circular locking on get_wave_state

From Jonathan Kim
cd29db48bb65e53efe4b05c75e575c5f1af5ddaf in linux 5.10.y/5.10.51
63f6e01237257e7226efc5087f3f0b525d320f54 in mainline linux

3 years agodrm/amd/display: Verify Gamma & Degamma LUT sizes in amdgpu_dm_atomic_check
jsg [Mon, 19 Jul 2021 10:24:06 +0000 (10:24 +0000)]
drm/amd/display: Verify Gamma & Degamma LUT sizes in amdgpu_dm_atomic_check

From Mark Yacoub
a5f8862967c453aff5b32883d1b6be8e2009e4f0 in linux 5.10.y/5.10.51
03fc4cf45d30533d54f0f4ebc02aacfa12f52ce2 in mainline linux

3 years agodrm/amdkfd: use allowed domain for vmbo validation
jsg [Mon, 19 Jul 2021 10:21:09 +0000 (10:21 +0000)]
drm/amdkfd: use allowed domain for vmbo validation

From Nirmoy Das
378c156f9dd0f0e758513c38e33311ae3e5540b2 in linux 5.10.y/5.10.51
bc05716d4fdd065013633602c5960a2bf1511b9c in mainline linux

3 years agodrm/amd/display: Fix off-by-one error in DML
jsg [Mon, 19 Jul 2021 10:19:12 +0000 (10:19 +0000)]
drm/amd/display: Fix off-by-one error in DML

From Wesley Chalmers
c71de31b2e0f4ef71cc69ba841aeac12519b3607 in linux 5.10.y/5.10.51
e4e3678260e9734f6f41b4325aac0b171833a618 in mainline linux

3 years agodrm/amd/display: Set DISPCLK_MAX_ERRDET_CYCLES to 7
jsg [Mon, 19 Jul 2021 10:17:06 +0000 (10:17 +0000)]
drm/amd/display: Set DISPCLK_MAX_ERRDET_CYCLES to 7

From Wesley Chalmers
afa06442d23d32e95e3336cf8ff366bdd8d590ee in linux 5.10.y/5.10.51
3577e1678772ce3ede92af3a75b44a4b76f9b4ad in mainline linux

3 years agodrm/amd/display: Release MST resources on switch from MST to SST
jsg [Mon, 19 Jul 2021 10:15:04 +0000 (10:15 +0000)]
drm/amd/display: Release MST resources on switch from MST to SST

From Vladimir Stempen
02f444321b3a0f3f94e34329f8aafa814c45b8e4 in linux 5.10.y/5.10.51
3f8518b60c10aa96f3efa38a967a0b4eb9211ac0 in mainline linux

3 years agodrm/amd/display: Update scaling settings on modeset
jsg [Mon, 19 Jul 2021 10:12:33 +0000 (10:12 +0000)]
drm/amd/display: Update scaling settings on modeset

From Roman Li
01d6a693196595d356f0f5e42ab155c293470676 in linux 5.10.y/5.10.51
c521fc316d12fb9ea7b7680e301d673bceda922e in mainline linux

3 years agodrm/amd/display: Fix DCN 3.01 DSCCLK validation
jsg [Mon, 19 Jul 2021 10:10:26 +0000 (10:10 +0000)]
drm/amd/display: Fix DCN 3.01 DSCCLK validation

From Nikola Cornij
57c63b47d6f188b44d93d1602bd24d8d9a9131f6 in linux 5.10.y/5.10.51
346cf627fb27c0fea63a041cedbaa4f31784e504 in mainline linux

3 years agodrm/amdgpu: remove unsafe optimization to drop preamble ib
jsg [Mon, 19 Jul 2021 10:08:03 +0000 (10:08 +0000)]
drm/amdgpu: remove unsafe optimization to drop preamble ib

From Jiansong Chen
8fa6473a61ecc9972ad543d8ba1d927d442d1f67 in linux 5.10.y/5.10.51
7d9c70d23550eb86a1bec1954ccaa8d6ec3a3328 in mainline linux

3 years agodrm/amd/display: Avoid HDCP over-read and corruption
jsg [Mon, 19 Jul 2021 10:05:24 +0000 (10:05 +0000)]
drm/amd/display: Avoid HDCP over-read and corruption

From Kees Cook
c5b518f4b98dbb2bc31b6a55e6aaa1e0e2948f2e in linux 5.10.y/5.10.51
06888d571b513cbfc0b41949948def6cb81021b2 in mainline linux

3 years agodrm/sched: Avoid data corruptions
jsg [Mon, 19 Jul 2021 10:03:08 +0000 (10:03 +0000)]
drm/sched: Avoid data corruptions

From Andrey Grodzovsky
0687411e2a8858262de2fc4a1d576016fd77292e in linux 5.10.y/5.10.51
0b10ab80695d61422337ede6ff496552d8ace99d in mainline linux

3 years agodrm/scheduler: Fix hang when sched_entity released
jsg [Mon, 19 Jul 2021 10:01:10 +0000 (10:01 +0000)]
drm/scheduler: Fix hang when sched_entity released

From Andrey Grodzovsky
5ed8c298b2e140c640af8813a490fb4d77165e97 in linux 5.10.y/5.10.51
c61cdbdbffc169dc7f1e6fe94dfffaf574fe672a in mainline linux

3 years agodrm/amd/display: fix use_max_lb flag for 420 pixel formats
jsg [Mon, 19 Jul 2021 09:58:16 +0000 (09:58 +0000)]
drm/amd/display: fix use_max_lb flag for 420 pixel formats

From Dmytro Laktyushkin
3ca86d44b9023cd96c893d6dd90aacbca90e4d74 in linux 5.10.y/5.10.51
8809a7a4afe90ad9ffb42f72154d27e7c47551ae in mainline linux

3 years agodrm/amd/amdgpu/sriov disable all ip hw status by default
jsg [Mon, 19 Jul 2021 09:55:11 +0000 (09:55 +0000)]
drm/amd/amdgpu/sriov disable all ip hw status by default

From Jack Zhang
b025bc07c94770ab5ca68a8b2ead12628c2a0698 in linux 5.10.y/5.10.51
95ea3dbc4e9548d35ab6fbf67675cef8c293e2f5 in mainline linux

3 years agodrm/amd/display: fix HDCP reset sequence on reinitialize
jsg [Mon, 19 Jul 2021 09:51:46 +0000 (09:51 +0000)]
drm/amd/display: fix HDCP reset sequence on reinitialize

From Brandon Syu
fb7479d64d77a3bb0ee992f9e450cf52d56c6b2c in linux 5.10.y/5.10.51
99c248c41c2199bd34232ce8e729d18c4b343b64 in mainline linux

3 years agosync kfd_ioctl.h with linux 5.10.y
jsg [Mon, 19 Jul 2021 09:22:32 +0000 (09:22 +0000)]
sync kfd_ioctl.h with linux 5.10.y

3 years agoUse SUDO when setting up hostkey.
dtucker [Mon, 19 Jul 2021 08:48:33 +0000 (08:48 +0000)]
Use SUDO when setting up hostkey.

3 years agoMop up dtls1_get_ccs_header() and struct ccs_header_st.
jsing [Mon, 19 Jul 2021 08:42:24 +0000 (08:42 +0000)]
Mop up dtls1_get_ccs_header() and struct ccs_header_st.

All this code does is read one byte from memory with an unknown length,
potentially being a one byte overread... and then nothing is actually done
with the value.

ok tb@

3 years agoInline DTLS1_CCS_HEADER_LENGTH rather than having a single use variable.
jsing [Mon, 19 Jul 2021 08:39:28 +0000 (08:39 +0000)]
Inline DTLS1_CCS_HEADER_LENGTH rather than having a single use variable.

ok tb@

3 years agoIncrease time margin for rekey tests. Should help reliability on very
dtucker [Mon, 19 Jul 2021 05:08:54 +0000 (05:08 +0000)]
Increase time margin for rekey tests.  Should help reliability on very
heavily loaded hosts.

3 years agoEnsure that all returned SSHFP records for the specified host name and
dtucker [Mon, 19 Jul 2021 03:13:28 +0000 (03:13 +0000)]
Ensure that all returned SSHFP records for the specified host name and
hostkey type match instead of only one.  While there, simplify the code
somewhat and add some debugging.  Based on discussion in bz#3322, ok djm@.

3 years agoAdd test for host key verification via SSHFP records. This requires
dtucker [Mon, 19 Jul 2021 02:46:34 +0000 (02:46 +0000)]
Add test for host key verification via SSHFP records.  This requires
some external setup to operate so is disabled by default (see
comments in sshfp-connect.sh).

3 years agoAdd ed25519 key and test SSHFP export of it. Only test RSA SSHFP export
dtucker [Mon, 19 Jul 2021 02:29:28 +0000 (02:29 +0000)]
Add ed25519 key and test SSHFP export of it.  Only test RSA SSHFP export
if we have RSA functionality compiled in.

3 years agoPut dh_set_moduli_file call inside ifdef WITH_OPENSSL. Fixes build with
dtucker [Mon, 19 Jul 2021 02:21:50 +0000 (02:21 +0000)]
Put dh_set_moduli_file call inside ifdef WITH_OPENSSL.  Fixes build with
OPENSSL=no.

3 years agoGroup keygen tests together.
dtucker [Mon, 19 Jul 2021 00:16:26 +0000 (00:16 +0000)]
Group keygen tests together.

3 years agoAdd test for ssh-keygen printing of SSHFP records.
dtucker [Sun, 18 Jul 2021 23:10:10 +0000 (23:10 +0000)]
Add test for ssh-keygen printing of SSHFP records.

3 years agoMarkup promises with Cm not Va
kn [Sun, 18 Jul 2021 23:02:57 +0000 (23:02 +0000)]
Markup promises with Cm not Va

These are not variable names but rather keywords (as port of one big
string).

I originally changed this such that `.Bl -tag' would automatically tag them
and thus allow ":t id" in the manual pager;  since schwarze's recent
mandoc(1) commit this is no longer needed as `.Va' gained tagging with it,
but its use is incorrect here nonetheless, so still change it to the more
appropiate `.Cm'.

Input jmc schwarze

3 years agoDon't save the prt_scyl/prt_ecyl values, change them, use them
krw [Sun, 18 Jul 2021 21:40:13 +0000 (21:40 +0000)]
Don't save the prt_scyl/prt_ecyl values, change them, use them
and then restore them. Just change/use the saved values and skip
the restoring.

Allows PRT_make() to add 'const' to its struct mbr parameter, and
thus allows MBR_make() to add 'const' to its struct mbr
parameter.

No intentional functional change.

3 years agoIntroduce and use garbage collector for 'ipsec_ids' struct entities
mvs [Sun, 18 Jul 2021 18:19:22 +0000 (18:19 +0000)]
Introduce and use garbage collector for 'ipsec_ids' struct entities
destruction instead of using per-entity timeout. This fixes the races
between ipsp_ids_insert(), ipsp_ids_free() and ipsp_ids_timeout().

ipsp_ids_insert() can't stop ipsp_ids_timeout() timeout handler which is
already running and awaiting netlock to be released, so reused `ids' will
be silently removed in this case.

ipsp_ids_free() can't determine is ipsp_ids_timeout() timeout handler
running because timeout_del(9) called by ipsp_ids_insert() clears it's
triggered state. So ipsp_ids_timeout() could be scheduled to run twice in
this case.

Also hrvoje@ reported about ipsec(4) throughput increased with this diff
so it seems we caught significant count of ipsp_ids_insert() races.

tests and feedback by hrvoje@
ok bluhm@

3 years agoZap dhclient bits, mention resolvd
kn [Sun, 18 Jul 2021 17:44:46 +0000 (17:44 +0000)]
Zap dhclient bits, mention resolvd

OK deraadt

3 years agoMake GPT_read() obtain and validate the on-disk MBR itself, via
krw [Sun, 18 Jul 2021 15:28:37 +0000 (15:28 +0000)]
Make GPT_read() obtain and validate the on-disk MBR itself, via
MBR_read(), and report success/failure.

Simplifies logic and makes clearer that the protective MBR is a
required part of a GPT.

With the standardization on 0/-1 return values for helper
functions, rename 'valid' to 'error' in GPT_read() to make logic
less mind bending.

No functional change.

3 years agoRemove hackery around /tmp/i/resolv.conf*. In particular "lookup file bind"
deraadt [Sun, 18 Jul 2021 15:18:47 +0000 (15:18 +0000)]
Remove hackery around /tmp/i/resolv.conf*.  In particular "lookup file bind"
is required because of TLS servername for contacting ftp.openbsd.org, and
there is no point doing that in resolv.conf.tail because it is no longer used.
ok florian kn

3 years agoThe IPsec authentication before decryption used a different replay
bluhm [Sun, 18 Jul 2021 14:38:20 +0000 (14:38 +0000)]
The IPsec authentication before decryption used a different replay
counter than after decryption.  This could result in "esp_input_cb:
authentication failed for packet in SA" errors.  As we run crypto
operations async, thousands of packets are stored in the crypto
task.  During the queueing the replay counter of the tdb can change.
Then the higher 32 bits may increment although the lower 32 bits
did not wrap.
checkreplaywindow() must be called twice per packet with the same
replay counter.  Store the value in struct tdb_crypto while dangling
in the task queue and doing crypto operations.
tested by Hrvoje Popovski; joint work with tobhe@

3 years agoDo not ask iwx(4) firmware to send probe requests on passive channels.
stsp [Sun, 18 Jul 2021 13:07:13 +0000 (13:07 +0000)]
Do not ask iwx(4) firmware to send probe requests on passive channels.

This seems to fix a problem where firmware becomes unresponsive after
association and eventually raises a fatal error. iwx(4) already has a
workaround in place for this: We always ask firmware to perform a
passive scan, on any channel.
This change is a better fix from iwm(4) CVS commit jJFMeXcos9GOqFQz.
However, the current workaround will stay in place for now, until we
have evidence that active scanning is working on iwx(4) devices.
I will try to organize an out-of-tree round of testing for this.

3 years agoPut MBR_parse() invocation inside MBR_read() instead of always
krw [Sun, 18 Jul 2021 12:41:00 +0000 (12:41 +0000)]
Put MBR_parse() invocation inside MBR_read() instead of always
following an invocation of MBR_read() with a call to MBR_parse().

No functional change.

3 years agoClear the "persistence bit" on iwx(4) devices during hardware init.
stsp [Sun, 18 Jul 2021 12:39:16 +0000 (12:39 +0000)]
Clear the "persistence bit" on iwx(4) devices during hardware init.

According to iwlwifi commit messages this fixes an edge case where
devices fail to resume after system suspend.
See Linux commit 8954e1eb2270fa2effffd031b4839253952c76f2

Same fix was made for iwm(4) in CVS commit x0XTNdEmudy5oBR4

3 years agoIgnore routers option when a classless static routes option is present
florian [Sun, 18 Jul 2021 12:33:41 +0000 (12:33 +0000)]
Ignore routers option when a classless static routes option is present
as mandated by RFC3442.
Pointed out by, initial diff, testing & OK bket@

3 years agoSet MIMO-related flags in the iwx(4) ADD_STA command.
stsp [Sun, 18 Jul 2021 12:21:49 +0000 (12:21 +0000)]
Set MIMO-related flags in the iwx(4) ADD_STA command.

Not sure how we ended up missing these. MIMO apparently works without the
flags set, and setting them doesn't seem to have any immediately visible
effect on firmware. But let's be consistent with iwm(4) and iwlwifi.

3 years agoNewer iwx(4) firmware doesn't like the DQA command anymore.
stsp [Sun, 18 Jul 2021 12:03:57 +0000 (12:03 +0000)]
Newer iwx(4) firmware doesn't like the DQA command anymore.

Check whether firmware advertises DQA support before sending the DQA
command during device initialization. Newer firmware will raise a
fatal error otherwise. The Tx queue API has been redesigned yet again.

3 years agoFix wrong usage of iwx_lookup_cmd_ver() in iwx_send_soc_conf().
stsp [Sun, 18 Jul 2021 11:56:11 +0000 (11:56 +0000)]
Fix wrong usage of iwx_lookup_cmd_ver() in iwx_send_soc_conf().

Callers are supposed to check whether iwx_lookup_cmd_ver() returns
CMD_VER_UNKNOWN, and this check was missing here. Fortunately, the
buggy check was part of a condition which also requires the
low_latency_xtal constant to be set. We do not yet support devices
where low_latency_xtal is non-zero, so the bug never triggered.

3 years agovmd(8): remove invalid errno values from config_setvm
dv [Sun, 18 Jul 2021 11:55:45 +0000 (11:55 +0000)]
vmd(8): remove invalid errno values from config_setvm

Refactor config_setvm to directly return error code on failure
instead of returning -1 and setting errno. It was setting unsupported
values not defined in <errno.h>.

OK mlarkin@

3 years agoSupport auto-tagging for ".It Va".
schwarze [Sun, 18 Jul 2021 11:40:58 +0000 (11:40 +0000)]
Support auto-tagging for ".It Va".

This combination is somewhat rare because few libraries expose so many
global variables that they need a list to enumerate them, but when the
idiom does occur, tagging the variable names is generally useful.
For example, this helps awk(1), dc(1), make(1), rc.subr(8), ...

Missing feature reported and patch reviewed, tested, and OK'ed by kn@.

3 years agoFix iwx(4) PHY context updates for newer firmware versions.
stsp [Sun, 18 Jul 2021 11:40:31 +0000 (11:40 +0000)]
Fix iwx(4) PHY context updates for newer firmware versions.

Firmware which advertises the BINDING_CDB_SUPPORT capability
needs a remove+add dance when the channel band has changed.

See Linux commit 730a18912bcbde0b94ae7f1b554a9908b3424a22
and Linux commit 91109f42d0ad0c0c282d1fa1257a1548977aa895

The same fix was applied to iwm(4) in CVS commit uQ0WjqRUp03vxHg1

3 years agoLet the mandoc.db(5) test suite work with parallel make (make -j),
schwarze [Sun, 18 Jul 2021 11:25:47 +0000 (11:25 +0000)]
Let the mandoc.db(5) test suite work with parallel make (make -j),
by making sure that different tests use different directory names
for their work such that they do not collide.
As a side benefit, this allows keeping the complete working directories
of the tests until "make cleandir" is run, which may occasionally
help debugging when something breaks.

The failure with make -j was detected and reported by anton@,
who also reviewed, tested, and OK'ed this somewhat lengthy patch.

3 years agoDocument dhcpleased(8) and slaacd(8) besides dhclient(8) as DNS source
kn [Sun, 18 Jul 2021 11:18:38 +0000 (11:18 +0000)]
Document dhcpleased(8) and slaacd(8) besides dhclient(8) as DNS source

Zap the obsolete dhclient.conf(5) supersede quirk while here.

Feedback OK florian

3 years agoFollow dhclient -> dhcpleased switch, reduce supported DHCP statements
kn [Sun, 18 Jul 2021 11:08:34 +0000 (11:08 +0000)]
Follow dhclient -> dhcpleased switch, reduce supported DHCP statements

dhcpleased(8) does not support every statement dhclient(8) does, so reflect
the status quo simplify things to the smaller set of statements that still
suffice to use autoinstall(8).

While here, speak of dhcp-options(5) and "DHCP lease" instead of
dhcpd.conf statements and the installer's specific DHCP client/parser.

OK florian

3 years agomake the printf on skipping reset with gen7/gen8 debug only
jsg [Sun, 18 Jul 2021 10:20:06 +0000 (10:20 +0000)]
make the printf on skipping reset with gen7/gen8 debug only

With the 5.10 drm on vlv/ivb/hsw/bdw inteldrm has been known to reset
the chip when a gpu hang is falsely detected.  This appears to be
related to the workarounds for cleaning up after switching hardware
contexts.

intel_gt_reset *NOTICE* [drm] Resetting chip for context closure in glsl-uniform-int<99177>
mark_guilty *NOTICE* [drm] glsl-uniform-int[97885] context reset due to GPU hang

A local change skips the reset (which kills Xorg) on gen7/gen8.
The printf is in that path.

3 years agoUpdate the list of firmware files used by iwm(4).
stsp [Sun, 18 Jul 2021 09:37:49 +0000 (09:37 +0000)]
Update the list of firmware files used by iwm(4).

3 years agoregen
jsg [Sun, 18 Jul 2021 05:02:37 +0000 (05:02 +0000)]
regen

3 years agoadd devices from ASUS ROG Strix G513QY and Alienware Aurora R10
jsg [Sun, 18 Jul 2021 05:02:08 +0000 (05:02 +0000)]
add devices from ASUS ROG Strix G513QY and Alienware Aurora R10

3 years agoThe first think MBR_init() does is memset(0) the gpt header and gpt
krw [Sat, 17 Jul 2021 21:47:56 +0000 (21:47 +0000)]
The first think MBR_init() does is memset(0) the gpt header and gpt
partition array. So no need to memset(0) the gpt header before each
MBR_init() invocation.

No functional change.

3 years agoRemove setpassent(3) leftovers
kn [Sat, 17 Jul 2021 20:46:02 +0000 (20:46 +0000)]
Remove setpassent(3) leftovers

Those should have gone with the switch to uid_from_user(3) in r1.95;

OK millert

3 years agoDon't document systems which rewrite/change resolv.conf. Those systems can
deraadt [Sat, 17 Jul 2021 17:14:29 +0000 (17:14 +0000)]
Don't document systems which rewrite/change resolv.conf.  Those systems can
document their actions in their own manual pages.
ok kn

3 years agoFollow up on dhclient(8) to dhcpleased(8)/resolvd(8) switch
kn [Sat, 17 Jul 2021 15:28:31 +0000 (15:28 +0000)]
Follow up on dhclient(8) to dhcpleased(8)/resolvd(8) switch

hostname.if(5)'s "dhcp" no longer triggers dhclient in any way, so suggest
the simple "inet autoconf" instead while mentioning "dhcp" as an alias for
that.

Add markup to changed sentences while here.
There is more room for improvemen in this manual.

Feedback deraadt, "go ahead"

3 years agoMake the mandoc.db(5) tests work with BSDOBJDIR set,
schwarze [Sat, 17 Jul 2021 14:23:02 +0000 (14:23 +0000)]
Make the mandoc.db(5) tests work with BSDOBJDIR set,
by stripping initial parts of paths the do not matter
for the features being tested from man(1) output.

Problem found and reported by, solution developed together with, and
OK anton@

3 years agoNuke a bunch of Capt. Obvious or misleading comments.
krw [Sat, 17 Jul 2021 14:16:34 +0000 (14:16 +0000)]
Nuke a bunch of Capt. Obvious or misleading comments.

No functional change.

3 years agoChange edit/gedit/setpid/gsetpid to return 0/-1 to indicate success or failure
krw [Sat, 17 Jul 2021 13:37:01 +0000 (13:37 +0000)]
Change edit/gedit/setpid/gsetpid to return 0/-1 to indicate success or failure
as all other helpers do.

Makes it clear that X* functions are in charge of deciding which CMD_* value
they return to main edting loop. Reduces unnecessary copying/restoring of
original partition information.

No intentional functional change.

3 years agoIgnore unwind socket with kevent(2) under SMALL
kn [Sat, 17 Jul 2021 03:31:31 +0000 (03:31 +0000)]
Ignore unwind socket with kevent(2) under SMALL

All other unwind related bits are under #ifndef SMALL already,
so complete that.

OK florian

3 years agowrap some long lines
djm [Sat, 17 Jul 2021 00:38:11 +0000 (00:38 +0000)]
wrap some long lines

3 years agofix sftp on ControlPersist connections, broken by recent SessionType
djm [Sat, 17 Jul 2021 00:36:53 +0000 (00:36 +0000)]
fix sftp on ControlPersist connections, broken by recent SessionType
change; spotted by sthen@

3 years agosync
jsg [Sat, 17 Jul 2021 00:02:58 +0000 (00:02 +0000)]
sync

3 years agodrm/amdgpu: add another Renoir DID
jsg [Fri, 16 Jul 2021 23:51:38 +0000 (23:51 +0000)]
drm/amdgpu: add another Renoir DID

From Jinzhou Su
775da83005cb61d4c213c636df9337da05714ff1 in mainline linux

3 years agoamdgpu: Add Missing Sienna Cichlid DID
jsg [Fri, 16 Jul 2021 23:47:58 +0000 (23:47 +0000)]
amdgpu: Add Missing Sienna Cichlid DID

From Ori Messinger
d26bbbcc160f6d9feabed73dca62b9e8b86671b4 in mainline linux

3 years agoChange PRT_protected_guid() to take native order uuid's instead of little endian
krw [Fri, 16 Jul 2021 22:50:43 +0000 (22:50 +0000)]
Change PRT_protected_guid() to take native order uuid's instead of little endian
uuid's. This brings it into line with all the other PRT_ functions taking uuid
parameters.

While adapting gsetid(), introduce separate partition type and partition guid
variables to make the logic clearer.

No intentional functional change.

3 years agovmd(8): simplify vcpu logic, removing uart & vionet reads
dv [Fri, 16 Jul 2021 16:21:22 +0000 (16:21 +0000)]
vmd(8): simplify vcpu logic, removing uart & vionet reads

Remove legacy state handling on the ns8250 and virtio network devices
originally put in place before using libevent for async device
events. The vcpu thread doesn't need to process device data as it is
handled by the libevent thread.

This has the benefit of simplifying some of the message passing
between threads introduced to the ns8250 uart since both the vcpu
and libevent threads were processing read events.

No functional change intended. Tested by many, including abieber@,
weerd@, Mischa Peters, and Matthias Schmidt. (Thanks.)

OK mlarkin@

3 years agothis media can also use dhcpleased now
deraadt [Fri, 16 Jul 2021 15:26:24 +0000 (15:26 +0000)]
this media can also use dhcpleased now

3 years agoSwitch from dhclient to dhcpleased in the installer.
florian [Fri, 16 Jul 2021 15:25:31 +0000 (15:25 +0000)]
Switch from dhclient to dhcpleased in the installer.
More cleanup is needed from a real ksh hacker, but looks already
pretty good to kn.

OK deraadt

3 years agoCreate working directories earlier so that resolvd can write
florian [Fri, 16 Jul 2021 15:24:44 +0000 (15:24 +0000)]
Create working directories earlier so that resolvd can write
resolv.conf.shadow and start dhcpleased/resolvd.
OK deraadt

3 years agoReplace dhclient with dhcpleased/resolvd on the ramdisk.
florian [Fri, 16 Jul 2021 15:24:08 +0000 (15:24 +0000)]
Replace dhclient with dhcpleased/resolvd on the ramdisk.
OK deraadt who also helped making some space.

3 years agocreate lease directory for dhcpleased in the ramdisk
florian [Fri, 16 Jul 2021 15:22:43 +0000 (15:22 +0000)]
create lease directory for dhcpleased in the ramdisk
OK deraadt

3 years agoThe installer plays weird tricks with /etc/resolv.conf and symlinks it
florian [Fri, 16 Jul 2021 15:22:12 +0000 (15:22 +0000)]
The installer plays weird tricks with /etc/resolv.conf and symlinks it
from /tmp/i. Work around this in resolvd so that it can correctly
update the file until this is fixed in install.sub.

probably grudgingly OK deraadt

3 years agoswitch to dhcpleased/resolvd in base
florian [Fri, 16 Jul 2021 15:21:41 +0000 (15:21 +0000)]
switch to dhcpleased/resolvd in base
OK deraadt

3 years agoImprove comments in IPsec replay window calculation.
bluhm [Fri, 16 Jul 2021 15:08:39 +0000 (15:08 +0000)]
Improve comments in IPsec replay window calculation.
OK tobhe@

3 years agoUpdate the default block size in the manual, in sndiod.c r1.37 it was
sthen [Fri, 16 Jul 2021 15:05:58 +0000 (15:05 +0000)]
Update the default block size in the manual, in sndiod.c r1.37 it was
reduced to 480 frames. ok ratchov@