openbsd
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.

16 months agotls_signer: reinstate the default EC_KEY methods
tb [Sun, 18 Jun 2023 17:50:28 +0000 (17:50 +0000)]
tls_signer: reinstate the default EC_KEY methods

Previously, we would set the ECDSA_METHOD on the EC_KEY, which, by way
of lovely indirection in our three crypto/ec* directories ended up having
no effect on the default methods. Now that we set a new EC_KEY_METHOD, we
need to make sure we still have the other handlers that we might need.

Like so many things that were made opaque in the 1.1 re"design", the
accessors were written without actual application code in mind. In
particular, EC_KEY_METHOD lacks a dup(). This means we get to fetch the
default methods with getters and then set them again on the new method.
This is particularly awesome because once someone adds a new method to
the opaque struct, all applications will have to adapt and do a get/set
dance.

So far this is very reminiscent of PostgreSQL with BIO_meth_*

https://github.com/postgres/postgres/blob/a14e75eb0b6a73821e0d66c0d407372ec8376105/src/interfaces/libpq/fe-secure-openssl.c#L1921-L1928

Only it's worse here because someone wanted to be smart and save a few
public functions, so we have to use getters that get several functions
at once. Which in turn means we need to have function pointers with the
precise signatures which are part of the struct that was made opaque.

We will add a EC_KEY_METHOD_dup() in the next bump, but for now this is
the best fix we can have.

Whenever you think you've seen the worst turds in this code base, you find
another one that could serve as an exemplar.

ok jsing op

16 months agosync imsg_to_str() with the list of imsg types in smtpd.h
op [Sun, 18 Jun 2023 17:28:42 +0000 (17:28 +0000)]
sync imsg_to_str() with the list of imsg types in smtpd.h

ok millert@

16 months agoSwitch tls_ecdsa_do_sign() to EC_KEY_get_ex_data()
tb [Sun, 18 Jun 2023 17:24:09 +0000 (17:24 +0000)]
Switch tls_ecdsa_do_sign() to EC_KEY_get_ex_data()

Since libtls now sets the ex_data with EC_KEY_set_ex_data(), the do_sign()
callback needs to have a matching change.

ok jsing op

16 months agoRemove spurious comment.
kettenis [Sun, 18 Jun 2023 16:25:21 +0000 (16:25 +0000)]
Remove spurious comment.

ok patrick@

16 months agoaccept 'a' as shortcut for 'autoconf'; ok op afresh1 kn
deraadt [Sun, 18 Jun 2023 15:17:38 +0000 (15:17 +0000)]
accept 'a' as shortcut for 'autoconf'; ok op afresh1 kn

16 months agoAdd fchmod() entry in luna88k bootloader.
aoyama [Sun, 18 Jun 2023 13:13:00 +0000 (13:13 +0000)]
Add fchmod() entry in luna88k bootloader.

Now 'chmod a-x /bsd.upgrade' works in order to prevent re-upgrade, like other architectures.

Tested by me on LUNA-88K2.

16 months agoFix SCSI CMD_WRITE_EXT command length to 10 bytes.
aoyama [Sun, 18 Jun 2023 12:58:03 +0000 (12:58 +0000)]
Fix SCSI CMD_WRITE_EXT command length to 10 bytes.

This is needed to work libsa's ufs_fchmod() on luna88k.

Tested by me on LUNA-88K2.

16 months agorelax absolute path requirement for configtest (-n)
op [Sun, 18 Jun 2023 11:45:11 +0000 (11:45 +0000)]
relax absolute path requirement for configtest (-n)

ok dv@

16 months agosmtpd: switch ECDSA_METHOD usage to EC_KEY_METHOD
op [Sun, 18 Jun 2023 11:43:49 +0000 (11:43 +0000)]
smtpd: switch ECDSA_METHOD usage to EC_KEY_METHOD

smtpd and the bits it needs in libtls are the only consumer left of
ECDSA_METHOD, which is long deprecated.  This paves the way for the
removal in libcrypto.

The diff is from gilles' work on OpenSMTPD-portable, with minor changes
by me.

ok tb@, jsing@

