openbsd
15 months agodrm/amdgpu: fix clearing mappings for BOs that are always valid in VM
jsg [Wed, 26 Jul 2023 06:31:05 +0000 (06:31 +0000)]
drm/amdgpu: fix clearing mappings for BOs that are always valid in VM

From Samuel Pitoiset
91e69e67d401eb67178ce5992ddc9b1046b39ee7 in linux-6.1.y/6.1.40
ea2c3c08554601b051d91403a241266e1cf490a5 in mainline linux

15 months agodrm/amd/display: disable seamless boot if force_odm_combine is enabled
jsg [Wed, 26 Jul 2023 06:29:09 +0000 (06:29 +0000)]
drm/amd/display: disable seamless boot if force_odm_combine is enabled

From Leo Chen
3546f76c7ad87d0ade575a5c4acad5e4704d927c in linux-6.1.y/6.1.40
26518b39181876064850209ecdab48c0ee5924b1 in mainline linux

15 months agodrm/amd/display: Remove Phantom Pipe Check When Calculating K1 and K2
jsg [Wed, 26 Jul 2023 06:27:30 +0000 (06:27 +0000)]
drm/amd/display: Remove Phantom Pipe Check When Calculating K1 and K2

From Austin Zheng
a2ef3163c3604788abdc060cab74c95ed44fec1a in linux-6.1.y/6.1.40
1966bbfdfe476d271b338336254854c5edd5a907 in mainline linux

15 months agodrm/amd/display: edp do not add non-edid timings
jsg [Wed, 26 Jul 2023 06:26:05 +0000 (06:26 +0000)]
drm/amd/display: edp do not add non-edid timings

From Hersen Wu
c4629c757528f87ee22ea8fe16c645e471b9cbf6 in linux-6.1.y/6.1.40
7a0e005c7957931689a327b2a4e7333a19f13f95 in mainline linux

15 months agodrm/amd/display: fix seamless odm transitions
jsg [Wed, 26 Jul 2023 06:24:24 +0000 (06:24 +0000)]
drm/amd/display: fix seamless odm transitions

From Dmytro Laktyushkin
31fb25ecbba6ebe11dc497952310b986e05dd3a0 in linux-6.1.y/6.1.40
75c2b7ed080d7421157c03064be82275364136e7 in mainline linux

15 months agodrm/atomic: Allow vblank-enabled + self-refresh "disable"
jsg [Wed, 26 Jul 2023 06:22:43 +0000 (06:22 +0000)]
drm/atomic: Allow vblank-enabled + self-refresh "disable"

From Brian Norris
db0a9a29912cdc1834214fe35101a4917f8b9907 in linux-6.1.y/6.1.40
9d0e3cac3517942a6e00eeecfe583a98715edb16 in mainline linux

15 months agodrm/amd/pm: add abnormal fan detection for smu 13.0.0
jsg [Wed, 26 Jul 2023 06:20:51 +0000 (06:20 +0000)]
drm/amd/pm: add abnormal fan detection for smu 13.0.0

From Kenneth Feng
13e8af958cfa97d93d9824b863208c0bb0977361 in linux-6.1.y/6.1.40
2da0036ea99bccb27f7fe3cf2aa2900860e9be46 in mainline linux

15 months agodrm/amdgpu: Fix minmax warning
jsg [Wed, 26 Jul 2023 06:19:33 +0000 (06:19 +0000)]
drm/amdgpu: Fix minmax warning

From Luben Tuikov
e8b6b7b8132500ecb241f7f685398028017ec0d3 in linux-6.1.y/6.1.40
abd51738fe754a684ec44b7a9eca1981e1704ad9 in mainline linux

15 months agodrm/amdgpu: add the fan abnormal detection feature
jsg [Wed, 26 Jul 2023 06:17:53 +0000 (06:17 +0000)]
drm/amdgpu: add the fan abnormal detection feature

From lyndonli
d7d53c669da90181827e42583582192646a4d933 in linux-6.1.y/6.1.40
ef5fca9f7294509ee5013af9e879edc5837c1d6c in mainline linux

15 months agodrm/amd/pm: revise the ASPM settings for thunderbolt attached scenario
jsg [Wed, 26 Jul 2023 06:16:19 +0000 (06:16 +0000)]
drm/amd/pm: revise the ASPM settings for thunderbolt attached scenario

From Evan Quan
c8c703befd2fb2ebbcc9cedbdc98953b52453a35 in linux-6.1.y/6.1.40
fd21987274463a439c074b8f3c93d3b132e4c031 in mainline linux

