jsing [Wed, 27 Mar 2024 06:39:46 +0000 (06:39 +0000)]
Remove unused NDEBUG define.
jsing [Wed, 27 Mar 2024 06:38:54 +0000 (06:38 +0000)]
Tidy includes and a comment.
jsing [Wed, 27 Mar 2024 06:37:28 +0000 (06:37 +0000)]
Remove rather scary unused experimental code.
ok tb@
joshua [Wed, 27 Mar 2024 06:33:51 +0000 (06:33 +0000)]
Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in
EVP_DigestSignFinal
Additionally, this cleans up some more surrounding code.
This is a fixed version of r1.21.
ok tb
jsing [Wed, 27 Mar 2024 06:15:18 +0000 (06:15 +0000)]
Demacro md4.
Use static inline functions instead of macros. Also number rounds as per
the RFC.
ok joshua@ tb@
tb [Wed, 27 Mar 2024 06:08:45 +0000 (06:08 +0000)]
Hide symbols in engine
ok jsing
jsg [Wed, 27 Mar 2024 04:58:34 +0000 (04:58 +0000)]
drm: Fix drm_fixp2int_round() making it add 0.5
From Arthur Grillo
296e6678a432aaff0b8c6a6a17b9b2b193556c71 in linux-6.6.y/6.6.23
807f96abdf14c80f534c78f2d854c2590963345c in mainline linux
jsg [Wed, 27 Mar 2024 04:55:35 +0000 (04:55 +0000)]
drm/amd/pm: Fix esm reg mask use to get pcie speed
From Asad Kamal
310ae9eb3d2a13345f2590e7581fd45d97323a02 in linux-6.6.y/6.6.23
b485b899e5b8f83723833feca30a1a1e3df778df in mainline linux
jsg [Wed, 27 Mar 2024 04:52:45 +0000 (04:52 +0000)]
drm/amdgpu: Fix missing break in ATOM_ARG_IMM Case of atom_get_src_int()
From Srinivasan Shanmugam
bf13e50a4b760a0155d4cce869dac8480c5ae839 in linux-6.6.y/6.6.23
7cf1ad2fe10634238b38442a851d89514cb14ea2 in mainline linux
jsg [Wed, 27 Mar 2024 04:50:30 +0000 (04:50 +0000)]
drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()'
From Srinivasan Shanmugam
f610c46771ef1047e46d61807aa7c69cd29e63d8 in linux-6.6.y/6.6.23
f6aed043ee5d75b3d1bfc452b1a9584b63c8f76b in mainline linux
jsg [Wed, 27 Mar 2024 04:48:35 +0000 (04:48 +0000)]
drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini()
From Nikita Zhandarovich
e040f1fbe9abae91b12b074cfc3bbb5367b79811 in linux-6.6.y/6.6.23
2a3cfb9a24a28da9cc13d2c525a76548865e182c in mainline linux
jsg [Wed, 27 Mar 2024 04:44:37 +0000 (04:44 +0000)]
drm/radeon/ni: Fix wrong firmware size logging in ni_init_microcode()
From Nikita Zhandarovich
6fc5fb8ebef803285a8f71e298e8a658d836a492 in linux-6.6.y/6.6.23
c4891d979c7668b195a0a75787967ec95a24ecef in mainline linux
jsg [Wed, 27 Mar 2024 04:42:17 +0000 (04:42 +0000)]
drm/amdgpu: Fix potential out-of-bounds access in 'amdgpu_discovery_reg_base_init()'
From Srinivasan Shanmugam
8f3e68c6a3fff53c2240762a47a0045d89371775 in linux-6.6.y/6.6.23
cdb637d339572398821204a1142d8d615668f1e9 in mainline linux
jsg [Wed, 27 Mar 2024 04:40:04 +0000 (04:40 +0000)]
drm/amd/display: Fix potential NULL pointer dereferences in 'dcn10_set_output_transfer_func()'
From Srinivasan Shanmugam
2d9fe7787af01188dc470a649bdbb842d6511fd7 in linux-6.6.y/6.6.23
9ccfe80d022df7c595f1925afb31de2232900656 in mainline linux
jsg [Wed, 27 Mar 2024 04:37:32 +0000 (04:37 +0000)]
drm/amd/display: Fix a potential buffer overflow in 'dp_dsc_clock_en_read()'
From Srinivasan Shanmugam
ad76fd30557d6a106c481e4606a981221ca525f7 in linux-6.6.y/6.6.23
4b09715f1504f1b6e8dff0e9643630610bc05141 in mainline linux
jsg [Wed, 27 Mar 2024 04:32:19 +0000 (04:32 +0000)]
drm: Don't treat 0 as -1 in drm_fixp2int_ceil
From Harry Wentland
bac3d37d2f7cab3d9c42a7c9775c84aee4fa89d9 in linux-6.6.y/6.6.23
cf8837d7204481026335461629b84ac7f4538fa5 in mainline linux
jsg [Wed, 27 Mar 2024 04:27:17 +0000 (04:27 +0000)]
drm/amdgpu: Enable gpu reset for S3 abort cases on Raven series
From Prike Liang
b5f085b46f0e9482f5035f798b402d1ad7ee8e3c in linux-6.6.y/6.6.23
c671ec01311b4744b377f98b0b4c6d033fe569b3 in mainline linux
joshua [Wed, 27 Mar 2024 04:18:50 +0000 (04:18 +0000)]
Recommit r1.20
ok tb jsing
jsing [Wed, 27 Mar 2024 03:05:59 +0000 (03:05 +0000)]
Revert to r1.19 while we track down a bug in the last two commits.
joshua [Wed, 27 Mar 2024 01:55:40 +0000 (01:55 +0000)]
Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in
EVP_DigestSignFinal
Additionally, this cleans up some more surrounding code.
ok tB
tb [Wed, 27 Mar 2024 01:49:31 +0000 (01:49 +0000)]
Use dsa for DSA and dh for DH
This unifies variable names and does some other cleanup. Only change in
generated assembly is line number changes.
tb [Wed, 27 Mar 2024 01:26:30 +0000 (01:26 +0000)]
Use dh for DH function arguments.
No need for a variety of r, d, ...
tb [Wed, 27 Mar 2024 01:22:30 +0000 (01:22 +0000)]
Unify *_up_ref() implementations
No need for an inconsistently named local variable and a ternary operator.
ok jsing
bluhm [Tue, 26 Mar 2024 23:48:49 +0000 (23:48 +0000)]
Additional length check for IPv6 reassembled fragments.
FreeBSD-SA-23:06.ipv6 security advisory has added an additional
overflow check in frag6_input(). OpenBSD is not affected by that
as the bug was introduced by another change in 2019. The existing
code is complicated and NetBSD has taken the FreeBSD fix, although
they were also not affected.
The additional check makes the complicated code more robust. Length
calculation taken from NetBSD. Discussed with FreeBSD.
OK sashan@ mvs@
tb [Tue, 26 Mar 2024 23:45:05 +0000 (23:45 +0000)]
Remove superfluous parentheses in X509_REQ setters
No change in generated assembly
tb [Tue, 26 Mar 2024 23:41:45 +0000 (23:41 +0000)]
Cosmetics, mostly removal of silly parentheses
No change in generated assembly
tb [Tue, 26 Mar 2024 23:21:36 +0000 (23:21 +0000)]
Drop superfluous parentheses in X509_set_version()
kettenis [Tue, 26 Mar 2024 22:46:48 +0000 (22:46 +0000)]
The devicetree standard allows for multiple /memory nodes, each with
multiple memory ranges. We support the latter, but not the former.
Fix this, such that we detect all the memory on the Milk-V Pioneer
board.
ok miod@
tb [Tue, 26 Mar 2024 22:45:38 +0000 (22:45 +0000)]
Tweak versions comment for CRLs
tb [Tue, 26 Mar 2024 22:44:57 +0000 (22:44 +0000)]
piuid and psuid have annoyed me for long enough
tb [Tue, 26 Mar 2024 22:43:42 +0000 (22:43 +0000)]
x509 trust: remove unneeded headers
kettenis [Tue, 26 Mar 2024 22:26:04 +0000 (22:26 +0000)]
Implement support for the RISC-V UEFI Boot Protocol. This provides us
the boot hart ID for firmware that doesn't provide it through the device
tree such as the EDK2-based firmware for the Sophgo SG2042 SoC.
ok patrick@, miod@
miod [Tue, 26 Mar 2024 19:12:34 +0000 (19:12 +0000)]
add cfi instructions to repair this test on amd64 and arm64.
ok kettenis@
bluhm [Tue, 26 Mar 2024 18:18:30 +0000 (18:18 +0000)]
Improve spinning in mtx_enter().
Instead of calling mtx_enter_try() in each spinning loop, do it
only if the result of a lockless read indicates that the mutex has
been released. This avoids some expensive atomic compare-and-swap
operations. Up to 5% reduction of spinning time during kernel build
can been seen on a 8 core amd64 machine. On other machines there
was no visible effect.
Test on powerpc64 has revealed a bug in mtx_owner declaration. Not
the variable was volatile, but the object it points to. Move the
volatile declaration in struct mutex to avoid a hang when going to
multiuser.
from Mateusz Guzik; input kettenis@ jca@; OK mpi@
claudio [Tue, 26 Mar 2024 14:46:48 +0000 (14:46 +0000)]
Implement the chmod a-x bsd.upgrade trick in the sparc64 ofwboot bootloader.
OK deraadt@ florian@ kn@
jsing [Tue, 26 Mar 2024 12:54:22 +0000 (12:54 +0000)]
Rework input and output handling for sha1.
Use be32toh(), htobe32() and crypto_{load,store}_htobe32() as appropriate.
Also use the same while() loop that is used for other hash functions.
ok joshua@ tb@
claudio [Tue, 26 Mar 2024 12:45:29 +0000 (12:45 +0000)]
Move the SendHoldTimer code into start_timer_sendholdtime() and ensure
the timer is stopped if HoldTime is 0.
OK tb@
jsing [Tue, 26 Mar 2024 12:23:02 +0000 (12:23 +0000)]
Inline initial values.
No functional change.
jsing [Tue, 26 Mar 2024 12:18:23 +0000 (12:18 +0000)]
Rework input and output handling for md4.
Use le32toh(), htole32() and crypto_{load,store}_htole32() as appropriate.
ok joshua@ tb@
joshua [Tue, 26 Mar 2024 12:10:50 +0000 (12:10 +0000)]
Simplify HMAC_CTX_new()
There is no need to call HMAC_CTX_init() as the memory has already been
initialised to zero.
ok tb
joshua [Tue, 26 Mar 2024 11:25:08 +0000 (11:25 +0000)]
Clean up EVP_DigestSignFinal
ok jsing tb
jsg [Tue, 26 Mar 2024 11:17:36 +0000 (11:17 +0000)]
Temporarily change the connector to unregistered when adding the backlight
property to avoid warnings. Matches how inteldrm_native_backlight()
handles this.
problem reported and fix tested by tb@
tb [Tue, 26 Mar 2024 11:09:37 +0000 (11:09 +0000)]
Reject setting invalid versions for certs, CRLs and CSRs
The toolkit aspect bites again. Lots of invalid CRLs and CSRs are produced
because people neither read the RFCs nor does the toolkit check anything it
is fed. Reviewers apparently also aren't capable of remembering that they
have three copy-pasted versions of the same API and that adding a version
check to one of the might suggest adding one for the other two.
This requires ruby-openssl 20240326p0 to pass
ok beck job jsing
jsg [Tue, 26 Mar 2024 11:09:02 +0000 (11:09 +0000)]
test bl_idx instead of the connector type to check for backlight
tested by tb@
nicm [Tue, 26 Mar 2024 10:20:20 +0000 (10:20 +0000)]
Fix selection present check, reported by M Kelly.
bluhm [Tue, 26 Mar 2024 10:01:57 +0000 (10:01 +0000)]
Avoid NULL pointer dereference in routing table an_match().
OK mvs@
mvs [Tue, 26 Mar 2024 09:46:47 +0000 (09:46 +0000)]
Use `sb_mtx' to protect `so_rcv' receive buffer of unix(4) sockets.
This makes re-locking unnecessary in the uipc_*send() paths, because
it's enough to lock one socket to prevent peer from concurrent
disconnection. As the little bonus, one unix(4) socket can perform
simultaneous transmission and reception with one exception for
uipc_rcvd(), which still requires the re-lock for connection oriented
sockets.
The socket lock is not held while filt_soread() and filt_soexcept()
called from uipc_*send() through sorwakeup(). However, the unlocked
access to the `so_options', `so_state' and `so_error' is fine.
The receiving socket can't be or became listening socket. It also can't
be disconnected concurrently. This makes immutable SO_ACCEPTCONN,
SS_ISDISCONNECTED and SS_ISCONNECTED bits which are clean and set
respectively.
`so_error' is set on the peer sockets only by unp_detach(), which also
can't be called concurrently on sending socket.
This is also true for filt_fiforead() and filt_fifoexcept(). For other
callers like kevent(2) or doaccept() the socket lock is still held.
ok bluhm
joshua [Tue, 26 Mar 2024 08:54:48 +0000 (08:54 +0000)]
Add TLS_ERROR_INVALID_CONTEXT error code to libtls
ok jsing@ beck@
dtucker [Tue, 26 Mar 2024 08:09:16 +0000 (08:09 +0000)]
test -h is the POSIXly way of testing for a symlink. Reduces diff vs
Portable.
jsing [Tue, 26 Mar 2024 07:12:52 +0000 (07:12 +0000)]
Remove now unnecessary do {} while (0);
jsing [Tue, 26 Mar 2024 07:11:29 +0000 (07:11 +0000)]
Inline HASH_MAKE_STRING.
No change to generated assembly.
tb [Tue, 26 Mar 2024 07:03:10 +0000 (07:03 +0000)]
Remove PKCS5_pbe2_set_iv()
This used to be a generalization of PKCS5_pbe2_set(). Its only caller was
the latter, which always passes aiv == NULL and pbe_prf == -1. Thus, the
iv would always be random and regarding the pbe_prf, it would always end
up being NID_hmacWithSHA1 since the only ctrl grokking EVP_CTRL_PBE_PRF_NID
was RC2's control, but only if PBE_PRF_TEST was defined, which it wasn't.
ok jsing
jsing [Tue, 26 Mar 2024 06:58:58 +0000 (06:58 +0000)]
Reorder functions expanded from md32_common.h.
No functional change.
tb [Tue, 26 Mar 2024 06:58:21 +0000 (06:58 +0000)]
Unifdef PBE_PRF_TEST
This gets use of the last mention of EVP_CTRL_PBE_PRF_NID outside of evp.h
ok jsing
jsing [Tue, 26 Mar 2024 06:54:20 +0000 (06:54 +0000)]
Expand HASH_* defines.
No change to generated assembly.
jsing [Tue, 26 Mar 2024 06:40:29 +0000 (06:40 +0000)]
Inline hash functions from md32_common.h.
No change to generated assembly.
jsing [Tue, 26 Mar 2024 06:31:22 +0000 (06:31 +0000)]
Fix previous commit.
joshua [Tue, 26 Mar 2024 06:24:52 +0000 (06:24 +0000)]
Add error code support to libtls
This adds tls_config_error_code() and tls_error_code(), which will become
public API at a later date.
Additional error codes will be added in follow-up commits.
ok jsing@ beck@
jsing [Tue, 26 Mar 2024 06:23:07 +0000 (06:23 +0000)]
Reorder functions.
No functional change.
jsing [Tue, 26 Mar 2024 06:09:25 +0000 (06:09 +0000)]
Provide an optimised bn_subw() for amd64.
bn_subw() will be used more widely in an upcoming change.
joshua [Tue, 26 Mar 2024 06:08:51 +0000 (06:08 +0000)]
Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in EVP_SignFinal
ok jsing@
jsing [Tue, 26 Mar 2024 05:55:15 +0000 (05:55 +0000)]
Stop including md32_common.h in md5.c and remove unused defines.
This is now no longer needed.
ok tb@
joshua [Tue, 26 Mar 2024 05:50:49 +0000 (05:50 +0000)]
Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in EVP_VerifyFinal
ok tb@
jsing [Tue, 26 Mar 2024 05:46:13 +0000 (05:46 +0000)]
Include stdint.h for uintptr_t.
tb [Tue, 26 Mar 2024 05:43:22 +0000 (05:43 +0000)]
Add back x509_local.h for PBKDF2PARAM
tb [Tue, 26 Mar 2024 05:39:47 +0000 (05:39 +0000)]
PKCS5_pbe2_set_iv() can be local to p5_pbev2
quoth the muppet "yes I know this is horrible!"
joshua [Tue, 26 Mar 2024 05:37:28 +0000 (05:37 +0000)]
Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in PKCS1_MGF1
ok tb@
joshua [Tue, 26 Mar 2024 05:26:27 +0000 (05:26 +0000)]
Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in
RSA_verify_PKCS1_PSS_mgf1
ok jsing@ tb@
joshua [Tue, 26 Mar 2024 05:22:50 +0000 (05:22 +0000)]
Clean up use of EVP_CIPHER_CTX_{legacy_clear,cleanup} in EVP_OpenInit
ok tb@
jsing [Tue, 26 Mar 2024 05:21:35 +0000 (05:21 +0000)]
Demacro MD5 and improve data loading.
Use static inline functions instead of macros and improve handling of
aligned data. Also number rounds as per RFC 1321.
ok tb@
jsing [Tue, 26 Mar 2024 04:23:04 +0000 (04:23 +0000)]
Mark internal functions as static.
jsing [Tue, 26 Mar 2024 04:14:45 +0000 (04:14 +0000)]
Move bn_montgomery_reduce() and drop prototype.
No functional change.
jsing [Tue, 26 Mar 2024 04:11:42 +0000 (04:11 +0000)]
Fix function guards.
beck [Tue, 26 Mar 2024 03:44:11 +0000 (03:44 +0000)]
Add an indicator that an extension has been processed.
ok jsing@
beck [Tue, 26 Mar 2024 02:43:56 +0000 (02:43 +0000)]
Fix expected client hello value to allow for supported_groups change.
ok jsing@
tb [Tue, 26 Mar 2024 01:41:06 +0000 (01:41 +0000)]
Garbage collect the unused verifyctx() and verifyctx_init()
ok joshua jsing
jsg [Tue, 26 Mar 2024 01:28:17 +0000 (01:28 +0000)]
adapt ttm fault handler to OpenBSD
used by gem objects on dg2
dtucker [Tue, 26 Mar 2024 01:23:11 +0000 (01:23 +0000)]
Import regenerated moduli.
beck [Tue, 26 Mar 2024 01:21:34 +0000 (01:21 +0000)]
Process supported groups before key share.
This will allow us to know the client preferences for an upcoming
change to key share processing.
ok jsing@
beck [Tue, 26 Mar 2024 01:18:16 +0000 (01:18 +0000)]
Disable client handshake test for now for pending changes.
ok jsing@
joshua [Tue, 26 Mar 2024 01:15:57 +0000 (01:15 +0000)]
Use errno_value instead of num for readability
ok jsing@
dlg [Tue, 26 Mar 2024 00:54:24 +0000 (00:54 +0000)]
print amps and watts
dlg [Tue, 26 Mar 2024 00:53:51 +0000 (00:53 +0000)]
amps and watts types
volts felt lonely
joshua [Tue, 26 Mar 2024 00:50:22 +0000 (00:50 +0000)]
Use errno_value instead of num for readability
ok beck@ jsing@
beck [Tue, 26 Mar 2024 00:39:22 +0000 (00:39 +0000)]
Change ts to only support one second precision.
RFC 3631 allows for sub second ASN1 GENERALIZED times, if you
choose to support sub second time precison. It does not
indicate that an implementation must support them.
Supporting sub second timestamps is just silly and unrealistic,
so set our maximum to one second of precision. We then simplify
this code by removing some nasty eye-bleed that made artisinally
hand crafted strings and jammed them into an ASN1_GENERALIZEDTIME.
ok tb@, jsing@, with one second precision tested by kn@
tb [Tue, 26 Mar 2024 00:24:11 +0000 (00:24 +0000)]
Clean up conf's module_init()
Immediately error out when no name or value is passed instead of hiding
this in a a combination of ternary operator and strdup error check.
Use calloc(). Unindent some stupid, don't pretend this function can return
anything but -1 and 1, turn the whole thing into single exit and call the
now existing imodule_free() instead of handrolling it.
ok jsing
kettenis [Mon, 25 Mar 2024 23:10:03 +0000 (23:10 +0000)]
Add missing SFENCE.VMA instructions after switching page tables during
early kernel bootstrap.
ok jsg@, mlarkin@
mbuhl [Mon, 25 Mar 2024 20:25:13 +0000 (20:25 +0000)]
Add the VLAN_HWTAGGING capability. Big thanks to bket@ for testing,
rebasing, refactoring, and addressing feedback for this diff.
ok bluhm@, jan@
djm [Mon, 25 Mar 2024 19:28:09 +0000 (19:28 +0000)]
optional debugging
op [Mon, 25 Mar 2024 19:11:52 +0000 (19:11 +0000)]
remove possibly bogus length check
len is initially the line length, but then the two go out of sync.
ok millert@
guenther [Mon, 25 Mar 2024 17:57:07 +0000 (17:57 +0000)]
Move the "no (hard) linking directories" and "no cross-mount links"
checks from all the filesystems that support hardlinks at all into
the VFS layer. Simplify, EPERM description in link(2).
ok miod@ mpi@
mvs [Mon, 25 Mar 2024 17:43:10 +0000 (17:43 +0000)]
regen
mvs [Mon, 25 Mar 2024 17:42:34 +0000 (17:42 +0000)]
Unlock shutdown(2).
ok bluhm
patrick [Mon, 25 Mar 2024 17:24:03 +0000 (17:24 +0000)]
Add rpigpio(4), a driver for the RP1 GPIO controller on the Raspberry Pi 5.
With this, GPIOs can be correctly configured and engaged. Complete pinctrl
as well as IRQ functionality is yet to be implemented.
ok kettenis@
millert [Mon, 25 Mar 2024 15:52:39 +0000 (15:52 +0000)]
whois: use getline(3) instead of fgetln(3)
This simplifies the code and fixes a potential out of bounds read.
OK op@ mbuhl@
jsing [Mon, 25 Mar 2024 13:09:13 +0000 (13:09 +0000)]
Rewrite HKDF_expand().
Simplify overflow checking and length tracking, use a CBB to handle output
and use HMAC_CTX_new() rather than having a HMAC_CTX on the stack.
ok tb@
mvs [Mon, 25 Mar 2024 13:01:49 +0000 (13:01 +0000)]
Add 'ws_' prefix to 'wseventvar' structure members. No functional
changes.
ok miod
jsing [Mon, 25 Mar 2024 12:10:57 +0000 (12:10 +0000)]
Revert r1.13 since it currently breaks openssl-ruby regress tests.
ok tb@
joshua [Mon, 25 Mar 2024 11:41:40 +0000 (11:41 +0000)]
Inline sctx in EVP_DigestSignFinal
ok tb@ jsing@
joshua [Mon, 25 Mar 2024 11:38:47 +0000 (11:38 +0000)]
Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in PKCS5_PBE_keyivgen
ok tb@