16 months agolibtls: switch ECDSA_METHOD usage to EC_KEY_METHOD
op [Sun, 18 Jun 2023 11:43:03 +0000 (11:43 +0000)]
libtls: switch ECDSA_METHOD usage to EC_KEY_METHOD

smtpd and the bits it needs in libtls are the only consumer left of
ECDSA_METHOD, which is long deprecated.  This paves the way for the
removal in libcrypto.

The diff is from gilles' work on OpenSMTPD-portable, libretls had a
similar diff.

ok tb@, jsing@

16 months agoFix leak of key.id_buf in pubkey auth case.
tobhe [Sat, 17 Jun 2023 22:33:34 +0000 (22:33 +0000)]
Fix leak of key.id_buf in pubkey auth case.

from markus

16 months agoFlush the ITS after we disestablish an MSI. Fixes an issue seen on Ampere
kettenis [Sat, 17 Jun 2023 22:10:19 +0000 (22:10 +0000)]
Flush the ITS after we disestablish an MSI.  Fixes an issue seen on Ampere
eMAG with an AMD GPU with an HD audio function where azalia(4) doesn't
fully attach.

ok patrick@

16 months agodocument new buttons (STATS_BACKLOG and STATS_USED)
espie [Sat, 17 Jun 2023 19:35:54 +0000 (19:35 +0000)]
document new buttons (STATS_BACKLOG and STATS_USED)

16 months agoOptimise bn_mul2_mulw_addtw() for aarch64.
jsing [Sat, 17 Jun 2023 15:40:46 +0000 (15:40 +0000)]
Optimise bn_mul2_mulw_addtw() for aarch64.

This provides significant performance gains for bn_sqr_comba4() and
bn_sqr_comba8().

16 months ago"d" is the key character for DVI files, not "r";
jmc [Sat, 17 Jun 2023 15:35:08 +0000 (15:35 +0000)]
"d" is the key character for DVI files, not "r";
from lennart jablonka

ok millert

16 months agoSpeed up Montgomery multiplication.
jsing [Sat, 17 Jun 2023 14:43:50 +0000 (14:43 +0000)]
Speed up Montgomery multiplication.

Factor out and optimise the inner loop for Montgomery multiplication,
making use of bn_qwmulw_addqw_addw() to perform Montgomery multiplication
by one word in larger steps. This provides a significant performance gain,
especially on platforms where bn_qwmulw_addqw_addw() is (or can be)
optimised.

ok tb@

16 months agobump version to 7.3.0
op [Sat, 17 Jun 2023 08:32:48 +0000 (08:32 +0000)]
bump version to 7.3.0

16 months agoOn arm64, the frame pointer points at the stack address where the frame
kettenis [Sat, 17 Jun 2023 08:13:56 +0000 (08:13 +0000)]
On arm64, the frame pointer points at the stack address where the frame
pointer of the previous frame has been stored.  The code in
db_stack_trace_print() got that wrong for the initial frame.

While there, remove a bogus comment and some unused #defines about the
layout of stack frames.

ok patrick@

16 months agoFix 'ext-community * *' matching and with this set { ext-community delete * * }.
claudio [Sat, 17 Jun 2023 08:05:48 +0000 (08:05 +0000)]
Fix 'ext-community * *' matching and with this set { ext-community delete * * }.
Problem reported by Moyaze Shivji
OK tb@ job@

16 months agoAdd community tests for various ext-community * versions.
claudio [Sat, 17 Jun 2023 08:01:22 +0000 (08:01 +0000)]
Add community tests for various ext-community * versions.

While there move one test down so that the numbering is consistent again
and make the error strings for counts clear.

16 months agoWarn when CMS signing-time attribute is missing
job [Sat, 17 Jun 2023 04:46:11 +0000 (04:46 +0000)]
Warn when CMS signing-time attribute is missing

OK tb@

16 months agoIf TSO is enabled, fix the IPv6 forward counters and icmp6 redirect.
bluhm [Fri, 16 Jun 2023 19:18:56 +0000 (19:18 +0000)]
If TSO is enabled, fix the IPv6 forward counters and icmp6 redirect.