15 months agodrm/amdgpu/sdma4: set align mask to 255
jsg [Wed, 26 Jul 2023 06:14:40 +0000 (06:14 +0000)]
drm/amdgpu/sdma4: set align mask to 255

From Alex Deucher
4596c812916a582e16aedfb243aaee8d010c6220 in linux-6.1.y/6.1.40
e5df16d9428f5c6d2d0b1eff244d6c330ba9ef3a in mainline linux

15 months agodrm/client: Send hotplug event after registering a client
jsg [Wed, 26 Jul 2023 06:13:01 +0000 (06:13 +0000)]
drm/client: Send hotplug event after registering a client

From Thomas Zimmermann
7c880188c71066449a76de71de772198a0c30a7c in linux-6.1.y/6.1.40
27655b9bb9f0d9c32b8de8bec649b676898c52d5 in mainline linux

15 months agodrm/i915: Fix one wrong caching mode enum usage
jsg [Wed, 26 Jul 2023 06:10:51 +0000 (06:10 +0000)]
drm/i915: Fix one wrong caching mode enum usage

From Tvrtko Ursulin
5a9aecb6651c6e1ef8198c162340ebe172b7a551 in linux-6.1.y/6.1.40
113899c2669dff148b2a5bea4780123811aecc13 in mainline linux

15 months agodrm/i915: Don't preserve dpll_hw_state for slave crtc in Bigjoiner
jsg [Wed, 26 Jul 2023 06:09:12 +0000 (06:09 +0000)]
drm/i915: Don't preserve dpll_hw_state for slave crtc in Bigjoiner

From Stanislav Lisovskiy
f1e746aedd7dfbdea84b690c56154a11b68dc4de in linux-6.1.y/6.1.40
5c413188c68da0e4bffc93de1c80257e20741e69 in mainline linux

15 months ago-.Cd "pseudo-device gre"
jmc [Wed, 26 Jul 2023 05:56:48 +0000 (05:56 +0000)]
-.Cd "pseudo-device gre"
+.Cd "pseudo-device eoip"

15 months agoPrint error messages to stderr as opposed of using syslog.
anton [Wed, 26 Jul 2023 05:50:45 +0000 (05:50 +0000)]
Print error messages to stderr as opposed of using syslog.

15 months agoAdd CXXOPTS.
asou [Tue, 25 Jul 2023 20:19:14 +0000 (20:19 +0000)]
Add CXXOPTS.

ok deraadt@

15 months agostatclock: move profil(2), GPROF code to profclock(), gmonclock()
cheloha [Tue, 25 Jul 2023 18:16:19 +0000 (18:16 +0000)]
statclock: move profil(2), GPROF code to profclock(), gmonclock()

This patch isolates profil(2) and GPROF from statclock().  Currently,
statclock() implements both profil(2) and GPROF through a complex
mechanism involving both platform code (setstatclockrate) and the
scheduler (pscnt, psdiv, and psratio).  We have a machine-independent
interface to the clock interrupt hardware now, so we no longer need to
do it this way.

- Move profil(2)-specific code from statclock() to a new clock
  interrupt callback, profclock(), in subr_prof.c.  Each
  schedstate_percpu has its own profclock handle.  The profclock is
  enabled/disabled for a given CPU when it is needed by the running
  thread during mi_switch() and sched_exit().

- Move GPROF-specific code from statclock() to a new clock interrupt
  callback, gmonclock(), in subr_prof.c.  Where available, each cpu_info
  has its own gmonclock handle .  The gmonclock is enabled/disabled for
  a given CPU via sysctl(2) in prof_state_toggle().

- Both profclock() and gmonclock() have a fixed period, profclock_period,
  that is initialized during initclocks().

- Export clockintr_advance(), clockintr_cancel(), clockintr_establish(),
  and clockintr_stagger() via <sys/clockintr.h>.  They have external
  callers now.

- Delete pscnt, psdiv, psratio.  From schedstate_percpu, also delete
  spc_pscnt and spc_psdiv.  The statclock frequency is not dynamic
  anymore so these variables are now useless.

- Delete code/state related to the dynamic statclock frequency from
  kern_clockintr.c.  The statclock frequency can still be pseudo-random,
  so move the contents of clockintr_statvar_init() into clockintr_init().

