openbsd
16 months agodrm/amdgpu: Don't set struct drm_driver.output_poll_changed
jsg [Thu, 22 Jun 2023 05:19:01 +0000 (05:19 +0000)]
drm/amdgpu: Don't set struct drm_driver.output_poll_changed

From Thomas Zimmermann
4b4cae8e4b37c7ad4d9721dbda060a62e49e3c17 in linux-6.1.y/6.1.35
0e3172bac3f43759719384403fe2d1e4c61f87e0 in mainline linux

16 months agodrm/amdgpu: add missing radeon secondary PCI ID
jsg [Thu, 22 Jun 2023 05:17:31 +0000 (05:17 +0000)]
drm/amdgpu: add missing radeon secondary PCI ID

From Alex Deucher
21863dc45aed8d68a2573cce032ecbc8fe7c5bf5 in linux-6.1.y/6.1.35
e61f67749b351c19455ce3085af2ae9af80023bc in mainline linux

16 months agodrm/amd/pm: workaround for compute workload type on some skus
jsg [Thu, 22 Jun 2023 05:16:06 +0000 (05:16 +0000)]
drm/amd/pm: workaround for compute workload type on some skus

From Kenneth Feng
6f5b5ce9397d91b0a8bc8d15dc8fd72bc0aacaa4 in linux-6.1.y/6.1.35
7ca302d488f80cf4529620acc1c545f9022d8bb8 in mainline linux

16 months agodrm/amd: Tighten permissions on VBIOS flashing attributes
jsg [Thu, 22 Jun 2023 05:14:26 +0000 (05:14 +0000)]
drm/amd: Tighten permissions on VBIOS flashing attributes

From Mario Limonciello
b69a10df900386871703a4cc3be974485f52ff7c in linux-6.1.y/6.1.35
7ab1a4913d0051cf5196ef7987b5fa42c25e13b6 in mainline linux

16 months agodrm/amd: Make sure image is written to trigger VBIOS image update flow
jsg [Thu, 22 Jun 2023 05:10:03 +0000 (05:10 +0000)]
drm/amd: Make sure image is written to trigger VBIOS image update flow

From Mario Limonciello
b2706d862b6577b8218bdef1c238e175624b906d in linux-6.1.y/6.1.35
3eb1a3a04056ba3df3205e169b8acc9da0c65a94 in mainline linux

16 months agodrm/amd/display: edp do not add non-edid timings
jsg [Thu, 22 Jun 2023 05:08:30 +0000 (05:08 +0000)]
drm/amd/display: edp do not add non-edid timings

From Hersen Wu
ee8c6580c3106b0061c7cdff1804e5a1f1e1d7fe in linux-6.1.y/6.1.35
e749dd10e5f292061ad63d2b030194bf7d7d452c in mainline linux

16 months agodrm/amdgpu: vcn_4_0 set instance 0 init sched score to 1
jsg [Thu, 22 Jun 2023 05:07:09 +0000 (05:07 +0000)]
drm/amdgpu: vcn_4_0 set instance 0 init sched score to 1

From Sonny Jiang
5d1fdfb3d185a9726478ba174235eff7c16f1101 in linux-6.1.y/6.1.35
9db5ec1ceb5303398ec4f899d691073d531257c3 in mainline linux

16 months agodrm:amd:amdgpu: Fix missing buffer object unlock in failure path
jsg [Thu, 22 Jun 2023 05:05:56 +0000 (05:05 +0000)]
drm:amd:amdgpu: Fix missing buffer object unlock in failure path

From Sukrut Bellary
8ca9880735b0a33a4ff54328d6c5eb60fe2b0a6d in linux-6.1.y/6.1.35
60ecaaf54886b0642d5c4744f7fbf1ff0d6b3e42 in mainline linux

16 months agodrm: panel-orientation-quirks: Change Air's quirk to support Air Plus
jsg [Thu, 22 Jun 2023 05:04:19 +0000 (05:04 +0000)]
drm: panel-orientation-quirks: Change Air's quirk to support Air Plus

From Maya Matuszczyk
c45aed74318e65b8da938a593c124ad2ee1a1e66 in linux-6.1.y/6.1.35
1aa7f416175619e0286fddc5fc44e968b06bf2aa in mainline linux

16 months agoRemove extra trailing whitespace
mlarkin [Wed, 21 Jun 2023 23:24:10 +0000 (23:24 +0000)]
Remove extra trailing whitespace

ok stsp

16 months agoksh: escape control chars when displaying file name completions.
millert [Wed, 21 Jun 2023 22:22:08 +0000 (22:22 +0000)]
ksh: escape control chars when displaying file name completions.
If there are multiple matches when using autocomplete, the list of
matching file names was output as-is.  However, for a single match,
control characters are escaped before the file name is displayed.
This makes the behavior more consistent by escaping control chars
in the list of matches too.  Discussed with deraadt@, OK op@