First try to send with TSO.  The goto senderr handles icmp6 redirect
and other errors.  If TSO is not necessary and the interface MTU
fits, just send the packet.  Again goto senderr handles icmp6.
Finally care about icmp6 packet too big.

tested and OK jan@

16 months agoConvert two K&R function definitions to ANSI
tb [Fri, 16 Jun 2023 16:14:34 +0000 (16:14 +0000)]
Convert two K&R function definitions to ANSI

ok deraadt

16 months agoFix CRYPTO_get_ex_new_index() to return 1 or higher
tb [Fri, 16 Jun 2023 11:20:01 +0000 (11:20 +0000)]
Fix CRYPTO_get_ex_new_index() to return 1 or higher

Mixing SSL_{get,set}_ex_data() and and SSL_{get,set}_app_data() in the
same application causes problems since they both place their data at
the same spot.

From Marc Aldorasi

ok jsing

16 months agolocator object owns a state object, no need to pass it as param
espie [Fri, 16 Jun 2023 10:38:29 +0000 (10:38 +0000)]
locator object owns a state object, no need to pass it as param
also better method name

16 months agobelated move to OO
espie [Fri, 16 Jun 2023 10:29:35 +0000 (10:29 +0000)]
belated move to OO

16 months agoNow that print_host() is unused, rename it to print_addr() and simplify.
tb [Fri, 16 Jun 2023 10:28:43 +0000 (10:28 +0000)]
Now that print_host() is unused, rename it to print_addr() and simplify.

ok claudio tobhe

16 months agono extra params there, to be revisited
espie [Fri, 16 Jun 2023 10:08:17 +0000 (10:08 +0000)]
no extra params there, to be revisited

16 months agomsdosfs: fixes for Undefined Behavior
sf [Fri, 16 Jun 2023 08:42:08 +0000 (08:42 +0000)]
msdosfs: fixes for Undefined Behavior

From FreeBSD commits

  commit c0db7289c3de290d821311942d5533f2284af77f
  Author: pfg <pfg@FreeBSD.org>
  Date:   Wed Aug 8 15:08:22 2018 +0000

  commit 852150953b828e4e8c32789637061001158a8cf4
  Author: kib <kib@FreeBSD.org>
  Date:   Fri Oct 11 18:37:02 2019 +0000

ok bluhm@

16 months agofix default parm, noticed by aja@ on clean-old-distfiles
espie [Fri, 16 Jun 2023 06:44:14 +0000 (06:44 +0000)]
fix default parm, noticed by aja@ on clean-old-distfiles

16 months agodrm/amd: Don't allow s0ix on APUs older than Raven
jsg [Fri, 16 Jun 2023 01:31:34 +0000 (01:31 +0000)]
drm/amd: Don't allow s0ix on APUs older than Raven

From Mario Limonciello
6c1fad655b40b0de6ddad30d9c57e61046df262c in linux-6.1.y/6.1.32
ca47518663973083c513cd6b2801dcda0bfaaa99 in mainline linux

16 months agodrm/amd/amdgpu: limit one queue per gang
jsg [Fri, 16 Jun 2023 00:52:40 +0000 (00:52 +0000)]
drm/amd/amdgpu: limit one queue per gang

From Jack Xiao
f3078be2febb77ed484ed59ff86ce15f49c65ddb in linux-6.1.y/6.1.31
5ee33d905f89c18d4b33da6e5eefdae6060502df in mainline linux

16 months agodrm/amd/pm: Fix output of pp_od_clk_voltage
jsg [Fri, 16 Jun 2023 00:51:02 +0000 (00:51 +0000)]
drm/amd/pm: Fix output of pp_od_clk_voltage

From Jonatas Esteves
8069bcaa5b392ce3972dd72f184b2cc4b1b8262b in linux-6.1.y/6.1.31
40baba5693b9af586dc1063af603d05a79e57a6b in mainline linux

16 months agodrm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7
jsg [Fri, 16 Jun 2023 00:49:10 +0000 (00:49 +0000)]
drm/amd/pm: add missing NotifyPowerSource message mapping for SMU13.0.7

