openbsd
2 months agoBump up the maximum for repeat-time (some people want it to be
nicm [Mon, 21 Oct 2024 12:42:06 +0000 (12:42 +0000)]
Bump up the maximum for repeat-time (some people want it to be
effectively infinite).

2 months agoAdd function to get current offset from copy mode, from Michael Grant.
nicm [Mon, 21 Oct 2024 12:39:49 +0000 (12:39 +0000)]
Add function to get current offset from copy mode, from Michael Grant.

2 months agoAdjust how Ctrl and Meta keys are sent to use standard representation if
nicm [Mon, 21 Oct 2024 07:38:06 +0000 (07:38 +0000)]
Adjust how Ctrl and Meta keys are sent to use standard representation if
available in mode 1, from Stanislav Kljuhhin, GitHub issue 4188.

2 months agoremove unneeded includes
jsg [Mon, 21 Oct 2024 07:21:18 +0000 (07:21 +0000)]
remove unneeded includes

2 months agoEmit a warning if all fortunes in the file are too short or too long
tb [Mon, 21 Oct 2024 06:39:03 +0000 (06:39 +0000)]
Emit a warning if all fortunes in the file are too short or too long

From Nir Lichtman

2 months agorevert "try to simplify the locking code around busy maps"
dlg [Mon, 21 Oct 2024 06:07:33 +0000 (06:07 +0000)]
revert "try to simplify the locking code around busy maps"

anton@ and syzkaller have trouble with it.

2 months agoFix lldb doesn't analyze process core correctly.
asou [Mon, 21 Oct 2024 05:18:17 +0000 (05:18 +0000)]
Fix lldb doesn't analyze process core correctly.

ok kettenis@

2 months agoremove unused MP_PICMODE define
jsg [Mon, 21 Oct 2024 03:07:54 +0000 (03:07 +0000)]
remove unused MP_PICMODE define

2 months agoPlug leak of Fortbuf in find_matches()
tb [Sun, 20 Oct 2024 21:07:58 +0000 (21:07 +0000)]
Plug leak of Fortbuf in find_matches()

From Nir Lichtman

2 months agotry to simplify the locking code around busy maps.
dlg [Sun, 20 Oct 2024 11:28:17 +0000 (11:28 +0000)]
try to simplify the locking code around busy maps.

vm_maps have a "feature" where they can mark that they're being
operated on by a specific proc, and then release the rwlock protecting
their state. to relock, you have to be the same proc that marked
it busy.

this diff tries to simplify it a bit. it basically has threads check
the busy field up front and rechecks the busy field inside the
rwlock. if you can sleep, it will sleep up front for the busy field
to become clear, rather than sleep on either the busy field or the
rwlock. some code paths clear the busy field without holding the
rwlock, so it doesn't make sense to me to be waiting for the busy
field but sleeping somewhere else.

ok claudio@ mpi@

2 months agoVM_MAP_BUSY and VM_MAP_WANTLOCK will be removed soon, prep for that.
claudio [Sun, 20 Oct 2024 11:21:24 +0000 (11:21 +0000)]
VM_MAP_BUSY and VM_MAP_WANTLOCK will be removed soon, prep for that.
OK dlg@

2 months agoec_ameth.c: fix includes
tb [Sun, 20 Oct 2024 10:52:51 +0000 (10:52 +0000)]
ec_ameth.c: fix includes

2 months agoec_asn1: add missing includes
tb [Sun, 20 Oct 2024 10:48:29 +0000 (10:48 +0000)]
ec_asn1: add missing includes

2 months agoec_curve: add missing includes
tb [Sun, 20 Oct 2024 10:45:49 +0000 (10:45 +0000)]
ec_curve: add missing includes

2 months agozap an empty line
tb [Sun, 20 Oct 2024 10:28:23 +0000 (10:28 +0000)]
zap an empty line

2 months agoadd comma to fix offsets of trap type strings
jsg [Sun, 20 Oct 2024 06:54:11 +0000 (06:54 +0000)]
add comma to fix offsets of trap type strings
ok miod@

2 months agoChange sdhc_bus_power() behavior to return success and not perform a
hastings [Sat, 19 Oct 2024 21:10:03 +0000 (21:10 +0000)]
Change sdhc_bus_power() behavior to return success and not perform a
power-off voltage switch sequence when card is already operating at
requested voltage.

Zap the NOPWR0 quirk for Intel controllers.

ok stsp@ kettenis@

2 months agoMake ec EVP_PKEY_CTRL_MD handler match dsa/rsa more closely
tb [Sat, 19 Oct 2024 14:41:03 +0000 (14:41 +0000)]
Make ec EVP_PKEY_CTRL_MD handler match dsa/rsa more closely

This makes the thing a bit easier on the eyes and improves greppability.

ok joshua jsing

2 months agoDrop a useless cast in pkey_dsa_ctrl()
tb [Sat, 19 Oct 2024 14:39:44 +0000 (14:39 +0000)]
Drop a useless cast in pkey_dsa_ctrl()

ok joshua jsing

2 months agoRemove IA32 specific code from cryptlib.c.
jsing [Sat, 19 Oct 2024 13:06:11 +0000 (13:06 +0000)]
Remove IA32 specific code from cryptlib.c.

Move the IA32 specific code to arch/{amd64,i386}/crypto_cpu_caps.c, rather
than polluting cryptlib.c with machine dependent code. A stub version of
crypto_cpu_caps_ia32() still remains for now.

2 months agoRemove unused sparc CPU capability detection code.
jsing [Sat, 19 Oct 2024 11:55:32 +0000 (11:55 +0000)]
Remove unused sparc CPU capability detection code.

This has been unused for a long time - it can be found in the attic if
someone wants to clean it up and enable it in the future.

ok tb@

2 months agoEC_GROUP_check(): zap useless comments
tb [Sat, 19 Oct 2024 08:29:40 +0000 (08:29 +0000)]
EC_GROUP_check(): zap useless comments

2 months agoMove EC_GROUP_check() to ec_lib.c
tb [Sat, 19 Oct 2024 08:26:03 +0000 (08:26 +0000)]
Move EC_GROUP_check() to ec_lib.c

EC_GROUP_check() is quite simple. It doesn't need to use its own file.

2 months agoMark two regress/sbin/ifconfig tests as expected failures.
anton [Sat, 19 Oct 2024 07:10:55 +0000 (07:10 +0000)]
Mark two regress/sbin/ifconfig tests as expected failures.
They make use of the by now unsupported SIOCSIFDSTADDR ioctl command.
They should instead make use of the SIOCAIFADDR ioctl command, however
figuring out such change is above my pay grade.

2 months agoec_asn1_test: simplify previous
tb [Fri, 18 Oct 2024 19:58:43 +0000 (19:58 +0000)]
ec_asn1_test: simplify previous

2 months agoec_asn1_test: call EC_GROUP_check() for the builtin curves
tb [Fri, 18 Oct 2024 19:55:34 +0000 (19:55 +0000)]
ec_asn1_test: call EC_GROUP_check() for the builtin curves

This makes the internal curve test in ectest.c superfluous.
Also fix a logic error.

2 months agoSimplify EC_get_builtin_curves().
tb [Fri, 18 Oct 2024 18:03:45 +0000 (18:03 +0000)]
Simplify EC_get_builtin_curves().

When determining the minimum of nitems and EC_CURVE_LIST_LENGTH
we need neither an extra variable nor a ternary operator.

2 months agoUse better naming in ec_curve.c
tb [Fri, 18 Oct 2024 17:56:45 +0000 (17:56 +0000)]
Use better naming in ec_curve.c

Rename struct ec_list_element into struct ec_curve. Accordingly, curve_list
becomes struct ec_curve ec_curve_list[]. Adjust internal API to match.

suggested by jsing

2 months agoec_asn1_test: adjust for rejection of non-builtin curve parameters
tb [Fri, 18 Oct 2024 17:29:24 +0000 (17:29 +0000)]
ec_asn1_test: adjust for rejection of non-builtin curve parameters

2 months agoEnforce that EC Parameters correspond to a builtin curve
tb [Fri, 18 Oct 2024 17:27:07 +0000 (17:27 +0000)]
Enforce that EC Parameters correspond to a builtin curve

EC parameters are very general. While there are some minimal sanity checks,
for the parameters due to DoS risks found in the last decade, the elliptic
curve code is poorly written and a target rich environment for NULL
dereferences, busy loops, expensive computations and whatever other
nastiness you can think of. It is not too hard to come up with parameters
that reach very ugly code. While we have removed for the worst of it (the
"fast" nist code and GF2m come to mind), the code very much resembles the
Augean Stables.

Unfortunately, curve parameters are still in use - even mandatory in some
contexts - for example in machine-readable travel documents signed by ICAO
country signing certification authorities (see ICAO Doc 9303).

To avoid many of these DoS vectors, start enforcing that we know what the
curve parameters are about, namely that they correspond to a builtin curve.
This way we know that the parameters are at least as good as the standards
we implement and checking this is cheap:

Translate curve parameters into the ad hoc representation in the builtin
curve code and check there's a match. That's very cheap since most curves
are distinguished by cofactor and parameter length and we need to use an
actual parameter comparison for at most half a dozen curves, usually only
one or two.

ok jsing

2 months agoRemove now unused x86cpuid.pl.
jsing [Fri, 18 Oct 2024 14:45:02 +0000 (14:45 +0000)]
Remove now unused x86cpuid.pl.

2 months agoProvide crypto_cpu_caps_init() for i386.
jsing [Fri, 18 Oct 2024 14:44:02 +0000 (14:44 +0000)]
Provide crypto_cpu_caps_init() for i386.

This is the same CPU capabilities code that is now used for amd64. Like
amd64 we now only populate OPENSSL_ia32cap_P with bits used by perlasm.

Discussed with tb@

2 months agoRemove now unused x86_64cpuid.pl.
jsing [Fri, 18 Oct 2024 13:38:23 +0000 (13:38 +0000)]
Remove now unused x86_64cpuid.pl.

2 months agoProvide crypto_cpu_caps_init() for amd64.
jsing [Fri, 18 Oct 2024 13:36:24 +0000 (13:36 +0000)]
Provide crypto_cpu_caps_init() for amd64.

This is a CPU capability detection implementation in C, with minimal
inline assembly (for cpuid and xgetbv). This replaces the assembly
mess generated by x86_64cpuid.pl. Rather than populating OPENSSL_ia32cap_P
directly with CPUID output, just set the bits that the remaining
perlasm checks (namely AESNI, AVX, FXSR, INTEL, HT, MMX, PCLMUL, SSE, SSE2
and SSSE3).

ok joshua@ tb@

2 months agoInstead of always following up "power on" with a "reset", only
tobhe [Fri, 18 Oct 2024 12:53:49 +0000 (12:53 +0000)]
Instead of always following up "power on" with a "reset", only
send a single reset during attach.  We have discovered that some
devices such as the built-in keyboard on the Thinkpad T14s Gen 6
don't like getting more than one reset sent or they become
unresponsive.

This has been in snaps for a while and hasn't caused any major
regressions so we are confident the extra reset is not needed on
most hardware.

feedback from kettenis@
ok deraadt@ mlarkin@

2 months agoInline last use of OPENSSL_load_builtin_modules()
tb [Fri, 18 Oct 2024 11:12:10 +0000 (11:12 +0000)]
Inline last use of OPENSSL_load_builtin_modules()

This used to be a trivial wrapper of the ASN1_add_oid_module() horror.
It's no longer exported, so it can go away. It moves from the terribly
named file conf_mall.c to the equally terribly named file conf_sap.c.
I have no idea what mall and sap are supposed to mean in this context.

2 months agoMove EC_GROUP_new_curve_GFp() into ec_lib.c
tb [Fri, 18 Oct 2024 10:57:26 +0000 (10:57 +0000)]
Move EC_GROUP_new_curve_GFp() into ec_lib.c

Another single-function file goes away.

2 months agoMerge EC_GROUP_new_curve_GFp() with ec_group_new_curve()
tb [Fri, 18 Oct 2024 10:50:26 +0000 (10:50 +0000)]
Merge EC_GROUP_new_curve_GFp() with ec_group_new_curve()

The latter was used for EC_GROUP_new_curve_GF2m() and is now pointless.

ok jsing

2 months agoec_asn1_test: add secp256k1.m
tb [Fri, 18 Oct 2024 10:40:31 +0000 (10:40 +0000)]
ec_asn1_test: add secp256k1.m

2 months agoec_asn1_test: remove last hardcoded wei25519 remnant
tb [Fri, 18 Oct 2024 10:12:25 +0000 (10:12 +0000)]
ec_asn1_test: remove last hardcoded wei25519 remnant

2 months agoec_asn1_test: test Wei25519.2 and Wei25519.-3 as well
tb [Fri, 18 Oct 2024 09:34:20 +0000 (09:34 +0000)]
ec_asn1_test: test Wei25519.2 and Wei25519.-3 as well

Covers a few more corner cases in the elliptic curve code.

2 months agoec_asn1_test: clean up & refactor; test Wei25519 with simple method
tb [Fri, 18 Oct 2024 09:01:44 +0000 (09:01 +0000)]
ec_asn1_test: clean up & refactor; test Wei25519 with simple method

2 months agomention that LocalForward and RemoteForward can accept Unix domain socket
djm [Fri, 18 Oct 2024 05:53:26 +0000 (05:53 +0000)]
mention that LocalForward and RemoteForward can accept Unix domain socket
paths; GHPR115

2 months agoPut the bowels of the various VOP_PRINT routines under
miod [Fri, 18 Oct 2024 05:52:32 +0000 (05:52 +0000)]
Put the bowels of the various VOP_PRINT routines under
defined(DEBUG) || defined(DIAGNOSTIC) || defined(VFSLCKDEBUG)
as they won't be used otherwise.

Shaves a few bytes off installation kernels.

ok kn@ semarie@

2 months agoremove duplicate check; GHPR392 from Pedro Martelletto
djm [Fri, 18 Oct 2024 05:45:40 +0000 (05:45 +0000)]
remove duplicate check; GHPR392 from Pedro Martelletto

2 months agoallow "-" as output file for moduli screening
djm [Fri, 18 Oct 2024 05:37:24 +0000 (05:37 +0000)]
allow "-" as output file for moduli screening

based on GHPR393

2 months agossh-keyscan doesn't need it's own sshfatal() definition, it can
djm [Fri, 18 Oct 2024 05:32:51 +0000 (05:32 +0000)]
ssh-keyscan doesn't need it's own sshfatal() definition, it can
use the shared one from fatal.c

based on GHPR401 from lengyijun

2 months agoin _ssh_order_hostkeyalgs() consider ECDSA curve type when arranging
djm [Fri, 18 Oct 2024 05:14:51 +0000 (05:14 +0000)]
in _ssh_order_hostkeyalgs() consider ECDSA curve type when arranging
the hostkey algorithms. AFAIK this code is unused in OpenSSH, but I
guess others are using it

based on GHPR387 from Pawel Jakub Dawidek

2 months agorequire control-escape character sequences passed via the '-e ^x'
djm [Fri, 18 Oct 2024 05:03:34 +0000 (05:03 +0000)]
require control-escape character sequences passed via the '-e ^x'
commandline to be exactly two characters long. Avoids one by OOB
read if ssh is invoked as "ssh -e^ ..."

Spotted by Maciej Domanski in GHPR368

2 months agoremove addr.[ch] functions that are unused and visbility-restrict
djm [Fri, 18 Oct 2024 04:30:09 +0000 (04:30 +0000)]
remove addr.[ch] functions that are unused and visbility-restrict
ones that are unused outside the implementation itself; based on
GHPR#282 by tobias@

2 months agounreachable POLLERR case; from ya0guang via GHPR485
djm [Fri, 18 Oct 2024 04:14:59 +0000 (04:14 +0000)]
unreachable POLLERR case; from ya0guang via GHPR485

2 months agos/Sx/Cm/ for external references; from Domen Puncer Kugler via GHPR501
djm [Fri, 18 Oct 2024 04:11:54 +0000 (04:11 +0000)]
s/Sx/Cm/ for external references; from Domen Puncer Kugler via GHPR501

2 months agodrm/i915/hdcp: fix connector refcounting
jsg [Fri, 18 Oct 2024 00:08:23 +0000 (00:08 +0000)]
drm/i915/hdcp: fix connector refcounting

From Jani Nikula
55f2bd90b9fba95e929d4c407ffc422597152323 in linux-6.6.y/6.6.57
4cc2718f621a6a57a02581125bb6d914ce74d23b in mainline linux

2 months agodrm/amd/display: Check null pointer before dereferencing se
jsg [Fri, 18 Oct 2024 00:06:16 +0000 (00:06 +0000)]
drm/amd/display: Check null pointer before dereferencing se

From Alex Hung
65b2d49e55fe13ae56da3a7685bdccadca31134a in linux-6.6.y/6.6.57
ff599ef6970ee000fa5bc38d02fa5ff5f3fc7575 in mainline linux

2 months agodrm/amd/display: Revert "Check HDCP returned status"
jsg [Fri, 18 Oct 2024 00:02:32 +0000 (00:02 +0000)]
drm/amd/display: Revert "Check HDCP returned status"

From Alex Hung
939b4b2c008d4c620b8127bfd12cb22e40447141 in linux-6.6.y/6.6.57
bc2fe69f16c7122b5dabc294aa2d6065d8da2169 in mainline linux

2 months agodrm/amd/display: Remove a redundant check in authenticated_dp
jsg [Fri, 18 Oct 2024 00:00:40 +0000 (00:00 +0000)]
drm/amd/display: Remove a redundant check in authenticated_dp

From Wenjing Liu
b505e4fc411c1015ff5114b0cca8c9b20ae2f679 in linux-6.6.y/6.6.57
4b22869f76563ce1e10858d2ae3305affa8d4a6a in mainline linux

2 months agodrm/crtc: fix uninitialized variable use even harder
jsg [Thu, 17 Oct 2024 23:52:27 +0000 (23:52 +0000)]
drm/crtc: fix uninitialized variable use even harder

From Rob Clark
be6c52b059a28ec7f78a135061f2cc16b352ef70 in linux-6.6.y/6.6.57
b6802b61a9d0e99dcfa6fff7c50db7c48a9623d3 in mainline linux

2 months agouse rw_status instead of interpreting RWL_OWNER to see if a lock is busy.
dlg [Thu, 17 Oct 2024 22:44:17 +0000 (22:44 +0000)]
use rw_status instead of interpreting RWL_OWNER to see if a lock is busy.

ok claudio@

2 months agoAdd pinctrl support.
kettenis [Thu, 17 Oct 2024 17:58:58 +0000 (17:58 +0000)]
Add pinctrl support.

ok patrick@, phessler@

2 months agoSwitch pane-colors and cursor-style options to be in alphabetical order,
nicm [Thu, 17 Oct 2024 17:22:01 +0000 (17:22 +0000)]
Switch pane-colors and cursor-style options to be in alphabetical order,
from Teubel Gyorgy, GitHub issue 4191.

2 months agoAllow attributes in menu style, from Japin Li in GitHub issue 4194.
nicm [Thu, 17 Oct 2024 17:10:41 +0000 (17:10 +0000)]
Allow attributes in menu style, from Japin Li in GitHub issue 4194.

2 months agoRemove a lot of #include stanzas which used to be required by code found in
miod [Thu, 17 Oct 2024 15:52:30 +0000 (15:52 +0000)]
Remove a lot of #include stanzas which used to be required by code found in
this file at some point, but such code now lies comfortably in the Attic.

ok jsg@ mpi@

2 months agocreate_tempfile: pass pointer to full pathname to strlcat()
millert [Thu, 17 Oct 2024 15:38:38 +0000 (15:38 +0000)]
create_tempfile: pass pointer to full pathname to strlcat()

Fixes a potential buffer overrun.  Also check strlcpy() and strlcat()
return value to detect truncations.  Based on a diff from naddy@.
OK naddy@ tb@ deraadt@

2 months agoSplit ec_asn1_parameters2group() into digestible pieces
tb [Thu, 17 Oct 2024 14:34:06 +0000 (14:34 +0000)]
Split ec_asn1_parameters2group() into digestible pieces

This becomes a simple wrapper function that currently does three checks:

1. ensure the fieldID is for a prime field

2. check that the purported prime is of reasonable size, extract and
   set curve coefficients and point conversion form

3. extract and set generator, order, cofactor and seed.

Sanity checks such as the Hasse bound are dealt with in the EC_GROUP API,
so need not be repeated here. They will become redundant once we enforce
that the parameters represent a builtin curve anyway.

ok jsing

2 months agoProvide crypto_cpu_caps_init() as a CPU capability detection entry point.
jsing [Thu, 17 Oct 2024 14:27:57 +0000 (14:27 +0000)]
Provide crypto_cpu_caps_init() as a CPU capability detection entry point.

This can be overridden on a per-architecture basis. The default version
calls OPENSSL_cpuid_setup(), which will be eventually replaced/removed.

ok joshua@ tb@

2 months agoRemove run once code from OPENSSL_cpuid_setup().
jsing [Thu, 17 Oct 2024 14:09:29 +0000 (14:09 +0000)]
Remove run once code from OPENSSL_cpuid_setup().

OPENSSL_cpuid_setup() is no longer exported and is now only ever run under
pthread_once().

ok joshua@ tb@

2 months agoShortcut cursig when called during sleep setup.
claudio [Thu, 17 Oct 2024 09:11:35 +0000 (09:11 +0000)]
Shortcut cursig when called during sleep setup.

Add deep flag as function argument which is used by the sleep API but
nowhere else. Both calls to sleep_signal_check() should skip the ugly
bits of cursig().

In cursig() if deep once it is clear a signal will be taken keep the
signal on the thread siglist and return. sleep_signal_check() will then
return EINTR or ERESTART based on the signal context.  There is no reason
to do more in this special case. Especially stop/cont and the ptrace trap
must be skipped here. Once the call makes it to userret the signal will be
picked up again and handled in a safe location.

Stopping singals need some additional logic since we don't want to abort
the sleep just to stop a process. Since our SIGSTOP handling requires
a major rewrite this will be posponed until then.

OK mpi@

2 months agoregen
dlg [Thu, 17 Oct 2024 08:22:53 +0000 (08:22 +0000)]
regen

2 months agoKingston SNV2S nvme device
dlg [Thu, 17 Oct 2024 08:22:34 +0000 (08:22 +0000)]
Kingston SNV2S nvme device

2 months agoregen
dlg [Thu, 17 Oct 2024 08:21:51 +0000 (08:21 +0000)]
regen

2 months agoampere altra pci ports
dlg [Thu, 17 Oct 2024 08:21:23 +0000 (08:21 +0000)]
ampere altra pci ports

2 months agolibssl: rework cert signature security level
tb [Thu, 17 Oct 2024 06:19:06 +0000 (06:19 +0000)]
libssl: rework cert signature security level

This switches to using the X509_get_signature_info() API instead of hand
rolling a part of it. This is slightly tangly since the security level API
is strange. In particular, some failures are passed to the security level
callback so that applications can override them.

This makes the security level API handle RSA-PSS and EdDSA certificates
correctly and the handshake with such can progress a bit further. Of note,
we check that the certs are actually suitable for use in TLS per RFC 8446
contrary to what OpenSSL does.

ok beck jsing

2 months agoremove unneeded task.h include, missed in rev 1.67
jsg [Thu, 17 Oct 2024 05:37:54 +0000 (05:37 +0000)]
remove unneeded task.h include, missed in rev 1.67

2 months agoinclude <dev/ic/bcm2835_dmac.h> not "dev/ic/bcm2835_dmac.h"
jsg [Thu, 17 Oct 2024 05:10:53 +0000 (05:10 +0000)]
include <dev/ic/bcm2835_dmac.h> not "dev/ic/bcm2835_dmac.h"

2 months agoremove unneeded if_wg.h and pfsync.h includes
jsg [Thu, 17 Oct 2024 05:02:12 +0000 (05:02 +0000)]
remove unneeded if_wg.h and pfsync.h includes

2 months agouse <machine/asm.h> not "machine/asm.h", for consistency
jsg [Thu, 17 Oct 2024 02:20:53 +0000 (02:20 +0000)]
use <machine/asm.h> not "machine/asm.h", for consistency

2 months agoremove unneeded includes
jsg [Thu, 17 Oct 2024 01:57:18 +0000 (01:57 +0000)]
remove unneeded includes

2 months agoEC ASN.1: add reminder that the simple method might also want testing
tb [Wed, 16 Oct 2024 23:58:25 +0000 (23:58 +0000)]
EC ASN.1: add reminder that the simple method might also want testing

2 months agoImplement Wei25519 to exercise some more elliptic curve code
tb [Wed, 16 Oct 2024 23:49:49 +0000 (23:49 +0000)]
Implement Wei25519 to exercise some more elliptic curve code

This provides a non-trivial non-builtin curve that is unlikely to ever
become a builtin curve. This exercises the cofactor guessing code and
and ensures that things work as far as they can with a custom OID. The
main reason for adding it is to have a "real-world" example for an
upcoming check that EC parameters represent a builtin curve.

2 months agoa.out is no longer the commonly encountered binary file format, the world has
miod [Wed, 16 Oct 2024 18:47:47 +0000 (18:47 +0000)]
a.out is no longer the commonly encountered binary file format, the world has
moved to ELF.

Move the a.out specific defines and macros, but the MID_xxx values, from
<sys/exec.h> to <a.out.h>, and update the few userland binaries which really
need these defines (i.e. boot-related tools for old architectures) to
explicitly include <a.out.h> when needed.

"Fine" deraadt@

2 months agoDeliver SIGTRAP, rather than SIGEMT, when a TADDccTV or TSUBccTV instruction
miod [Wed, 16 Oct 2024 18:43:42 +0000 (18:43 +0000)]
Deliver SIGTRAP, rather than SIGEMT, when a TADDccTV or TSUBccTV instruction
traps. Such instructions are deprecated in v9 (64-bit) code and should never
occur in real-life code. See v9 manual A.59 and A.60 for details.
CVS ----------------------------------------------------------------------

2 months agoDeliver SIGTRAP, rather than SIGEMT, for trap instructions which are neither
miod [Wed, 16 Oct 2024 18:40:52 +0000 (18:40 +0000)]
Deliver SIGTRAP, rather than SIGEMT, for trap instructions which are neither
debugger breakpoints nor compiler-generated divide by zero reports.

SIGEMT is a historical curiosity which makes no sense nowadays except on
PDP-11 and VAX hardware.

Discussed with imp@ and visa@ long ago.

2 months agocut tun_init() out, it does pointless work.
dlg [Wed, 16 Oct 2024 11:12:31 +0000 (11:12 +0000)]
cut tun_init() out, it does pointless work.

tun_init turns interface/stack config into a set of flags that
tun(4) keeps in tun_softc sc_flags, but never uses.

ok miod@ kn@

2 months agoremove SIOCSIFDSTADDR from the network ioctls.
dlg [Wed, 16 Oct 2024 11:03:55 +0000 (11:03 +0000)]
remove SIOCSIFDSTADDR from the network ioctls.

netintro says it's deprecated, and most of our other drivers are
doing fine without it.

ok miod@ kn@ patrick@

2 months agorpki-client: sprinkle some const
tb [Wed, 16 Oct 2024 06:09:45 +0000 (06:09 +0000)]
rpki-client: sprinkle some const

EVP_PKEY_get0_* were made const correct in OpenSSL 3 and now cause the
build of rpki-client to emit warnings. Of course no one is able to see
these warnings because they are hidden in all the deprecation vomit.

Makes rpki-client build cleanly against OpenSSL 3 when configured with
--with-openssl-cflags=-DOPENSSL_SUPPRESS_DEPRECATED.

ok claudio deraadt job

2 months agoremove unneeded frame.h and riscvreg.h includes
jsg [Wed, 16 Oct 2024 02:32:27 +0000 (02:32 +0000)]
remove unneeded frame.h and riscvreg.h includes

2 months agorpki-client/openssl: eliminate pointless OpenSSL deprecation vomit
tb [Tue, 15 Oct 2024 21:03:10 +0000 (21:03 +0000)]
rpki-client/openssl: eliminate pointless OpenSSL deprecation vomit

2 months agorust-openssl: set resolver="2" for workspace
tb [Tue, 15 Oct 2024 19:41:24 +0000 (19:41 +0000)]
rust-openssl: set resolver="2" for workspace

silences an annoying warning

2 months agoUnindent error check in EC_GROUP_set_generator()
tb [Tue, 15 Oct 2024 17:44:43 +0000 (17:44 +0000)]
Unindent error check in EC_GROUP_set_generator()

2 months agoEnable sig-stop3 regress test. It should no longer fail now.
claudio [Tue, 15 Oct 2024 15:06:25 +0000 (15:06 +0000)]
Enable sig-stop3 regress test. It should no longer fail now.

2 months agoAdd PS_STOPPED to the flags
claudio [Tue, 15 Oct 2024 13:49:49 +0000 (13:49 +0000)]
Add PS_STOPPED to the flags

2 months agoIndicate that a process has stopped by setting PS_STOPPED flag
claudio [Tue, 15 Oct 2024 13:49:26 +0000 (13:49 +0000)]
Indicate that a process has stopped by setting PS_STOPPED flag

The checks in dowait6 and orphanpg using ps_mainproc are flawed and
fail if the mainproc called pthread_exit before the other threads.
Adding the flag in proc_stop_sweep is racy but the best we have right now.
This fixes regress/sys/kern/signal/sig-stop3.

OK mpi@

2 months agoFix runtime calculation. Assiging ts to spc_runtime does not work if ts
claudio [Tue, 15 Oct 2024 12:26:53 +0000 (12:26 +0000)]
Fix runtime calculation. Assiging ts to spc_runtime does not work if ts
is modified.
OK tb@ jca@

2 months agoUse pr instead of p->p_p like everywhere else in exit1.
claudio [Tue, 15 Oct 2024 11:54:07 +0000 (11:54 +0000)]
Use pr instead of p->p_p like everywhere else in exit1.

2 months agoremove unneeded pte.h include
jsg [Tue, 15 Oct 2024 09:16:39 +0000 (09:16 +0000)]
remove unneeded pte.h include

2 months agoSwitch ec_asn1_group2parameters() to get0_{order,cofactor}()
tb [Tue, 15 Oct 2024 06:35:59 +0000 (06:35 +0000)]
Switch ec_asn1_group2parameters() to get0_{order,cofactor}()

These are more ergonomic, result in more readable code, avoid a copy and
we no longer ignore a possible memory allocation error due to API misdesign
and bad code.

ok jsing

2 months agoProvide EC_GROUP_get0_cofactor() for internal use
tb [Tue, 15 Oct 2024 06:27:43 +0000 (06:27 +0000)]
Provide EC_GROUP_get0_cofactor() for internal use

While this is public API in OpenSSL, there are no plans to expose it.

ok jsing

2 months agoremove struct arpreq from net/if_arp.h
jsg [Tue, 15 Oct 2024 00:41:40 +0000 (00:41 +0000)]
remove struct arpreq from net/if_arp.h

unused since "rewrite to merge arp and routing tables"
in CSRG if_ether.c 7.14 (Berkeley) 06/25/91

used by SIOCSARP, SIOCGARP, SIOCDARP, OSIOCGARP ioctls in Net/2
which were removed before 4.4BSD-Lite

ok sthen@ who tested this with a ports build

2 months agogrow i386 media a bit
deraadt [Tue, 15 Oct 2024 00:08:27 +0000 (00:08 +0000)]
grow i386 media a bit

2 months agomention SshdAuthPath option; ok djm@
naddy [Mon, 14 Oct 2024 23:53:34 +0000 (23:53 +0000)]
mention SshdAuthPath option; ok djm@