16 months agoRevert "schedcpu, uvm_meter(9): make uvm_meter() an independent timeout"
cheloha [Wed, 21 Jun 2023 21:16:21 +0000 (21:16 +0000)]
Revert "schedcpu, uvm_meter(9): make uvm_meter() an independent timeout"

Sometimes causes boot hang after mounting root partition.

Thread 1: https://marc.info/?l=openbsd-misc&m=168736497407357&w=2
Thread 2: https://marc.info/?l=openbsd-misc&m=168737429214370&w=2

16 months agoclear errno before strtoull as it may already be set to ERANGE
op [Wed, 21 Jun 2023 17:59:24 +0000 (17:59 +0000)]
clear errno before strtoull as it may already be set to ERANGE

noticed and ok millert@

16 months agoavoid truncation of filtered data lines
op [Wed, 21 Jun 2023 17:56:26 +0000 (17:56 +0000)]
avoid truncation of filtered data lines

Don't copy in a buffer the filter' output for parsing as we may truncate
filter-dataline (i.e. the mail body).  Instead, parse the string by
advancing the pointer without copying or modifications.

Issue reported by Joachim Schneider on the OpenSMTPD-portable
repository.

ok millert@

16 months agoUse recallocarray() consistently. recallocarray() was introduced to simplify
claudio [Wed, 21 Jun 2023 13:11:49 +0000 (13:11 +0000)]
Use recallocarray() consistently. recallocarray() was introduced to simplify
exactly this use case where the new memory needs to be zeroed during resize.
Since recallocarray() takes care of all this there is no need to bzero()
memory anymore.

OK tb@ millert@

16 months agoAdd a parameter 'action' to mpfree() so it can optionally discard
krw [Wed, 21 Jun 2023 12:50:09 +0000 (12:50 +0000)]
Add a parameter 'action' to mpfree() so it can optionally discard
or keep the memory pointed at by the char ** parameter.

Allows mpfree() to be used against the global mountpoints[] and
eliminates a couple of manual loops to free the current contents
of mountpoints[].

No intentional functional change.

16 months agoadd "fib reload" support to ospf6d/ospf6ctl, and trigger it
sthen [Wed, 21 Jun 2023 09:47:03 +0000 (09:47 +0000)]
add "fib reload" support to ospf6d/ospf6ctl, and trigger it
automatically on a timeout after RTM_DESYNC (i.e. route socket
overflow). ported across from ospfd. fixes/ok claudio@

(it's much harder to overflow the routing socket buffer these
days since it was bumped to 2MB, but still happens occasionally
on a busy machine).

16 months agoProvide optimised bn_clzw() for aarch64.
jsing [Wed, 21 Jun 2023 07:56:43 +0000 (07:56 +0000)]
Provide optimised bn_clzw() for aarch64.

16 months agoSimplify and clean up the code. Try to use more ibuf idioms but the
claudio [Wed, 21 Jun 2023 07:54:54 +0000 (07:54 +0000)]
Simplify and clean up the code. Try to use more ibuf idioms but the
mix of types used in these functions make this rather hard.
The expected data checks are still not great but a step in the right
direction.
OK tb@

16 months agoConvert string2binary() to use new ibuf api instead of working with an
claudio [Wed, 21 Jun 2023 07:49:24 +0000 (07:49 +0000)]
Convert string2binary() to use new ibuf api instead of working with an
extra buffer first.
OK tb@

16 months agoProvide and use bn_clzw() in place of bn_word_clz().
jsing [Wed, 21 Jun 2023 07:48:41 +0000 (07:48 +0000)]
Provide and use bn_clzw() in place of bn_word_clz().

On some architectures, we can provide an optimised (often single
instruction) count-leading-zero implementation. In order to do this
effectively, provide bn_clzw() as a static inline that can be replaced
by an architecture specific version. The default implementation defers
to the bn_word_clz() function (which may also be architecture specific).

ok tb@

16 months agoUpdate ospf6d to use new ibuf api.
claudio [Wed, 21 Jun 2023 07:45:47 +0000 (07:45 +0000)]
Update ospf6d to use new ibuf api.

This mostly moves away from memcpy(ibuf_seek(buf, off, size), data, size) to
ibuf_set(buf, off, data, size). Also ibuf_reserve() is replaced with
ibuf_add_zero().

OK tb@

16 months agoRemove extra newlines
claudio [Wed, 21 Jun 2023 07:44:08 +0000 (07:44 +0000)]
Remove extra newlines

16 months agoMake BN_num_bits() independent of bn->top.
jsing [Wed, 21 Jun 2023 07:41:55 +0000 (07:41 +0000)]
Make BN_num_bits() independent of bn->top.

Provide bn_bitsize(), which performs a constant time scan of a BN in order
to determine the bit size of the BN value. Use this for BN_num_bits() such
that it is no longer dependent on the bn->top value.