From Evan Quan
6acfbdda4d06d83d434b05b7fe1a9d545d99c027 in linux-6.1.y/6.1.31
0d2dd02d74e6377268f56b90261de0fae8f0d2cb in mainline linux

16 months agodrm/radeon: reintroduce radeon_dp_work_func content
jsg [Fri, 16 Jun 2023 00:47:28 +0000 (00:47 +0000)]
drm/radeon: reintroduce radeon_dp_work_func content

From Alex Deucher
8756863c7fe0f94b23a2e0f0a0d2a79d58e2a329 in linux-6.1.y/6.1.31
a34fc1bcd2c4d8b09dcfc0b95ac65bca1e579bd7 in mainline linux

16 months agodrm/amd/display: hpd rx irq not working with eDP interface
jsg [Fri, 16 Jun 2023 00:46:08 +0000 (00:46 +0000)]
drm/amd/display: hpd rx irq not working with eDP interface

From Robin Chen
28ee628fff1e72ad9629168250071a05b7ba1043 in linux-6.1.y/6.1.31
eeefe7c4820b6baa0462a8b723ea0a3b5846ccae in mainline linux

16 months agodrm/amdgpu/mes11: enable reg active poll
jsg [Fri, 16 Jun 2023 00:42:59 +0000 (00:42 +0000)]
drm/amdgpu/mes11: enable reg active poll

From Jack Xiao
ac2f5739fdca4f532036d1f2e63c2ab55c288f72 in linux-6.1.y/6.1.31
a6b3b618c0f7abc3f543dd0c57b2b19a770bffec in mainline linux

16 months agodrm/amd/amdgpu: update mes11 api def
jsg [Fri, 16 Jun 2023 00:41:01 +0000 (00:41 +0000)]
drm/amd/amdgpu: update mes11 api def

From Jack Xiao
a2fe4534bb38fc5c7c608dac179f205343611003 in linux-6.1.y/6.1.31
1e7bbdba68baf6af7500dd636f18b6fcce58e945 in mainline linux

16 months agoall platforms, main(): call clockqueue_init() just before sched_init_cpu()
cheloha [Thu, 15 Jun 2023 22:18:06 +0000 (22:18 +0000)]
all platforms, main(): call clockqueue_init() just before sched_init_cpu()

Move the clockqueue_init() call out of clockintr_cpu_init() and up
just before the sched_init_cpu() call for a given CPU.

This will allow sched_init_cpu() to allocate clockintr handles for a
given CPU's scheduler in a later patch.

Link: https://marc.info/?l=openbsd-tech&m=168661507607622&w=2
ok kettenis@, claudio@

16 months agoTeach the grotty X509_certificate_type() about Ed25519 certs
tb [Thu, 15 Jun 2023 18:30:09 +0000 (18:30 +0000)]
Teach the grotty X509_certificate_type() about Ed25519 certs

ok jsing

16 months agoregen
tb [Thu, 15 Jun 2023 17:58:27 +0000 (17:58 +0000)]
regen

16 months agoAdd RSA with the sha3s to obj_xref.txt
tb [Thu, 15 Jun 2023 17:58:07 +0000 (17:58 +0000)]
Add RSA with the sha3s to obj_xref.txt

ok jsing

16 months agoregen obj_xref.h
tb [Thu, 15 Jun 2023 16:59:54 +0000 (16:59 +0000)]
regen obj_xref.h

(this and the Ed25519 addition to obj_xref.txt were ok jsing)

16 months agoAdd Ed25519 to the obj_xref table.
tb [Thu, 15 Jun 2023 16:58:38 +0000 (16:58 +0000)]
Add Ed25519 to the obj_xref table.

Also move part of for RSA-PSS to the top since it doesn't only apply to
RSA-PSS.

16 months agoSome fixes in ASN1_item_verify()
tb [Thu, 15 Jun 2023 13:58:56 +0000 (13:58 +0000)]
Some fixes in ASN1_item_verify()

Switch to using EVP_DigestVerify(). Move the freeing of in where it
belongs (previously it would leak on EVP_DigestVerifyUpdate() failure),
and use the proper idiom for ASN1_item_i2d() error checking.