With input from miod@, deraadt@, and claudio@.  Early revisions
cleaned up by claudio.  Early revisions tested by claudio@.  Tested by
cheloha@ on amd64, arm64, macppc, octeon, and sparc64 (sun4v).
Compile- and boot- tested on i386 by mlarkin@.  riscv64 compilation
bugs found by mlarkin@.  Tested on riscv64 by jca@.  Tested on
powerpc64 by gkoehler@.

15 months agostop building unused dhclient
kn [Tue, 25 Jul 2023 14:51:38 +0000 (14:51 +0000)]
stop building unused dhclient

replaced by dhcpleased in 2021, no install media ships dhclient anymore.

OK florian

15 months agoExtend the PCKBC_CANT_TRANSLATE feature, specific to Tadpole/RDI hardware,
miod [Tue, 25 Jul 2023 10:00:44 +0000 (10:00 +0000)]
Extend the PCKBC_CANT_TRANSLATE feature, specific to Tadpole/RDI hardware,
to also support scan code set #3 in addition to the existing scan code set #2.

This makes the built-in keyboard on the Tadpole UltraBook IIe work.

15 months agoFix a few more 0/NULL misspellings
tb [Tue, 25 Jul 2023 10:00:04 +0000 (10:00 +0000)]
Fix a few more 0/NULL misspellings

15 months agoUse [a,b), not [a,b-1] in a comment
tb [Tue, 25 Jul 2023 08:10:30 +0000 (08:10 +0000)]
Use [a,b), not [a,b-1] in a comment

15 months agoEC_POINT_is_on_curve() error is -1, not 0.
tb [Tue, 25 Jul 2023 06:57:26 +0000 (06:57 +0000)]
EC_POINT_is_on_curve() error is -1, not 0.

ok miod

15 months agocpu_idle_{enter,leave} are no-ops on amd64 now, so just #define
guenther [Tue, 25 Jul 2023 06:48:37 +0000 (06:48 +0000)]
cpu_idle_{enter,leave} are no-ops on amd64 now, so just #define
away the calls

ok deraadt@ mpi@ miod@