ok tb@

16 months agoAdd tests for BN_sqr() corner cases.
jsing [Wed, 21 Jun 2023 07:18:10 +0000 (07:18 +0000)]
Add tests for BN_sqr() corner cases.

Test BN_sqr() with a newly allocated BN, a BN explicitly set to zero and
small values that fit in a single BN_ULONG.

16 months agoAdd BN_cmp()/BN_ucmp() tests with zero padded inputs.
jsing [Wed, 21 Jun 2023 07:16:08 +0000 (07:16 +0000)]
Add BN_cmp()/BN_ucmp() tests with zero padded inputs.

Currently BN_hex2bn() removes the leading zeros, however this will not be
the case in the future.

16 months agoAdd a BN_num_bits() with zero padded input.
jsing [Wed, 21 Jun 2023 07:15:38 +0000 (07:15 +0000)]
Add a BN_num_bits() with zero padded input.

Currently BN_hex2bn() removes the leading zeros, however this will not be
the case in the future.

16 months agoCheck fdopen return value, from Christian Menges.
nicm [Wed, 21 Jun 2023 06:28:18 +0000 (06:28 +0000)]
Check fdopen return value, from Christian Menges.

16 months agobetter validate CASignatureAlgorithms in ssh_config and sshd_config.
djm [Wed, 21 Jun 2023 05:10:26 +0000 (05:10 +0000)]
better validate CASignatureAlgorithms in ssh_config and sshd_config.

Previously this directive would accept certificate algorithm names, but
these were unusable in practice as OpenSSH does not support CA chains.

part of bz3577; ok dtucker@

16 months agomake `ssh -Q CASignatureAlgorithms` only list signature algorithms that
djm [Wed, 21 Jun 2023 05:08:32 +0000 (05:08 +0000)]
make `ssh -Q CASignatureAlgorithms` only list signature algorithms that
are valid for CA signing. Previous behaviour was to list all signing
algorithms, including certificate algorithms (OpenSSH certificates do
not support CA chains). part of bz3577; ok dtucker@

16 months agohandle rlimits > INT_MAX (rlim_t is u64); ok dtucker
djm [Wed, 21 Jun 2023 05:06:04 +0000 (05:06 +0000)]
handle rlimits > INT_MAX (rlim_t is u64); ok dtucker
bz3581

16 months agocall rk3328 not rk3288 functions in rk3328_pinctrl()
jsg [Wed, 21 Jun 2023 01:10:17 +0000 (01:10 +0000)]
call rk3328 not rk3288 functions in rk3328_pinctrl()
tested by and ok kettenis@

16 months agoprepare for support for connecting to unix domain sockets using ssh -W
djm [Tue, 20 Jun 2023 23:59:33 +0000 (23:59 +0000)]
prepare for support for connecting to unix domain sockets using ssh -W
by explicitly decoding PORT_STREAMLOCAL (a negative number) from the u32
that's passed over the multiplexing socket; previously code would just
cast, which is UB.

16 months agoschedcpu, uvm_meter(9): make uvm_meter() an independent timeout
cheloha [Tue, 20 Jun 2023 16:30:30 +0000 (16:30 +0000)]
schedcpu, uvm_meter(9): make uvm_meter() an independent timeout

uvm_meter(9) should not base its periodic uvm_loadav() call on the UTC
clock.  It also no longer needs to periodically wake up proc0 because
proc0 doesn't do any work.  schedcpu() itself may change or go away,
but as kettenis@ notes we probably can't completely remove the concept
of a "load average" from OpenBSD, given its long Unix heritage.

So, (1) remove the uvm_meter() call from schedcpu(), (2) make
uvm_meter() an independent timeout started alongside schedcpu() during
scheduler_start(), and (3) delete the vestigial periodic proc0 wakeup.

With input from deraadt@, kettenis@, and claudio@.  deraadt@ cautions
that this change may confuse administrators who hold the load average
in high regard.

Thread: https://marc.info/?l=openbsd-tech&m=168710929409153&w=2

general agreement with this direction from kettenis@
ok claudio@

16 months agoUpdate ospfd to use new ibuf api.
claudio [Tue, 20 Jun 2023 15:19:55 +0000 (15:19 +0000)]
Update ospfd to use new ibuf api.

This mostly moves away from memcpy(ibuf_seek(buf, off, size), data, size) to
ibuf_set(buf, off, data, size). Also ibuf_reserve() is replaced with
ibuf_add_zero().

OK tb@

16 months agoUse new ibuf API in rpki-client.
claudio [Tue, 20 Jun 2023 15:15:14 +0000 (15:15 +0000)]
Use new ibuf API in rpki-client.

Use ibuf_fd_get/set/avail in the file descriptor passing code.
Switch some ibuf_seek() calls to ibuf_set() and use ibuf_add_zero() instead
of ibuf_reserve().
OK tb@ job@