ok jsing

16 months agoMake another NULL check explicit and put a brace on the proper line
tb [Thu, 15 Jun 2023 13:48:15 +0000 (13:48 +0000)]
Make another NULL check explicit and put a brace on the proper line

16 months agoRename a few variables and other cosmetics
tb [Thu, 15 Jun 2023 13:44:38 +0000 (13:44 +0000)]
Rename a few variables and other cosmetics

Rename buf_in into in, buf_out into out, use in_len and out_len for their
lengths, drop a couple of silly casts and remove some empty lines.

ok jsing

16 months agoSwitch ASN1_item_sign_ctx() to EVP_DigestSign()
tb [Thu, 15 Jun 2023 13:32:18 +0000 (13:32 +0000)]
Switch ASN1_item_sign_ctx() to EVP_DigestSign()

This makes this function work with Ed25519 and cleans up a handful of
ugly contortions: use EVP_DigestSign() to determine the signature length
instead of using the strange EVP_PKEY_size() and garbage collect the now
useless out_len. Also use calloc().

ok jsing

16 months agoMake NULL checks explicit in ASN1_item_sign_ctx()
tb [Thu, 15 Jun 2023 13:22:25 +0000 (13:22 +0000)]
Make NULL checks explicit in ASN1_item_sign_ctx()

Also move the NULL check for the EVP_MD into the rv == 2 path, which
is the only branch where it is used.

ok jsing

16 months agoASN1_item_sign_ctx()
tb [Thu, 15 Jun 2023 13:07:45 +0000 (13:07 +0000)]
ASN1_item_sign_ctx()

Pull a NULL check for pkey->ameth up to before ameth is first accessed. An
EVP_PKEY created with EVP_PKEY_new() has ameth == NULL, so this check makes
sense, but it does not make sense to do it where it was.

16 months agoFix a logic error in ASN1_item_sign_ctx()
tb [Thu, 15 Jun 2023 12:44:17 +0000 (12:44 +0000)]
Fix a logic error in ASN1_item_sign_ctx()

If the item_sign() ASN.1 method returns 1, it supposedly handles everything
and the goto err prior to r1.5 was actually a success path. Go figure.

This is fortunately inconsequential since there are only two item_sign()
methods, one for RSA and one for Ed25519, neither of which can return 1.
They only return 0, 2, and 3.

Pointed out by and ok jsing

16 months agodrm/amdgpu: reserve the old gc_11_0_*_mes.bin
jsg [Thu, 15 Jun 2023 03:21:13 +0000 (03:21 +0000)]
drm/amdgpu: reserve the old gc_11_0_*_mes.bin

From Li Ma
da9a8dc33da2083d762c9d84ad1f2752a5a503f4 in linux-6.1.y/6.1.30
8855818ce7554fb7420200187fac9c3b69500da0 in mainline linux

16 months agodrm/amd/amdgpu: introduce gc_*_mes_2.bin v2
jsg [Thu, 15 Jun 2023 03:18:49 +0000 (03:18 +0000)]
drm/amd/amdgpu: introduce gc_*_mes_2.bin v2

From Jack Xiao
616843d5a11bdcad5d65e230a2e372b5701108be in linux-6.1.y/6.1.30
97998b893c3000b27a780a4982e16cfc8f4ea555 in mainline linux

16 months agodrm/amdgpu: declare firmware for new MES 11.0.4
jsg [Thu, 15 Jun 2023 03:16:25 +0000 (03:16 +0000)]
drm/amdgpu: declare firmware for new MES 11.0.4

From Li Ma
09bf14907d8643f3a316d519b2df41ace2db0d7d in linux-6.1.y/6.1.30
a462ef872fd1e83ebd075cf82d91f111acaa629e in mainline linux

16 months agodrm/amdgpu/gfx11: update gpu_clock_counter logic
jsg [Thu, 15 Jun 2023 03:14:43 +0000 (03:14 +0000)]
drm/amdgpu/gfx11: update gpu_clock_counter logic

From Alex Deucher
76313a63f7790d321d425b386e57918fed209545 in linux-6.1.y/6.1.30
d5aa417808cf14c052ca042920b3c6b9f1dc6aa4 in mainline linux