15 months agoSome hypervisors (such as Hertzner) allow msr read of DE_CFG (which does
deraadt [Tue, 25 Jul 2023 04:42:00 +0000 (04:42 +0000)]
Some hypervisors (such as Hertzner) allow msr read of DE_CFG (which does
not indicate bit 9 set, but they could have a firmware fix) but then block
a msr write to bit 9 (which disables enough AVX optimizations
to prevent the exfiltration of data), with a fault.  So let's also check
the HV bit before we decide to modify the bit.  hypervisors are expected
to set that bit. tested by lucas at sexy dot is.
with jsg, ok mlarkin

15 months agoRegen
miod [Mon, 24 Jul 2023 19:33:29 +0000 (19:33 +0000)]
Regen

15 months agoFix prototype of getlogin_r syscall to match userland prototype (use size_t
miod [Mon, 24 Jul 2023 19:32:23 +0000 (19:32 +0000)]
Fix prototype of getlogin_r syscall to match userland prototype (use size_t
for the length argument).

Fortunately, this only affects 64-bit platforms and all of those would pass
the argument in registers, so there is no BE64 regression to expect and no
need to renumber that system call.

Found with afresh1@ as part of his perl syscall emulator.

15 months agoUse RAWKEY constants for scan code tables, rather than magic numbers.
miod [Mon, 24 Jul 2023 19:29:39 +0000 (19:29 +0000)]
Use RAWKEY constants for scan code tables, rather than magic numbers.
No functional change intended.

15 months agoFix scan code value for print screen key.
miod [Mon, 24 Jul 2023 19:28:40 +0000 (19:28 +0000)]
Fix scan code value for print screen key.

15 months agoFix two EC_POINT_is_on_curve() checks
tb [Mon, 24 Jul 2023 17:08:53 +0000 (17:08 +0000)]
Fix two EC_POINT_is_on_curve() checks

This API can fail for various reasons, in which case it returns -1, so
you need to check if (EC_POINT_is_on_curve_checks(...) <= 0).

ok miod

15 months agoMake sure we do not increase the escape sequence argument count beyond usable
miod [Mon, 24 Jul 2023 17:03:32 +0000 (17:03 +0000)]
Make sure we do not increase the escape sequence argument count beyond usable
bounds, in case escape sequences end up with too many semicolons.
Without this, the kernel could be made to access random memory after receiving
some specially crafted DCS or CSI terminal escape sequences.

Reported by David Leadbeater (dgl, dgl dot cx)

15 months agoFix EC_POINT_is_on_curve() checks.
tb [Mon, 24 Jul 2023 17:00:11 +0000 (17:00 +0000)]
Fix EC_POINT_is_on_curve() checks.

If not even the idiot who invented this API gets this right...

15 months agoFix a minibug in DH_check()
tb [Mon, 24 Jul 2023 16:25:02 +0000 (16:25 +0000)]
Fix a minibug in DH_check()

Or in the flag, don't overwrite the already set ones.

ok jsing

15 months agoSet DE_CFG[9] -- a chickenbit which stops Zenbleed. The chickenbit may
deraadt [Mon, 24 Jul 2023 14:53:58 +0000 (14:53 +0000)]
Set DE_CFG[9] -- a chickenbit which stops Zenbleed.  The chickenbit may
have other side-effects (not disclosed by AMD), and firmwares fixes may
be better (and have other side-effects, same story).  Newer processors
will probably be validated more carefully by AMD.
Issue found by Tavis Ormandy.
This is errata 7.2/033_amdcpu.patch.sig and 7.3/011_amdcpu.patch.sig
Zenbleed also blocked on select cpus by using errata
7.3/012_amdfirmware.patch.sig + 7.3/013_amdcpufirmware.patch /
7.2/034_amdfirmware.patch.sig + 7.2/035_amdcpufirmware.patch.sig
which load AMD cpu firmwares (firmware.openbsd.org is updated often to
contain the best firmwares)
ok jsg

15 months agoafter the boot block changes on i386, sthen noticed a dmesg change
jsg [Mon, 24 Jul 2023 14:02:36 +0000 (14:02 +0000)]
after the boot block changes on i386, sthen noticed a dmesg change
-pci0 at mainbus0 bus 0: configuration mode 1 (bios)
+pci0 at mainbus0 bus 0: configuration mode 1 (no bios)

deraadt then spent many hours narrowing down the problem to the inline
assembly in pciprobe().

It tried to save the carry flag result of pci bios present.  But did so
after a shift which sets the carry flag.  Ask for CF in the output and
avoid the shift.

ok deraadt@ kettenis@

15 months agoRemove OPENSSL_cpuid_setup() call from OPENSSL_add_all_algorithms_noconf()
jsing [Mon, 24 Jul 2023 10:24:58 +0000 (10:24 +0000)]
Remove OPENSSL_cpuid_setup() call from OPENSSL_add_all_algorithms_noconf()

OPENSSL_cpuid_setup() used to need to be called from
OPENSSL_add_all_algorithms(), as that was the main entry point. These days
we do on demand initialisation and there are various paths that lead to
OPENSSL_init_crypto() being called, which in turn calls
OPENSSL_cpuid_setup().

ok tb@

15 months agoMark read/write registers as non-overlapping for bn_qwmulw_{addqw_,}addw()
jsing [Mon, 24 Jul 2023 10:21:29 +0000 (10:21 +0000)]
Mark read/write registers as non-overlapping for bn_qwmulw_{addqw_,}addw()

This does not cause an issue currently, however if called differently to
their current usage, it can lead to an input being overwritten and
incorrect results being generated.

15 months agoUse C99 initializers for x509_name_ff
tb [Mon, 24 Jul 2023 06:56:54 +0000 (06:56 +0000)]
Use C99 initializers for x509_name_ff

15 months agoremove errstr -stats test
tb [Mon, 24 Jul 2023 05:54:12 +0000 (05:54 +0000)]
remove errstr -stats test

reminded by anton

15 months agoI added the 2nd argument (execpromises) to pledge(2), and then hunted
deraadt [Mon, 24 Jul 2023 01:02:47 +0000 (01:02 +0000)]
I added the 2nd argument (execpromises) to pledge(2), and then hunted
for more than a year code which could use it; but in all non-trivial
circumstances (programs which would benefit), I was stopped by issues
(in particular by environment variable behavious).  But I never looked
in ldd(1).  This is the FIRST one which is completely obvious.
spledge(NULL, "stdio rpath")
ok guenther

15 months agoavoid MAIL* environment variables to save a few bytes in install media
kn [Sun, 23 Jul 2023 23:42:03 +0000 (23:42 +0000)]
avoid MAIL* environment variables to save a few bytes in install media

ksh(1) MAIL, MAILCHECK, MAILPATH mbox handling is useless in the installer.

OK miod deraadt

15 months agouse SMALL to save a shave mfs and tmpfs bits in install media
kn [Sun, 23 Jul 2023 23:21:19 +0000 (23:21 +0000)]
use SMALL to save a shave mfs and tmpfs bits in install media

RAMDISK* has MFS and TMPFS disabled, so the installer can't use them.

OK deraadt

15 months agoman page typos; ok jmc@
naddy [Sun, 23 Jul 2023 20:04:45 +0000 (20:04 +0000)]
man page typos; ok jmc@

15 months agoImprove suspend/resume support. Power off the associated power domain
kettenis [Sun, 23 Jul 2023 11:49:17 +0000 (11:49 +0000)]
Improve suspend/resume support.  Power off the associated power domain
during suspend and re-initialize the "dwc3" specific registers upon
resume.

ok patrick@

15 months agoImplement suspend/resume support. This will turn off the power domain
kettenis [Sun, 23 Jul 2023 11:47:20 +0000 (11:47 +0000)]
Implement suspend/resume support.  This will turn off the power domain
associated with a DART when we suspend and turn it back on upon resume.
The DART is reconfigured with the same translation table that was
present when we suspended.

This is only done for DARTs that are under our control; locked DARTs and
DARTs that were enabled at boot time are skipped.

ok patrick@

15 months agoPrevent spurious connection events after resume by caching the current
kettenis [Sun, 23 Jul 2023 11:42:44 +0000 (11:42 +0000)]
Prevent spurious connection events after resume by caching the current
plug state and comparing it with the current plug state when we receive
in interrupt.  Only call the connect/disconnect callbacks registered for
the port if the state really changed.  This prevents an spurious
attach/detach/attach sequence when resuming with a USB device connected.

ok patrick@

15 months agosprinkle some void between () in function definitions
tb [Sun, 23 Jul 2023 11:39:29 +0000 (11:39 +0000)]
sprinkle some void between () in function definitions

15 months agoRemove -stats option from openssl(1) errstr.
tb [Sun, 23 Jul 2023 11:20:11 +0000 (11:20 +0000)]
Remove -stats option from openssl(1) errstr.

This is the only consumer of ERR_get_string_table(), which will go away.

ok jsing

15 months agoEnable power domain.
kettenis [Sun, 23 Jul 2023 11:17:49 +0000 (11:17 +0000)]
Enable power domain.

ok patrick@

15 months agoEnable power domain.
kettenis [Sun, 23 Jul 2023 11:16:36 +0000 (11:16 +0000)]
Enable power domain.

ok patrick@

15 months agoupdate AMD CPU microcode if a newer patch is available
jsg [Sun, 23 Jul 2023 02:59:53 +0000 (02:59 +0000)]
update AMD CPU microcode if a newer patch is available
ok deraadt@

15 months agoupdate AMD CPU microcode if a newer patch is available
jsg [Sun, 23 Jul 2023 01:46:37 +0000 (01:46 +0000)]
update AMD CPU microcode if a newer patch is available
ok deraadt@

15 months agoUse the PMIC SDAM scratch-register blocks to manage the RTC offset instead
patrick [Sat, 22 Jul 2023 22:48:35 +0000 (22:48 +0000)]
Use the PMIC SDAM scratch-register blocks to manage the RTC offset instead
of accessing UEFI variables through the qcscm(4) TEE interface.

ok kettenis@

15 months agoAdd qcsdam(4), a driver for the PMIC Shared Direct Access Memory found on
patrick [Sat, 22 Jul 2023 22:43:53 +0000 (22:43 +0000)]
Add qcsdam(4), a driver for the PMIC Shared Direct Access Memory found on
Qualcomm SoCs.

ok kettenis@

15 months agoTweak previous. Should have been 60 instead of 64
tb [Sat, 22 Jul 2023 19:33:25 +0000 (19:33 +0000)]
Tweak previous. Should have been 60 instead of 64

15 months agoAlign argument names of OBJ_add_sigid() with the other functions.
tb [Sat, 22 Jul 2023 19:08:03 +0000 (19:08 +0000)]
Align argument names of OBJ_add_sigid() with the other functions.

15 months agoRewrite obj_xref.c
tb [Sat, 22 Jul 2023 18:32:05 +0000 (18:32 +0000)]
Rewrite obj_xref.c

Instead of having two unreadable tables placed in a header generated by a
janky perl script from an ugly text file, use a single table inlined in
the C file. This table is used to translate between signature algorithm
OIDs and pairs of OIDs of a message digest and a cipher. The table has
fewer than fifty entries and isn't used in a hot path. Using binary search
is overkill. Just do two linear searches, one for each translation. None
of the original code remains apart from the API.

ok jsing

15 months agoNo need to call OBJ_sigid_free() in EVP_cleanup() anymore.
tb [Sat, 22 Jul 2023 18:12:55 +0000 (18:12 +0000)]
No need to call OBJ_sigid_free() in EVP_cleanup() anymore.

ok jsing

15 months agoNeuter OBJ_add_sigid() and OBJ_sigid_free()
tb [Sat, 22 Jul 2023 18:12:09 +0000 (18:12 +0000)]
Neuter OBJ_add_sigid() and OBJ_sigid_free()

These functions will be removed in the upcoming bump. Nothing uses them,
so it won't hurt if they become noops. This allows us to garbage collect
the sig_app and sigx_app stacks and make a first step towards simplifying
the OBJ_bsearch_() dances. Also sprinkle some const correctness... because
we can.

intermediate step towards a diff that is ok jsing

15 months agoAdapt bn_print() for EdDSA key printing
tb [Sat, 22 Jul 2023 17:20:50 +0000 (17:20 +0000)]
Adapt bn_print() for EdDSA key printing

This is essentially a reimplementation of ASN1_buf_print(). The latter was
only added for these printing purposes and it will be removed again since
nothing uses it. We can then simply remove t_pkey.c in the upcoming bump.

ok jsing

15 months agoSimplify indent handling in bn_print()
tb [Sat, 22 Jul 2023 17:14:08 +0000 (17:14 +0000)]
Simplify indent handling in bn_print()

variant of a suggestion by jsing

15 months agoFix #includes in ct_sct.c
tb [Sat, 22 Jul 2023 17:02:49 +0000 (17:02 +0000)]
Fix #includes in ct_sct.c

This does not need tls1.h (upstream used TLSEXT constants we don't have)
nor does it need evp.h. But it does need asn1.h, objects.h for STACK_OF
and NID_*, among other things and it also uses uint64_t and allocates,
so it needs stdint.h and stdlib.h.

15 months agoAdd `sb_state' output to sobuf_print(). It contains SS_CANTSENDMORE,
mvs [Sat, 22 Jul 2023 14:30:39 +0000 (14:30 +0000)]
Add `sb_state' output to sobuf_print(). It contains SS_CANTSENDMORE,
SS_ISSENDING, SS_CANTRCVMORE and SS_RCVATMARK bits. Also do `sb_flags'
output as hex, it contains flags too.

ok kn bluhm

15 months agoBOOTARG_UCODE for AMD
jsg [Sat, 22 Jul 2023 10:11:19 +0000 (10:11 +0000)]
BOOTARG_UCODE for AMD
ok deraadt@

15 months agosync
tb [Sat, 22 Jul 2023 06:36:24 +0000 (06:36 +0000)]
sync

15 months agoActually add OBJ_find_sigid_algs
tb [Sat, 22 Jul 2023 06:35:26 +0000 (06:35 +0000)]
Actually add OBJ_find_sigid_algs

15 months agoRename OBJ_add_sigid.3 to OBJ_find_sigid_algs.3
tb [Sat, 22 Jul 2023 06:34:59 +0000 (06:34 +0000)]
Rename OBJ_add_sigid.3 to OBJ_find_sigid_algs.3

15 months agomatch AMD x86 CPUs in fw_update(8)
jsg [Sat, 22 Jul 2023 03:46:09 +0000 (03:46 +0000)]
match AMD x86 CPUs in fw_update(8)
ok deraadt@

15 months agoBring src/sys/.gitignore in sync with src/.gitignore.
bluhm [Fri, 21 Jul 2023 22:29:12 +0000 (22:29 +0000)]
Bring src/sys/.gitignore in sync with src/.gitignore.

OK tobhe@

15 months agoDo not dump corrupted packets on loopback bpf.
bluhm [Fri, 21 Jul 2023 22:24:41 +0000 (22:24 +0000)]
Do not dump corrupted packets on loopback bpf.

lo(4) used to dump to bpf only for output.  It seems that when
if_bpf_mtap() was introduced, this changed and lo(4) dumps an
additional truncated packet.  The default bpf_mtap_ether() is not
suitable for lo(4).

Install a dummy lo_bpf_mtap() to suppress bpf on input.

OK mvs@

15 months agobio_asn1 tests: drop unneeded variable
tb [Fri, 21 Jul 2023 20:22:47 +0000 (20:22 +0000)]
bio_asn1 tests: drop unneeded variable

15 months agoAdd missing license for rsa_local.h
tb [Fri, 21 Jul 2023 15:26:51 +0000 (15:26 +0000)]
Add missing license for rsa_local.h

discussed with jsing

15 months agoSimple adjustments for DSO removal
tb [Fri, 21 Jul 2023 10:46:54 +0000 (10:46 +0000)]
Simple adjustments for DSO removal

openssl.cnf.5 will need a major overhaul. But that isn't new...

15 months agoStop mentioning some ERR_load_*_strings that will be removed
tb [Fri, 21 Jul 2023 10:45:44 +0000 (10:45 +0000)]
Stop mentioning some ERR_load_*_strings that will be removed

15 months agoProvide a bunch of always failing ENGINE API
tb [Fri, 21 Jul 2023 09:04:23 +0000 (09:04 +0000)]
Provide a bunch of always failing ENGINE API

This commit adds a few symbols under OPENSSL_NO_ENGINE. They will be used
after the main ENGINE code is disabled in the next bump.

The ecosystem is mostly prepared for dealing with a libcrypto compiled
with OPENSSL_NO_ENGINE. There are a few stragglers like M2Crypto, dovecot
and the latest apr-util release (fixed in their development branch).

To avoid intrusive patching in these ports, we need to keep a bunch of
ENGINE symbols around despite adding OPENSSL_NO_ENGINE. This of course
meant patching some other ports, but that was way easier.

ok jsing

15 months agoFix Xr order to appease mandoc -Tlint
tb [Fri, 21 Jul 2023 05:04:48 +0000 (05:04 +0000)]
Fix Xr order to appease mandoc -Tlint

15 months agoRemove OBJ_add_sigid and OBJ_sigid_free documentation
tb [Fri, 21 Jul 2023 05:02:53 +0000 (05:02 +0000)]
Remove OBJ_add_sigid and OBJ_sigid_free documentation

These will be made internal and will likely go away.  The OBJ_add_sigid.3
manual should probably be renamed; this can be done in a second step.

15 months agosync
tb [Fri, 21 Jul 2023 04:51:27 +0000 (04:51 +0000)]
sync

15 months agoRemove ASN1_buf_print documentation
tb [Fri, 21 Jul 2023 04:50:47 +0000 (04:50 +0000)]
Remove ASN1_buf_print documentation

This function will be made internal-only and likely be renamed/rewritten.

15 months agoRemove remaining ECDSA_METHOD documentation
tb [Fri, 21 Jul 2023 04:44:40 +0000 (04:44 +0000)]
Remove remaining ECDSA_METHOD documentation

15 months agoRemove documentation of ECDH/ECDSA ex_data API
tb [Fri, 21 Jul 2023 04:39:49 +0000 (04:39 +0000)]
Remove documentation of ECDH/ECDSA ex_data API

15 months agoDocument ENGINE_get_default_EC
tb [Fri, 21 Jul 2023 04:35:36 +0000 (04:35 +0000)]
Document ENGINE_get_default_EC

ENGINE_get_default_{ECDH,ECDSA} will go away and won't come back. Replace
their documentation with the missing ENGINE_get_defaulT_EC. In the unlikely
event that we will need to bring back ENGINE after the next bump, this
manual will not be outdated and incomplete.

15 months agoDocument ENGINE_{get,set}_EC
tb [Fri, 21 Jul 2023 04:29:27 +0000 (04:29 +0000)]
Document ENGINE_{get,set}_EC

ENGINE_{get,set}_{ECDH,ECDSA} will go away and won't come back. Replace
their documentation with the missing ENGINE_{get,set}_EC. In the unlikely
event that we will need to bring back ENGINE after the next bump, this
manual will not be outdated and incomplete.

15 months agoRename ARCH_CAPABILITIES_* #defined to ARCH_CAP_*
guenther [Fri, 21 Jul 2023 04:04:51 +0000 (04:04 +0000)]
Rename ARCH_CAPABILITIES_* #defined to ARCH_CAP_*
Provide more ARCH_CAP_* defines per June 2023 SDM

ok jsg@ deraadt@

15 months agoadd missing newline on successful attachment, spotted by bmercer
jcs [Fri, 21 Jul 2023 02:19:49 +0000 (02:19 +0000)]
add missing newline on successful attachment, spotted by bmercer

remove duplicate prefixes on unsuccessful attachment, wrap at 80,
other minor nits

15 months agoRemove unused function prototype.
kettenis [Thu, 20 Jul 2023 20:40:44 +0000 (20:40 +0000)]
Remove unused function prototype.

15 months agoMake sure -msign-return-address doesn't disable BTI support.
kettenis [Thu, 20 Jul 2023 20:32:11 +0000 (20:32 +0000)]
Make sure -msign-return-address doesn't disable BTI support.

ok deraadt@

15 months agofix esoteric error message in case PackageName parses stuff to a bogus
espie [Thu, 20 Jul 2023 17:56:37 +0000 (17:56 +0000)]
fix esoteric error message in case PackageName parses stuff to a bogus
fullpkgname, as seen by Matthias Schmidt

15 months agoRemove a few workarounds that are no longer necessary
tb [Thu, 20 Jul 2023 17:27:54 +0000 (17:27 +0000)]
Remove a few workarounds that are no longer necessary

15 months agoRemove some ancient cruft that hasn't been used in ages
tb [Thu, 20 Jul 2023 16:36:06 +0000 (16:36 +0000)]
Remove some ancient cruft that hasn't been used in ages

discussed with jsing

15 months agosync
tb [Thu, 20 Jul 2023 16:28:03 +0000 (16:28 +0000)]
sync

15 months agoMove get_rfc3526_prime_8192.3 to BN_get_rfc3526_prime_8192.3
tb [Thu, 20 Jul 2023 16:26:40 +0000 (16:26 +0000)]
Move get_rfc3526_prime_8192.3 to BN_get_rfc3526_prime_8192.3

This way we will have a manual corresponding to an existing function after
the next bump.

15 months agoRemove unnecessary inclusion of dso.h
tb [Thu, 20 Jul 2023 15:08:12 +0000 (15:08 +0000)]
Remove unnecessary inclusion of dso.h

15 months agoRemove last internal consumer of DSO
tb [Thu, 20 Jul 2023 15:05:30 +0000 (15:05 +0000)]
Remove last internal consumer of DSO

It is currently possible to extend libcrypto by having it load a shared
object via dlopen() either from a config file on library initialization
or when an application calls the relevant API. Recent and not so recent
events showed how dangerous an idea dlopen() is. Independently of such
concerns, this should not be handled in the characteristically convoluted
way of this toolkit. DSO will go away in the upcoming bump. This commit
clears the road for a plain cvs rm of the dso code.

ok jsing

15 months agoeng_aesni.c: add evp_local.h so it compiles again.
tb [Thu, 20 Jul 2023 14:17:13 +0000 (14:17 +0000)]
eng_aesni.c: add evp_local.h so it compiles again.

15 months agoUse sizeof(destination) not sizeof(source) in strlcpy() calls.
claudio [Thu, 20 Jul 2023 11:10:03 +0000 (11:10 +0000)]
Use sizeof(destination) not sizeof(source) in strlcpy() calls.
OK tb@

15 months agoRevert rev 1.129:
claudio [Thu, 20 Jul 2023 09:43:00 +0000 (09:43 +0000)]
Revert rev 1.129:
When detaching devices when we suspend, we need to continue processing
command completion events.  So only return early in xhci_softintr() if
the controller is dead instead of dying.  This fixes USB suspend/resume
in Apple M1/M2.

ok mlarkin@, deraadt@
-----

The change does not only allow completion events to be processed but also
events that get processed by the drivers attached to this usb bus. As a
result I see a uvm panic on suspend in urtwn(4) which is triggered by a
bad rx eof.

OK kettenis@

15 months agoRemove get_rfc*_prime_* documentation
tb [Thu, 20 Jul 2023 09:38:45 +0000 (09:38 +0000)]
Remove get_rfc*_prime_* documentation

Their BN_get_rfc*_prime_* aliases from the OpenSSL 1.1 API will remain.
Perhaps the manual should be moved to BN_get_rfc3526_prime_8192.3; that
can be done in a second step.

15 months agoRemove ECDSA_{do_,}sign_ex() and ECDSA_sign_setup()
tb [Thu, 20 Jul 2023 09:28:30 +0000 (09:28 +0000)]
Remove ECDSA_{do_,}sign_ex() and ECDSA_sign_setup()

These very poorly designed interfaces will go away, so stop documenting
them.

15 months agodrm/i915/tc: Fix system resume MST mode restore for DP-alt sinks
jsg [Thu, 20 Jul 2023 09:07:39 +0000 (09:07 +0000)]
drm/i915/tc: Fix system resume MST mode restore for DP-alt sinks

From Imre Deak
1bdcffaa0d2c1dd0510d1b364c409e1c8fc96aa3 in linux-6.1.y/6.1.39
06f66261a1567d66b9d35c87393b6edfbea4c8f8 in mainline linux