16 months agotweak fragment handling error messages a bit
espie [Tue, 20 Jun 2023 14:50:05 +0000 (14:50 +0000)]
tweak fragment handling error messages a bit
don't pass parameters we don't need

16 months agoConsolidate elliptic curve cofactor handling
tb [Tue, 20 Jun 2023 14:37:15 +0000 (14:37 +0000)]
Consolidate elliptic curve cofactor handling

The various checks of the cofactor to be set in EC_GROUP_set_generator()
are a bit all over the place. Move them into a single function and clean
things up a little. Instead of calculating directly with the cofactor
member of the group, use a temporary variable and copy this variable only
if all tests passed. In cryptographic contexts the cofactor almost always
fits if not into a single byte then into a word, so copying is cheap.
Also streamline the computations a bit and remove some binary curve
contortions.

ok jsing

16 months agoImprove certificate version checks in x509v3_cache_extensions()
tb [Tue, 20 Jun 2023 14:21:19 +0000 (14:21 +0000)]
Improve certificate version checks in x509v3_cache_extensions()

Only allow version v1-v3, disallow issuerUID and subjectUID in v1 certs
and require that if X509v3 extensions are present that the cert be v3.

Initial diff from job

ok job jsing

16 months agoRename all occurrences of e in this file to engine
tb [Tue, 20 Jun 2023 14:14:00 +0000 (14:14 +0000)]
Rename all occurrences of e in this file to engine

Requested by jsing

16 months agoRename int_ctx_new() into evp_pkey_ctx_new()
tb [Tue, 20 Jun 2023 14:12:51 +0000 (14:12 +0000)]
Rename int_ctx_new() into evp_pkey_ctx_new()

int_ctx_new() is a bad, generic, nondescriptive name.

requested by jsing

16 months agoClean up and fix int_ctx_new()
tb [Tue, 20 Jun 2023 14:10:05 +0000 (14:10 +0000)]
Clean up and fix int_ctx_new()

Compare explicitly against NULL, ensure the engine is always finished on
error, switch to using calloc() instead of malloc() + forgetting to set
some members to 0, use EVP_PKEY_up_ref() and also use pkey_ctx instead of
ret for the newly created EVP_PKEY_CTX.

ok jsing

16 months agoClean up EVP_PKEY_CTX_meth_dup()
tb [Tue, 20 Jun 2023 14:05:46 +0000 (14:05 +0000)]
Clean up EVP_PKEY_CTX_meth_dup()

Explicitly check against NULL, replace malloc() plus manual zeroing with
calloc(). Use EVP_PKEY_up_ref() rather than handrolling it and use a more
normal error idiom.

There still seems to be a bug in here in that the ENGINE's refcount isn't
bumped, but that will be investigated and fixed separately.

ok jsing

16 months agoUpdate regress to align with recent changes in rpki-client
job [Tue, 20 Jun 2023 12:52:32 +0000 (12:52 +0000)]
Update regress to align with recent changes in rpki-client

16 months agoEnsure CRLs carry the correct version
job [Tue, 20 Jun 2023 12:48:32 +0000 (12:48 +0000)]
Ensure CRLs carry the correct version

OK tb@

16 months agoAdd compliance checks for the version, KU, and EKU of TAK/MFT/GBR EE certs
job [Tue, 20 Jun 2023 12:39:50 +0000 (12:39 +0000)]
Add compliance checks for the version, KU, and EKU of TAK/MFT/GBR EE certs

OK tb@

16 months agoEnsure the X.509 version is V3
job [Tue, 20 Jun 2023 12:28:08 +0000 (12:28 +0000)]
Ensure the X.509 version is V3

OK tb@

16 months agoTake more care to ensure name_to_string() always returns a proper
krw [Tue, 20 Jun 2023 11:52:08 +0000 (11:52 +0000)]
Take more care to ensure name_to_string() always returns a proper
string. Don't rely on GPT partition name containing a terminating
zero or the reserved bytes beyond gp_name being properly
initialized to zero.

16 months agoBe explicit when SIA is without rsync accessLocation
job [Tue, 20 Jun 2023 11:06:47 +0000 (11:06 +0000)]
Be explicit when SIA is without rsync accessLocation

OK tb@

16 months agoSync with reality after the API was revamped years ago, explain functions
kn [Tue, 20 Jun 2023 10:59:47 +0000 (10:59 +0000)]
Sync with reality after the API was revamped years ago, explain functions
in paragraphs like task_add(9) and timeout_add(9) do instead of a list.

This certainly needs more polish.

OK jmc

16 months agoReplace a ibuf_reserve() dance to add a NUL byte with ibuf_add_zero(buf, 1).
claudio [Tue, 20 Jun 2023 09:54:57 +0000 (09:54 +0000)]
Replace a ibuf_reserve() dance to add a NUL byte with ibuf_add_zero(buf, 1).
Same thing but far less nasty.
OK tb@