16 months agodrm/amdgpu: refine get gpu clock counter method
jsg [Thu, 15 Jun 2023 03:13:11 +0000 (03:13 +0000)]
drm/amdgpu: refine get gpu clock counter method

From Tong Liu01
055852074c968e3649cdcac5d112af17fd39bac8 in linux-6.1.y/6.1.30
5591a051b86be170a84943698ab140342602ff7b in mainline linux

16 months agodrm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well
jsg [Thu, 15 Jun 2023 03:11:03 +0000 (03:11 +0000)]
drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well

From Guilherme G. Piccoli
4e2f9159f9420ff481dc6ae00969d9406aa85e6f in linux-6.1.y/6.1.30
11fbdda2ab6bf049e2869139c07016022b4e045b in mainline linux

16 months agodrm/amdgpu/gfx10: Disable gfxoff before disabling powergating.
jsg [Thu, 15 Jun 2023 03:09:32 +0000 (03:09 +0000)]
drm/amdgpu/gfx10: Disable gfxoff before disabling powergating.

From Bas Nieuwenhuizen
abfe2ffc004a0e6d23573b52826adf3dafdd9e02 in linux-6.1.y/6.1.30
8173cab3368a13cdc3cad0bd5cf14e9399b0f501 in mainline linux

16 months agodrm/amdgpu/gmc11: implement get_vbios_fb_size()
jsg [Thu, 15 Jun 2023 03:06:36 +0000 (03:06 +0000)]
drm/amdgpu/gmc11: implement get_vbios_fb_size()

From Alex Deucher
9de5a985884acff022375a29bd5166bfabbded07 in linux-6.1.y/6.1.30
68518294d00da6a2433357af75a63abc6030676e in mainline linux

16 months agodrm/amd/pm: fix possible power mode mismatch between driver and PMFW
jsg [Thu, 15 Jun 2023 03:05:21 +0000 (03:05 +0000)]
drm/amd/pm: fix possible power mode mismatch between driver and PMFW

From Evan Quan
903e942500c64bf3acc95e65336366a9e777d581 in linux-6.1.y/6.1.30
bf4823267a817f7c155876a125b94336d7113e77 in mainline linux

16 months agodrm/amdgpu: drop gfx_v11_0_cp_ecc_error_irq_funcs
jsg [Thu, 15 Jun 2023 03:03:34 +0000 (03:03 +0000)]
drm/amdgpu: drop gfx_v11_0_cp_ecc_error_irq_funcs

From Horatio Zhang
7b5a8a23acbc3ee50b23602b61db1563561faf84 in linux-6.1.y/6.1.30
720b47229a5b24061d1c2e29ddb6043a59178d79 in mainline linux

16 months agodrm/amdgpu: Fix sdma v4 sw fini error
jsg [Thu, 15 Jun 2023 03:02:04 +0000 (03:02 +0000)]
drm/amdgpu: Fix sdma v4 sw fini error

From lyndonli
210ef6cd8e634f18fd889421012192b81325b27b in linux-6.1.y/6.1.30
5e08e9c742a00384e5abe74bd40cf4dc15cb3a2e in mainline linux

16 months agodrm/amd: Fix an out of bounds error in BIOS parser
jsg [Thu, 15 Jun 2023 03:00:16 +0000 (03:00 +0000)]
drm/amd: Fix an out of bounds error in BIOS parser

From Mario Limonciello
5675ecd2e0b00a4318ba1db1a1234e7d45b13d6b in linux-6.1.y/6.1.30
d116db180decec1b21bba31d2ff495ac4d8e1b83 in mainline linux

16 months agodrm/amd/display: Correct DML calculation to follow HW SPEC
jsg [Thu, 15 Jun 2023 02:58:49 +0000 (02:58 +0000)]
drm/amd/display: Correct DML calculation to follow HW SPEC

From Paul Hsieh
ec5f00a59aade7e2575fed8b703e2281da444c56 in linux-6.1.y/6.1.30
385c3e4c29e1d4ce8f68687a8c84621e4c0e0416 in mainline linux