16 months agoFix definition of EMMC_DLL_TXCLK register offset.
kettenis [Tue, 20 Jun 2023 09:26:36 +0000 (09:26 +0000)]
Fix definition of EMMC_DLL_TXCLK register offset.

ok dlg@

16 months agoresponsibilty -> responsibility
jsg [Tue, 20 Jun 2023 06:53:29 +0000 (06:53 +0000)]
responsibilty -> responsibility

16 months agoFix copy-paste error
tb [Tue, 20 Jun 2023 06:46:07 +0000 (06:46 +0000)]
Fix copy-paste error

16 months agoAdd regress coverage for BN_num_bits()
jsing [Tue, 20 Jun 2023 06:36:09 +0000 (06:36 +0000)]
Add regress coverage for BN_num_bits()

16 months ago- filedescriptor -> file descriptor, as per the rest of the page
jmc [Tue, 20 Jun 2023 05:56:19 +0000 (05:56 +0000)]
- filedescriptor -> file descriptor, as per the rest of the page
- missing full stop

16 months agoFix diagnostic values emitted in warnx
job [Tue, 20 Jun 2023 02:46:18 +0000 (02:46 +0000)]
Fix diagnostic values emitted in warnx

OK tb@

16 months agodrm/amd/display: Reduce sdp bw after urgent to 90%
jsg [Tue, 20 Jun 2023 02:42:15 +0000 (02:42 +0000)]
drm/amd/display: Reduce sdp bw after urgent to 90%

From Alvin Lee
8953be60ec33cba8289a855a886f64508f8c2c0c in linux-6.1.y/6.1.34
e1a600208286c197c2696e51fc313e49889315bd in mainline linux

16 months agodrm/amd/pm: Fix power context allocation in SMU13
jsg [Tue, 20 Jun 2023 02:40:31 +0000 (02:40 +0000)]
drm/amd/pm: Fix power context allocation in SMU13

From Lijo Lazar
8695a443ad8f38e239b2080f02c4d739d6e33686 in linux-6.1.y/6.1.34
1d13c49cf4e246b218d71873f1bb1bbd376aa10e in mainline linux

16 months agodrm/amdgpu: change reserved vram info print
jsg [Tue, 20 Jun 2023 02:38:42 +0000 (02:38 +0000)]
drm/amdgpu: change reserved vram info print

From YiPeng Chai
8e143bae25cdbab69ea3e2e7bb6faf7711ce7583 in linux-6.1.y/6.1.34
dac652220ba0e5a2ef2da2a47a60b60aea333fdb in mainline linux

16 months agodrm/amdgpu: fix xclk freq on CHIP_STONEY
jsg [Tue, 20 Jun 2023 02:37:06 +0000 (02:37 +0000)]
drm/amdgpu: fix xclk freq on CHIP_STONEY

From Chia-I Wu
34419aa0b448b0eee941102793893e0e256abda1 in linux-6.1.y/6.1.34
b447b079cf3a9971ea4d31301e673f49612ccc18 in mainline linux

16 months agodrm/amd/pm: conditionally disable pcie lane switching for some sienna_cichlid SKUs
jsg [Tue, 20 Jun 2023 02:35:50 +0000 (02:35 +0000)]
drm/amd/pm: conditionally disable pcie lane switching for some sienna_cichlid SKUs

From Evan Quan
416ba40ff3c4ecafbed19029c9e9884a7fee3da5 in linux-6.1.y/6.1.34
38e4ced804796c5725e2a52ec3601951552c4a97 in mainline linux

16 months agodrm/i915/gt: Use the correct error value when kernel_context() fails
jsg [Tue, 20 Jun 2023 02:31:50 +0000 (02:31 +0000)]
drm/i915/gt: Use the correct error value when kernel_context() fails

From Andi Shyti
8d42c563e4ddbe2d0d71249f137b02daa66972db in linux-6.1.y/6.1.34
40023959dbab3c6ad56fa7213770e63d197b69fb in mainline linux

16 months agodrm/amdgpu: fix Null pointer dereference error in amdgpu_device_recover_vram
jsg [Tue, 20 Jun 2023 02:30:04 +0000 (02:30 +0000)]
drm/amdgpu: fix Null pointer dereference error in amdgpu_device_recover_vram

From Horatio Zhang
c5a17f3247bd7f6c2e22678dbfcd73832f487e3f in linux-6.1.y/6.1.34
2a1eb1a343208ce7d6839b73d62aece343e693ff in mainline linux

16 months agodrm/i915/selftests: Add some missing error propagation
jsg [Tue, 20 Jun 2023 02:28:16 +0000 (02:28 +0000)]
drm/i915/selftests: Add some missing error propagation