16 months agodrm/amd/display: fixed dcn30+ underflow issue
jsg [Thu, 15 Jun 2023 02:56:43 +0000 (02:56 +0000)]
drm/amd/display: fixed dcn30+ underflow issue

From Ayush Gupta
3dc61a19c924632b0bc8ec83593e072739b70645 in linux-6.1.y/6.1.30
37403ced9f2873fab7f39ab4ac963bbb33fb0bc0 in mainline linux

16 months agodrm/amd/display: Use DC_LOG_DC in the trasform pixel function
jsg [Thu, 15 Jun 2023 02:54:54 +0000 (02:54 +0000)]
drm/amd/display: Use DC_LOG_DC in the trasform pixel function

From Rodrigo Siqueira
34813f041d0e627905f47ccadc94a7fc566104d0 in linux-6.1.y/6.1.30
7222f5841ff49709ca666b05ff336776e0664a20 in mainline linux

16 months agodrm/amd/display: Enable HostVM based on rIOMMU active
jsg [Thu, 15 Jun 2023 02:53:11 +0000 (02:53 +0000)]
drm/amd/display: Enable HostVM based on rIOMMU active

From Gabe Teeger
d547d499e451f1e38ad22450602122e0e73f8540 in linux-6.1.y/6.1.30
97fa4dfa66fdd52ad3d0c9fadeaaa1e87605bac7 in mainline linux

16 months agodrm/amd/display: Correct DML calculation to align HW formula
jsg [Thu, 15 Jun 2023 02:51:42 +0000 (02:51 +0000)]
drm/amd/display: Correct DML calculation to align HW formula

From Paul Hsieh
09f7da1301cf7390466847781ef06b0d0c61db4e in linux-6.1.y/6.1.30
26a9f53198c955b15161da48cdb51041a38d5325 in mainline linux

16 months agodrm/amd/display: populate subvp cmd info only for the top pipe
jsg [Thu, 15 Jun 2023 02:49:59 +0000 (02:49 +0000)]
drm/amd/display: populate subvp cmd info only for the top pipe

From Ayush Gupta
92e6c79acad4b96efeff261d27bdbd8089a7dd24 in linux-6.1.y/6.1.30
9bb10b7aaec3b6278f9cc410c17dcaa129bbbbf0 in mainline linux

16 months agodrm/displayid: add displayid_get_header() and check bounds better
jsg [Thu, 15 Jun 2023 02:48:26 +0000 (02:48 +0000)]
drm/displayid: add displayid_get_header() and check bounds better

From Jani Nikula
4b17053ba268bf952c19ecb58d66d5d72e782d13 in linux-6.1.y/6.1.30
5bacecc3c56131c31f18b23d366f2184328fd9cf in mainline linux

16 months agodrm/i915: taint kernel when force probing unsupported devices
jsg [Thu, 15 Jun 2023 02:46:22 +0000 (02:46 +0000)]
drm/i915: taint kernel when force probing unsupported devices

From Jani Nikula
dcd289136bccf2bdd519ee1eb355ed71c73cbe75 in linux-6.1.y/6.1.30
79c901c93562bdf1c84ce6c1b744fbbe4389a6eb in mainline linux

16 months agodrm/i915: Expand force_probe to block probe of devices as well.
jsg [Thu, 15 Jun 2023 02:44:18 +0000 (02:44 +0000)]
drm/i915: Expand force_probe to block probe of devices as well.

From Rodrigo Vivi
36fa6187753a9b52f2bbf2f3ba628f6bad314510 in linux-6.1.y/6.1.30
157821fb3e9aaa07cf408686b08d117bf27b7de1 in mainline linux

16 months agodrm/i915/dp: prevent potential div-by-zero
jsg [Thu, 15 Jun 2023 02:41:45 +0000 (02:41 +0000)]
drm/i915/dp: prevent potential div-by-zero

From Nikita Zhandarovich
86d73b1f98a81f3ecfc19dfe6f8d50daf5707330 in linux-6.1.y/6.1.30
0ff80028e2702c7c3d78b69705dc47c1ccba8c39 in mainline linux