From Tvrtko Ursulin
76eef453a675794e98400c8889446b1503a9dfa6 in linux-6.1.y/6.1.34
79d0150d2d983a4f6efee676cea06027f586fcd0 in mainline linux

16 months agodrm/i915/selftests: Stop using kthread_stop()
jsg [Tue, 20 Jun 2023 02:26:56 +0000 (02:26 +0000)]
drm/i915/selftests: Stop using kthread_stop()

From Tvrtko Ursulin
4e7f1f6da79e1acda58b738e34ff972821d13072 in linux-6.1.y/6.1.34
6407cf533217e09dfd895e64984c3f1ee3802373 in mainline linux

16 months agodrm/i915: Use 18 fast wake AUX sync len
jsg [Tue, 20 Jun 2023 02:24:41 +0000 (02:24 +0000)]
drm/i915: Use 18 fast wake AUX sync len

From Jouni Hogander
5f285409c91bb97d78b05477d57a921ba1156465 in linux-6.1.y/6.1.34
2d6f2f79e06571d41eb1223abebe9097511c9544 in mainline linux

16 months agodrm/i915: Explain the magic numbers for AUX SYNC/precharge length
jsg [Tue, 20 Jun 2023 02:22:17 +0000 (02:22 +0000)]
drm/i915: Explain the magic numbers for AUX SYNC/precharge length

From Ville Syrjala
7bf7bebdc20df3d53a6c7af583d704e811fed85d in linux-6.1.y/6.1.34
26bfc3f36f2104c174dfc72415547d5c28ef3f1c in mainline linux

16 months agoreset comment=NULL for each key in do_fingerprint(); fixes "no comment"
djm [Tue, 20 Jun 2023 00:05:09 +0000 (00:05 +0000)]
reset comment=NULL for each key in do_fingerprint(); fixes "no comment"
not showing on when running `ssh-keygen -l` on multiple keys where one
has a comment and other following keys do not. Patch from Markus Kuhn
via GHPR407, bz3580

16 months ago"%-Ns\n" is more appropriately "%s\n" to avoid adding extraneous
krw [Mon, 19 Jun 2023 23:11:57 +0000 (23:11 +0000)]
"%-Ns\n" is more appropriately "%s\n" to avoid adding extraneous
blanks to the end of the line.

Unexpected line wrapping noticed by kettenis@, cause spotted by deraadt@

Nuke an unused variable in passing.

16 months ago"%-Ns\n" is more appropriately "%s\n" to avoid adding extraneous
krw [Mon, 19 Jun 2023 23:11:19 +0000 (23:11 +0000)]
"%-Ns\n" is more appropriately "%s\n" to avoid adding extraneous
blanks to the end of the line.

Unexpected line wrapping noticed by kettenis@, cause spotted by deraadt@

Nuke an unused variable in passing.

16 months agoMake enginetest work with disabled engine support
tb [Mon, 19 Jun 2023 18:52:29 +0000 (18:52 +0000)]
Make enginetest work with disabled engine support

16 months agoFix GOST test with disabled engine
tb [Mon, 19 Jun 2023 18:51:47 +0000 (18:51 +0000)]
Fix GOST test with disabled engine

16 months agoProperly guard ENGINE usage with !OPENSSL_NO_ENGINE
tb [Mon, 19 Jun 2023 18:32:05 +0000 (18:32 +0000)]
Properly guard ENGINE usage with !OPENSSL_NO_ENGINE

16 months agoDrop test for msgbuf_drain() since that function is no longer part of the
claudio [Mon, 19 Jun 2023 17:22:46 +0000 (17:22 +0000)]
Drop test for msgbuf_drain() since that function is no longer part of the
public API.

16 months agosync
claudio [Mon, 19 Jun 2023 17:21:46 +0000 (17:21 +0000)]
sync

16 months agoImprove the ibuf API by adding these functions:
claudio [Mon, 19 Jun 2023 17:19:50 +0000 (17:19 +0000)]
Improve the ibuf API by adding these functions:
Functions extending ibuf_add to work with more specific data types
  ibuf_add_buf, ibuf_add_zero, ibuf_add_n8, ibuf_add_n16, ibuf_add_n32,
  ibuf_add_n64
Functions replacing ibuf_seek where data at a specific offset is modified
  ibuf_set, ibuf_set_n8, ibuf_set_n16, ibuf_set_n32, ibuf_set_n64
Functions to check, get and set the filedescriptor stored on the ibuf
  ibuf_fd_avail, ibuf_fd_get, ibuf_fd_set
and ibuf_data() to access the data buffer, to be used together with ibuf_size()

On top of this add an optimized imsg_compose_ibuf() where an ibuf is wrapped
into an imsg in an efficent way.

Finally remove msgbuf_drain since it is not used by anything outside of
the ibuf code. Because of this removal bump the major of libutil.

Remove ibuf_data() in iked since the same function is now provided by libutil.
OK tb@

16 months agoReplace eclectic mix of errx(4, "out of memory"), err(4, NULL)
krw [Mon, 19 Jun 2023 13:45:19 +0000 (13:45 +0000)]
Replace eclectic mix of errx(4, "out of memory"), err(4, NULL)
and err(1, NULL) with consistent err(1, NULL) when responding to
out of memory conditions.

16 months agoFix RK3588 support. Makes dwmmc(4) actually work.
kettenis [Mon, 19 Jun 2023 13:37:22 +0000 (13:37 +0000)]
Fix RK3588 support.  Makes dwmmc(4) actually work.

ok patrick@

16 months agoThe group "operator" gatekeeps a few superuser abilities (dumping disks,
deraadt [Mon, 19 Jun 2023 13:05:25 +0000 (13:05 +0000)]
The group "operator" gatekeeps a few superuser abilities (dumping disks,
manipulating tape drives -> means gid operator on device nodes).  This group
is also used with group-access bit on the setuid-root shutdown command
(mode ug+x,u+s).  Some people use this to shutdown/reboot their machines, but
use of that group is giving them disk read access also, which is wrong.
It would be a pain to re-gid all the device nodes, so instead let's renumber
the operator execution gid into group "_shutdown".
Users using this shutdown/reboot functionality will notice it no longer works,
and move themselves to the correct group.
Various choices discussed at large, this seems our best choice.
ok sthen

16 months agoAdd another reset for the PCIe controller on the RK3588.
kettenis [Mon, 19 Jun 2023 09:54:15 +0000 (09:54 +0000)]
Add another reset for the PCIe controller on the RK3588.

ok dlg@

16 months agoDedoxigenize ecdsa.h
tb [Mon, 19 Jun 2023 09:12:41 +0000 (09:12 +0000)]
Dedoxigenize ecdsa.h

These functions are properly documented and upcoming surgery in here is
going to be tricky enough without having to navigate around this noise.

No code change.

16 months agodrm/amd/display: Have Payload Properly Created After Resume
jsg [Mon, 19 Jun 2023 00:50:42 +0000 (00:50 +0000)]
drm/amd/display: Have Payload Properly Created After Resume

From Fangzhi Zuo
4042d7ad40f1c3182225461c62926f217a3d0ede in linux-6.1.y/6.1.33
482e6ad9adde69d9da08864b4ccf4dfd53edb2f0 in mainline linux

16 months agodrm/amd/pm: reverse mclk and fclk clocks levels for renoir
jsg [Mon, 19 Jun 2023 00:49:02 +0000 (00:49 +0000)]
drm/amd/pm: reverse mclk and fclk clocks levels for renoir

From Tim Huang
8db2ea7b80d6539c2c3d4e2ca96ca1bc56b982d9 in linux-6.1.y/6.1.33
55e02c14f9b5fd973ba32a16a715baa42617f9c6 in mainline linux

16 months agodrm/amd/pm: reverse mclk and fclk clocks levels for yellow carp
jsg [Mon, 19 Jun 2023 00:47:31 +0000 (00:47 +0000)]
drm/amd/pm: reverse mclk and fclk clocks levels for yellow carp

From Tim Huang
f05f3fcc782445b707b998859d9a03410ecbdb73 in linux-6.1.y/6.1.33
f1373a97a41f429e0095d4be388092ffa3c1a157 in mainline linux

16 months agodrm/amd/pm: reverse mclk clocks levels for SMU v13.0.5
jsg [Mon, 19 Jun 2023 00:45:41 +0000 (00:45 +0000)]
drm/amd/pm: reverse mclk clocks levels for SMU v13.0.5

From Tim Huang
1c729bd5b30fe8178c53aeebf6503ea38966f769 in linux-6.1.y/6.1.33
c1d35412b3e826ae8119e3fb5f51dd0fa5b6b567 in mainline linux

16 months agodrm/amd/pm: resolve reboot exception for si oland
jsg [Mon, 19 Jun 2023 00:44:09 +0000 (00:44 +0000)]
drm/amd/pm: resolve reboot exception for si oland

From Guchun Chen
0f8f233ed76754b0c9262eb2e82f8529da0bef16 in linux-6.1.y/6.1.33
e490d60a2f76bff636c68ce4fe34c1b6c34bbd86 in mainline linux

16 months agodrm/amd/pm: reverse mclk and fclk clocks levels for vangogh
jsg [Mon, 19 Jun 2023 00:41:10 +0000 (00:41 +0000)]
drm/amd/pm: reverse mclk and fclk clocks levels for vangogh

From Tim Huang
e0a0f5d2ba593bbf155a41890f675390fd312e2c in linux-6.1.y/6.1.33
bfc03568d9d81332382c73a1985a90c4506bd36c in mainline linux

16 months agodrm/amd/pm: reverse mclk and fclk clocks levels for SMU v13.0.4
jsg [Mon, 19 Jun 2023 00:39:44 +0000 (00:39 +0000)]
drm/amd/pm: reverse mclk and fclk clocks levels for SMU v13.0.4

From Tim Huang
00abb872ef0f82dde131b9bd12096100bb24d9ba in linux-6.1.y/6.1.33
6a07826f2057b5fa1c479ba56460195882464270 in mainline linux

16 months agodrm/amdgpu: enable tmz by default for GC 11.0.1
jsg [Mon, 19 Jun 2023 00:38:02 +0000 (00:38 +0000)]
drm/amdgpu: enable tmz by default for GC 11.0.1

From Ikshwaku Chauhan
2f91f92bd870684173e1fa27927ae8ba99fe463c in linux-6.1.y/6.1.33
663b930e24842f3d3bb79418bb5cd8d01b40c559 in mainline linux

16 months agodrm/amdgpu: skip disabling fence driver src_irqs when device is unplugged
jsg [Mon, 19 Jun 2023 00:36:06 +0000 (00:36 +0000)]
drm/amdgpu: skip disabling fence driver src_irqs when device is unplugged

From Guchun Chen
68ce1d57e52c6f88ffffb0d81b10650eafc8e540 in linux-6.1.y/6.1.33
c1a322a7a4a96cd0a3dde32ce37af437a78bf8cd in mainline linux

16 months agodrm/amdgpu: set gfx9 onwards APU atomics support to be true
jsg [Mon, 19 Jun 2023 00:34:28 +0000 (00:34 +0000)]
drm/amdgpu: set gfx9 onwards APU atomics support to be true

From Yifan Zhang
3e336ad6f517d1078b1e6e874e1578827088f269 in linux-6.1.y/6.1.33
af7828fbceed4f9e503034111066a0adef3db383 in mainline linux

16 months agodrm/amdgpu: Use the default reset when loading or reloading the driver
jsg [Mon, 19 Jun 2023 00:32:04 +0000 (00:32 +0000)]
drm/amdgpu: Use the default reset when loading or reloading the driver

From lyndonli
88a042d599c3f253ea8a9aa1906833c144525af4 in linux-6.1.y/6.1.33
4eea7fb980dc44545a32eec92e2662053b34cd9d in mainline linux

16 months agodrm/amdgpu: release gpu full access after "amdgpu_device_ip_late_init"
jsg [Mon, 19 Jun 2023 00:30:06 +0000 (00:30 +0000)]
drm/amdgpu: release gpu full access after "amdgpu_device_ip_late_init"

From Chong Li
787e74b21394f126bbce355839dcce9b0ad256d2 in linux-6.1.y/6.1.33
38eecbe086a4e52f54b2bbda8feba65d44addbef in mainline linux

16 months agoclockintr_cpu_init: initialize starting offsets with clockintr_stagger()
cheloha [Sun, 18 Jun 2023 23:19:01 +0000 (23:19 +0000)]
clockintr_cpu_init: initialize starting offsets with clockintr_stagger()

16 months agoclockintr: add clockintr_stagger()
cheloha [Sun, 18 Jun 2023 23:09:35 +0000 (23:09 +0000)]
clockintr: add clockintr_stagger()

clockintr_stagger() formalizes the "staggered start" pattern for
scheduling a common periodic clock interrupt across multiple CPUs.

Right now we implement a staggered start by hand for hardclock(),
statclock(), and schedclock().  I expect we will do it for
profclock(), too.

16 months agoAdd and use CHUNKSZ() to replace 'chunk->stop - chunk->start'
krw [Sun, 18 Jun 2023 20:41:52 +0000 (20:41 +0000)]
Add and use CHUNKSZ() to replace 'chunk->stop - chunk->start'
occurrances.

Shorter lines, more obvious intent.

16 months agoTurns out EC_KEY_METHOD_new() has dup built in...
tb [Sun, 18 Jun 2023 19:12:58 +0000 (19:12 +0000)]
Turns out EC_KEY_METHOD_new() has dup built in...

... because RSA_meth_new() doesn't. So we can fortunately lose a few lines
added in the previous commit. Three cheers for the masters of inconsistency.

ok jsing

16 months agoremove ca_verify_cb(). was initially used for debugging, then the
op [Sun, 18 Jun 2023 19:08:52 +0000 (19:08 +0000)]
remove ca_verify_cb().  was initially used for debugging, then the
logging went away but the no-op callback remained.

noticed by tb@

16 months agoUse UINT64_MAX instead of -1 to set a uint64_t value to
krw [Sun, 18 Jun 2023 18:58:55 +0000 (18:58 +0000)]
Use UINT64_MAX instead of -1 to set a uint64_t value to
its maximum.