openbsd
18 months agoRemove unused variables FSDISKTYPE that point at non-existant
krw [Mon, 17 Apr 2023 22:28:51 +0000 (22:28 +0000)]
Remove unused variables FSDISKTYPE that point at non-existant
'install' disktab entries.

No functional change.

18 months agoSkip binary curves in ec_point_conversion
tb [Mon, 17 Apr 2023 21:00:35 +0000 (21:00 +0000)]
Skip binary curves in ec_point_conversion

18 months agoReverse the polarity of flowspec_cmp() so it works better with our
claudio [Mon, 17 Apr 2023 20:54:57 +0000 (20:54 +0000)]
Reverse the polarity of flowspec_cmp() so it works better with our
RB trees. Mainly RB_FOREACH() walks form RB_MIN to RB_MAX so the most
preferred entry should be at RB_MIN.
OK tb@

18 months agoSwitch all ec tests to using dynamic linking
tb [Mon, 17 Apr 2023 20:41:02 +0000 (20:41 +0000)]
Switch all ec tests to using dynamic linking

This only requires very minor changes and simplifies testing quite a bit.
Some of the changes can be undone after the next bump.

18 months agoSimplify Makefile
tb [Mon, 17 Apr 2023 20:36:08 +0000 (20:36 +0000)]
Simplify Makefile

18 months agoDrop GF2m tests
tb [Mon, 17 Apr 2023 19:56:39 +0000 (19:56 +0000)]
Drop GF2m tests

The code they test will go away soon.

18 months agoAllow overriding the bc implementation used in run-bc
tb [Mon, 17 Apr 2023 19:51:05 +0000 (19:51 +0000)]
Allow overriding the bc implementation used in run-bc

While base bc is great, it uses libcrypto's BIGNUM implementation.
This implies that the independent verification of the bn_test isn't
as independent as it should be.

With this commit, run-bc picks up bn-gh if it is installed. This appears
to work on amd64, arm64 and sparc64 (where gbc is busted). I will send
PRs to the regress maintainers once I will have tested this a bit more
thoroughly. Committing this early since I juggle way too many diffs
already.

18 months agoFix typo
tb [Mon, 17 Apr 2023 19:37:18 +0000 (19:37 +0000)]
Fix typo

18 months agoIgnore the user keys range when checking if a key is Unicode.
nicm [Mon, 17 Apr 2023 18:22:24 +0000 (18:22 +0000)]
Ignore the user keys range when checking if a key is Unicode.

18 months agoMake -mbranch-protection=bti the default on OpenBSD.
kettenis [Mon, 17 Apr 2023 18:10:26 +0000 (18:10 +0000)]
Make -mbranch-protection=bti the default on OpenBSD.

ok deraadt@

18 months agoIt seems silly to use progname for version, just always say tmux.
nicm [Mon, 17 Apr 2023 18:00:19 +0000 (18:00 +0000)]
It seems silly to use progname for version, just always say tmux.

18 months agoMake the check if printing is allowed the same as writing which is less
nicm [Mon, 17 Apr 2023 17:58:35 +0000 (17:58 +0000)]
Make the check if printing is allowed the same as writing which is less
confusing.

18 months agoDiscard mouse sequences that have the right form but actually are
nicm [Mon, 17 Apr 2023 17:57:35 +0000 (17:57 +0000)]
Discard mouse sequences that have the right form but actually are
invalid (for example have column zero rather than one).

18 months agoDrop two useless READMEs
tb [Mon, 17 Apr 2023 17:38:08 +0000 (17:38 +0000)]
Drop two useless READMEs

"go ahead" jsing

18 months agofix buffer overflow in displaymatch(); ok/tweak tb@
op [Mon, 17 Apr 2023 15:18:25 +0000 (15:18 +0000)]
fix buffer overflow in displaymatch(); ok/tweak tb@

18 months agoSkip sect* curve checks
tb [Mon, 17 Apr 2023 15:11:00 +0000 (15:11 +0000)]
Skip sect* curve checks

GF2m curves will go away soon. This reduces the pile of diffs in my jungle
a tiny little bit.

18 months agoIndent interface and disk listings
kn [Mon, 17 Apr 2023 13:59:16 +0000 (13:59 +0000)]
Indent interface and disk listings

'?' output to list available answers could better distuingish from questions
and other lines, like sets selection does with four leading spaces.

OK deraadt

18 months agoConvert all users of parse_number() to also process the next element
claudio [Mon, 17 Apr 2023 13:48:31 +0000 (13:48 +0000)]
Convert all users of parse_number() to also process the next element
like it was done for communities. Again a fair amount of token tables
disappear.
OK tb@

18 months agoc_zlib.c needs bio_local.h with -DZLIB.
tb [Mon, 17 Apr 2023 13:18:00 +0000 (13:18 +0000)]
c_zlib.c needs bio_local.h with -DZLIB.

Apparently nobody tried to compile libcrypto with ZLI since Jan 2022.
Maybe this means that we can unifdef -U ZLIB or maybe not...

18 months agoTweak indent and use named registers.
jsing [Mon, 17 Apr 2023 12:51:09 +0000 (12:51 +0000)]
Tweak indent and use named registers.

No functional change.

18 months agoIn parse_prefix and parse_addr only touch the addr if the functions is
claudio [Mon, 17 Apr 2023 12:48:38 +0000 (12:48 +0000)]
In parse_prefix and parse_addr only touch the addr if the functions is
successful. Do not clear it all the time since that breaks the ANYTOKEN
fallback since it resets the just set address on the next argument.
OK tb@

18 months agoHook sha3 up to build.
jsing [Mon, 17 Apr 2023 12:46:36 +0000 (12:46 +0000)]
Hook sha3 up to build.

ok tb@

18 months agoMove BN_bn2mpi()/BN_mpi2bn() into bn_convert.c
jsing [Mon, 17 Apr 2023 12:36:59 +0000 (12:36 +0000)]
Move BN_bn2mpi()/BN_mpi2bn() into bn_convert.c

18 months agoPassing argv as tripple indirect pointer to match_token() is just strange.
claudio [Mon, 17 Apr 2023 11:02:40 +0000 (11:02 +0000)]
Passing argv as tripple indirect pointer to match_token() is just strange.
Instead pass argc and argv as value and return the consumed number of
arguments in argsused (normally 1).
OK tb@

18 months agoRework how communities are parsed. Use tha fact that argv and argc are
claudio [Mon, 17 Apr 2023 10:23:32 +0000 (10:23 +0000)]
Rework how communities are parsed. Use tha fact that argv and argc are
available inside match_token() and peek and consume argv[1] and for
ext-communities also argv[2].
OK tb@

18 months agofix a few dobeep_msgs() calls: a space is already added between the arguments
op [Mon, 17 Apr 2023 10:11:30 +0000 (10:11 +0000)]
fix a few dobeep_msgs() calls: a space is already added between the arguments

ok tb@

18 months agoadd doindent() prototype at the start of the file; forgotten in previous
op [Mon, 17 Apr 2023 09:53:08 +0000 (09:53 +0000)]
add doindent() prototype at the start of the file; forgotten in previous

18 months agoresurrect mg' no-tab-mode
op [Mon, 17 Apr 2023 09:49:04 +0000 (09:49 +0000)]
resurrect mg' no-tab-mode

It's a mode that makes mg insert spaces up to the next tab stop upon
pressing TAB, along with the various tweaks needed in other places so
for e.g. auto-indent-mode also uses spaces.

This is not just an unifdef NOTAB: even under no-tab-mode mg should
consider literal TAB characters wide up to the next tab stop, while the
hidden code considered hard tabs to be just control character (i.e. ^I)
with width of two columns.  I'm also introducing the helper function
doindent() in utils.c to de-obfuscate the insertion of tabs/spaces until
the given column.

ok tb@

18 months agoUse C99 initializers for the default_pctx and mark it static const
tb [Mon, 17 Apr 2023 08:43:16 +0000 (08:43 +0000)]
Use C99 initializers for the default_pctx and mark it static const

18 months agoAdd basic flowspec regress test.
claudio [Mon, 17 Apr 2023 08:02:55 +0000 (08:02 +0000)]
Add basic flowspec regress test.

18 months agoImplement a basic API to work with flowspec NLRI.
claudio [Mon, 17 Apr 2023 08:02:21 +0000 (08:02 +0000)]
Implement a basic API to work with flowspec NLRI.

Flowspec is excessivly flexible and large so there is no way to convert
the flowspec data into a struct bgpd_addr and it is better to keep it in
wireformat and add a few functions to validate and extract information
from the NLRI encoding.
OK tb@

18 months agoAdd missing const qualifiers to the v3_* externs
tb [Mon, 17 Apr 2023 06:46:19 +0000 (06:46 +0000)]
Add missing const qualifiers to the v3_* externs

ok jsing

18 months agoFix whitespace in DHparam_print_fp()
tb [Mon, 17 Apr 2023 05:57:17 +0000 (05:57 +0000)]
Fix whitespace in DHparam_print_fp()

18 months agoRemove now unused dh_prn.c
tb [Mon, 17 Apr 2023 05:54:41 +0000 (05:54 +0000)]
Remove now unused dh_prn.c

18 months agoDrop dh_prn.c
tb [Mon, 17 Apr 2023 05:54:20 +0000 (05:54 +0000)]
Drop dh_prn.c

18 months agoMove DHparam_print_fp() next to DHparam_print()
tb [Mon, 17 Apr 2023 05:51:16 +0000 (05:51 +0000)]
Move DHparam_print_fp() next to DHparam_print()

As usual with the fp suffix, the former wraps the latter with a file BIO.
There is no reason for this function to be in a separate file.

18 months agoremove bad Pp;
jmc [Mon, 17 Apr 2023 05:45:06 +0000 (05:45 +0000)]
remove bad Pp;
(sorry, otto, for not spotting in the updated diff)

18 months agofix a macro and tweak punctuation;
jmc [Mon, 17 Apr 2023 05:43:12 +0000 (05:43 +0000)]
fix a macro and tweak punctuation;

18 months agodrm/i915: Split icl_color_commit_noarm() from skl_color_commit_noarm()
jsg [Mon, 17 Apr 2023 05:38:17 +0000 (05:38 +0000)]
drm/i915: Split icl_color_commit_noarm() from skl_color_commit_noarm()

From Ville Syrjala
726825297dd6aaa2d91daf7c1c2fd030859cc6cb in linux-6.1.y/6.1.24
76b767d4d1cd052e455cf18e06929e8b2b70101d in mainline linux

18 months agodrm/i915: Use _MMIO_PIPE() for SKL_BOTTOM_COLOR
jsg [Mon, 17 Apr 2023 05:35:37 +0000 (05:35 +0000)]
drm/i915: Use _MMIO_PIPE() for SKL_BOTTOM_COLOR

From Ville Syrjala
64244a900ddff4abd4c894dcfa9ea7df898ad1eb in linux-6.1.y/6.1.24
05ca98523481aa687c5a8dce8939fec539632153 in mainline linux

18 months agodrm/i915/dp_mst: Fix payload removal during output disabling
jsg [Mon, 17 Apr 2023 05:32:30 +0000 (05:32 +0000)]
drm/i915/dp_mst: Fix payload removal during output disabling

From Imre Deak
1297278ce23977853afeac7bfb65e42450a722dd in linux-6.1.y/6.1.24
eb50912ec931913e70640cecf75cb993fd26995f in mainline linux

18 months agodrm/display/dp_mst: Handle old/new payload states in drm_dp_remove_payload()
jsg [Mon, 17 Apr 2023 05:29:45 +0000 (05:29 +0000)]
drm/display/dp_mst: Handle old/new payload states in drm_dp_remove_payload()

From Imre Deak
0c64d72fd3f21ac9d0da186809394d9593090ce7 in linux-6.1.y/6.1.24
e761cc20946a0094df71cb31a565a6a0d03bd8be in mainline linux

18 months agodrm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset
jsg [Mon, 17 Apr 2023 05:21:13 +0000 (05:21 +0000)]
drm/amdgpu: skip psp suspend for IMU enabled ASICs mode2 reset

From Tim Huang
62de38c8201d853b130fc54ddbfab748180053e2 in linux-6.1.y/6.1.24
e11c775030c5585370fda43035204bb5fa23b139 in mainline linux

18 months agodrm/amdgpu: for S0ix, skip SDMA 5.x+ suspend/resume
jsg [Mon, 17 Apr 2023 05:19:09 +0000 (05:19 +0000)]
drm/amdgpu: for S0ix, skip SDMA 5.x+ suspend/resume

From Alex Deucher
73ca74fc7ab6c1679c3b2720579c0c20b73a9764 in linux-6.1.y/6.1.24
2a7798ea7390fd78f191c9e9bf68f5581d3b4a02 in mainline linux

18 months agodrm/amd/display: Clear MST topology if it fails to resume
jsg [Mon, 17 Apr 2023 05:17:20 +0000 (05:17 +0000)]
drm/amd/display: Clear MST topology if it fails to resume

From Roman Li
245525543f48cd9eabd2964d8931043e9e3c31cf in linux-6.1.y/6.1.24
3f6752b4de41896c7f1609b1585db2080e8150d8 in mainline linux

18 months agodrm/i915: fix race condition UAF in i915_perf_add_config_ioctl
jsg [Mon, 17 Apr 2023 05:15:40 +0000 (05:15 +0000)]
drm/i915: fix race condition UAF in i915_perf_add_config_ioctl

From Min Li
240b1502708858b5e3f10b6dc5ca3f148a322fef in linux-6.1.y/6.1.24
dc30c011469165d57af9adac5baff7d767d20e5c in mainline linux

18 months agodrm/i915: Fix context runtime accounting
jsg [Mon, 17 Apr 2023 05:13:20 +0000 (05:13 +0000)]
drm/i915: Fix context runtime accounting

From Tvrtko Ursulin
4e29fb89f771316caed9e4d166213b10dd49eb2e in linux-6.1.y/6.1.24
dc3421560a67361442f33ec962fc6dd48895a0df in mainline linux

18 months agofix double word
jsg [Mon, 17 Apr 2023 04:46:04 +0000 (04:46 +0000)]
fix double word

18 months agoOops, ramdisk case should be -fcf-protection=none
deraadt [Mon, 17 Apr 2023 01:14:24 +0000 (01:14 +0000)]
Oops, ramdisk case should be -fcf-protection=none
spotted by brynet

18 months agoEnable Indirect Branch Tracking (IBT) for the kernel
jsg [Mon, 17 Apr 2023 00:42:04 +0000 (00:42 +0000)]
Enable Indirect Branch Tracking (IBT) for the kernel

endbr64 (f3 0f 1e fa) is placed at valid targets of an indirect jmp or
call.  A nop on older machines.  When IBT is enabled, an indirect jmp or
call with no endbr will trigger a control protection trap.

IBT is present on Intel Tiger Lake (Core gen 11) and later.

with and ok deraadt@

18 months agoFor future userland IBT, the sigcode needs to start with a endbr64.
deraadt [Mon, 17 Apr 2023 00:14:59 +0000 (00:14 +0000)]
For future userland IBT, the sigcode needs to start with a endbr64.
This is simpler than clearing the cet_u bits in the kernel.
ok guenther, kettenis

18 months agoThe bootblocks are 32-bit binaries which use the ENTRY() macros which now
deraadt [Mon, 17 Apr 2023 00:05:35 +0000 (00:05 +0000)]
The bootblocks are 32-bit binaries which use the ENTRY() macros which now
include endbr64 macros.  That's not going to work, so use the simple method
of -Dendbr64= to remove them from the instruction stream.
ok kettenis guenther

18 months agoIDTVEC_NOALIGN() was the incorrect way to create a label in two places,
deraadt [Mon, 17 Apr 2023 00:03:59 +0000 (00:03 +0000)]
IDTVEC_NOALIGN() was the incorrect way to create a label in two places,
use GENTRY() instead.  Also add two endbr64 which cannot be supplied by
macros
ok guenther

18 months agoAdd endbr64 instructions to most of the ENTRY() macros.
deraadt [Mon, 17 Apr 2023 00:02:14 +0000 (00:02 +0000)]
Add endbr64 instructions to most of the ENTRY() macros.
The IDTVEC() and KIDTVEC() macros also get a endbr64, and therefore we need
to change the way that vectors are aliased with a new IDTVEC_ALIAS() macro.
with guenther, jsg

18 months agocompile regular kernels with -fcf-protection=branch, and ramdisks with
deraadt [Sun, 16 Apr 2023 23:57:59 +0000 (23:57 +0000)]
compile regular kernels with -fcf-protection=branch, and ramdisks with
-fcf-protection=none, regardless of what the compiler default is.
-fcf-protection=branch puts endbr64 instructions on functions which could
be reached indirectly.
ok guenther kettenis

18 months agoFix previous: add a missing and
tb [Sun, 16 Apr 2023 23:19:28 +0000 (23:19 +0000)]
Fix previous: add a missing and

18 months agoclockintr: add shadow copy of running clock interrupt to clockintr_queue
cheloha [Sun, 16 Apr 2023 21:19:26 +0000 (21:19 +0000)]
clockintr: add shadow copy of running clock interrupt to clockintr_queue

cq_shadow is a private copy of the running clock interrupt passed to
cl_func() during the dispatch loop.  It resembles the real clockintr
object, though the two are distinct (hence "shadow").  A private copy
is useful for two reasons:

1. Scheduling operations performed on cq_shadow (advance, cancel,
   schedule) are recorded as requests with the CLST_SHADOW_PENDING
   flag and are normally performed on the real clockintr when cl_func()
   returns.  However, if an outside thread performs a scheduling
   operation on the real clockintr while cl_func() is running, the
   CLST_IGNORE_SHADOW flag is set and any scheduling operations
   requested by the running clock interrupt are ignored.

   The upshot of this arrangement is that outside scheduling operations
   have priority over those requested by the running clock interrupt.
   Because there is no race, periodic clock interrupts can now be safely
   stopped without employing the serialization mechanisms needed to safely
   stop periodic timeouts or tasks.

2. &cq->cq_shadow is a unique address, so most clockintr_* API calls
   made while cl_func() is running now don't need to enter/leave
   cq_mtx: the API can recognize when it is being called in the midst
   of clockintr_dispatch().

Tested by mlarkin@.  With input from dlg@.

In particular, dlg@ expressed some design concerns but then stopped
responding.  I have changes planned to address some of the concerns.
I think if we hit a wall with the current clockintr design we could
change the allocation scheme without too much suffering.  I don't
anticipate there being more than ~20 distinct clock interrupts.

18 months agoif (actually... when) the compiler is flipped to do BTI/ENDBR by default,
deraadt [Sun, 16 Apr 2023 19:57:01 +0000 (19:57 +0000)]
if (actually... when) the compiler is flipped to do BTI/ENDBR by default,
the install media would grow too much, so use the same strategy as we
for stack protector and other things: disable them, just on the install
media
ok kettenis

18 months agoDump (leak) info using utrace(2) and compile the code always in
otto [Sun, 16 Apr 2023 19:46:17 +0000 (19:46 +0000)]
Dump (leak) info using utrace(2) and compile the code always in
except for bootblocks. This way we have built-in leak detecction
always (if enable by malloc flags). See man pages for details.

18 months agoAdd a -u label option to print selected utrace records, used by upcoming
otto [Sun, 16 Apr 2023 19:42:40 +0000 (19:42 +0000)]
Add a -u label option to print selected utrace records, used by upcoming
malloc (leak) dump fucntion. ok semarie@

18 months agoGarbage collect the now unused obfuscating macro string_stack_free()
tb [Sun, 16 Apr 2023 19:16:32 +0000 (19:16 +0000)]
Garbage collect the now unused obfuscating macro string_stack_free()

18 months agoInline the three uses of string_stack_free()
tb [Sun, 16 Apr 2023 19:15:31 +0000 (19:15 +0000)]
Inline the three uses of string_stack_free()

sk_OPENSSL_STRING_pop_free() is much more explicit and isn't that much
more complicated. x509_util.c can also use it directly...

No binary change

18 months agoRemove the now unused vpm_int.h
tb [Sun, 16 Apr 2023 18:50:28 +0000 (18:50 +0000)]
Remove the now unused vpm_int.h

18 months agox509_vfy.c and x509_vpm.c don't need vpm_int.h anymore
tb [Sun, 16 Apr 2023 18:48:58 +0000 (18:48 +0000)]
x509_vfy.c and x509_vpm.c don't need vpm_int.h anymore

18 months agoMove X509_VERIFY_PARAM_st from vpm_int.h to x509_local.h
tb [Sun, 16 Apr 2023 18:42:30 +0000 (18:42 +0000)]
Move X509_VERIFY_PARAM_st from vpm_int.h to x509_local.h

18 months agoFix (and simplify) link speed reporting.
kettenis [Sun, 16 Apr 2023 17:26:14 +0000 (17:26 +0000)]
Fix (and simplify) link speed reporting.

ok jsg@

18 months agoProvide EVP methods for SHA3 224/256/384/512.
jsing [Sun, 16 Apr 2023 17:06:19 +0000 (17:06 +0000)]
Provide EVP methods for SHA3 224/256/384/512.

ok tb@

18 months agoProvide EVP methods for SHA512/224 and SHA512/256.
jsing [Sun, 16 Apr 2023 16:42:06 +0000 (16:42 +0000)]
Provide EVP methods for SHA512/224 and SHA512/256.

ok tb@

18 months agoBounds check mdlen that is passed to sha3_init().
jsing [Sun, 16 Apr 2023 15:32:16 +0000 (15:32 +0000)]
Bounds check mdlen that is passed to sha3_init().

While here, use KECCAK_BYTE_WIDTH instead of hardcoding the value.

18 months agoAdd PT_GNU_PROPERTY define.
kettenis [Sun, 16 Apr 2023 13:35:58 +0000 (13:35 +0000)]
Add PT_GNU_PROPERTY define.

ok deraadt@

18 months agovmd(8): correct comment in vioraw, cleanup formatting.
dv [Sun, 16 Apr 2023 12:52:54 +0000 (12:52 +0000)]
vmd(8): correct comment in vioraw, cleanup formatting.

Comment incorrectly mentioned returning sectors when this function
returns bytes; the logic in virtio.c computes the number of 512
byte sectors after calling virtio_raw_init.

While here, adjust the formatting of return's to match the rest of vmd.

No functional change.

18 months agovmd(8): clean up fd closing in vmm process.
dv [Sun, 16 Apr 2023 12:47:26 +0000 (12:47 +0000)]
vmd(8): clean up fd closing in vmm process.

Some mild tidying of fd closing in the vmm process in prep for
landing parts of my fork+exec diff.

With input from guenther@ on the nuances of if/when EINTR may happen
in a call to close(2).

ok mlarkin@

18 months agoAdd support for the PCIe controller found on M2 Pro/Max SoCs. While the
kettenis [Sun, 16 Apr 2023 12:09:01 +0000 (12:09 +0000)]
Add support for the PCIe controller found on M2 Pro/Max SoCs.  While the
bindings are still preliminary I don't exepect any substantial changes
that would affect the driver.  Hopefully the bindings will end up
officially approved before OpenBSD 7.4 gets released.

ok patrick@

18 months agoShuffle ext_cmp() and ext_list_free() up a bit
tb [Sun, 16 Apr 2023 12:08:03 +0000 (12:08 +0000)]
Shuffle ext_cmp() and ext_list_free() up a bit

18 months agoRemove unnecessary prototypes in the middle of the code
tb [Sun, 16 Apr 2023 12:05:31 +0000 (12:05 +0000)]
Remove unnecessary prototypes in the middle of the code

In addition, ext_cmp() was already prototyped earlier...

18 months agoUse more usual version of inlined nitems(). No binary change.
tb [Sun, 16 Apr 2023 12:01:15 +0000 (12:01 +0000)]
Use more usual version of inlined nitems(). No binary change.

18 months agoFix comment formatting and grammar, drop usless and outdated comment
tb [Sun, 16 Apr 2023 11:59:50 +0000 (11:59 +0000)]
Fix comment formatting and grammar, drop usless and outdated comment

18 months agoRemove now empty/unused ext_dat.h
tb [Sun, 16 Apr 2023 11:53:40 +0000 (11:53 +0000)]
Remove now empty/unused ext_dat.h

18 months agoMerge ext_dat.h back into x509_lib.c
tb [Sun, 16 Apr 2023 11:52:52 +0000 (11:52 +0000)]
Merge ext_dat.h back into x509_lib.c

There is no point in having this in a separate internal header.

discussed with jsing

18 months agoToo many ACPI implementations advertise serial ports that aren't actually
kettenis [Sun, 16 Apr 2023 11:38:42 +0000 (11:38 +0000)]
Too many ACPI implementations advertise serial ports that aren't actually
implemented.  This leads to hangs when we run "ttyflags -a" in /etc/rc.
Add the same probe that we have in the ISA version of the driver to make
sure the port is actually there.

ok patrick@

18 months agoAdd no-op implementations of the WSDISPLAYIO_GVIDEO and WSDISPLAYIO_SVIDEO
kettenis [Sun, 16 Apr 2023 11:34:32 +0000 (11:34 +0000)]
Add no-op implementations of the WSDISPLAYIO_GVIDEO and WSDISPLAYIO_SVIDEO
ioctls.  Everything we need from them is handled by wsdisplay(4) already,
but we need to handle them here to signal that we actually implement
burner support.

ok tb@, tobhe@

18 months agoMake enabling the BTI feature a per-pmap thing by storing the ATTR_GP bit
kettenis [Sun, 16 Apr 2023 11:14:26 +0000 (11:14 +0000)]
Make enabling the BTI feature a per-pmap thing by storing the ATTR_GP bit
in a new pm_guarded member of struct pmap and using this member to add
the bits to the PTEs

ok deraadt@

18 months agoClear BTYPE bits when setting up a signal handler and when handling a
kettenis [Sun, 16 Apr 2023 10:14:59 +0000 (10:14 +0000)]
Clear BTYPE bits when setting up a signal handler and when handling a
PT_CONTINUE ptrace(2) request.  Otherwise we would trap if userland was
interrupted at a point where it is doing an indirect branch that has set
the bits but before it has executed the BTI instruction at the branch
target.

The PT_SETREGS request may need similar treatment, at least when the
PC is changed.  But Linux doesn't do this and debuggers might want full
control over the BTYPE bits.  So leave this alone for now.

ok guenther@

18 months agoMark X9.31 BN API for removal
tb [Sun, 16 Apr 2023 09:13:46 +0000 (09:13 +0000)]
Mark X9.31 BN API for removal

This supports a mostly forgotten, seemingly unused and long retired
standard. No need for this in our public API Dyson sphere.

ok jsing

18 months agoThe BN reciprocal API will also become internal-only
tb [Sun, 16 Apr 2023 09:11:06 +0000 (09:11 +0000)]
The BN reciprocal API will also become internal-only

This is unused outside of the library and could do with some reworking.
That's easier without having to care about outside consumers.

ok jsing

18 months agoVarious BN*init() will be removed from the public API
tb [Sun, 16 Apr 2023 09:08:20 +0000 (09:08 +0000)]
Various BN*init() will be removed from the public API

With the corresponding structs now being opaque, the only thing they are
good for outside the library are memory leaks. They will be removed
completely or become internal only.

ok jsing

18 months agoMark public bn_nist and ec_nist API for removal
tb [Sun, 16 Apr 2023 08:55:44 +0000 (08:55 +0000)]
Mark public bn_nist and ec_nist API for removal

The faster nist code is rife with problematic C. While this is generally
considered to be a pleonasm nowadays, here it specifically refers to
aliasing issues and other flavors of undefined behavior. With compilers
and standardization committees becoming seemingly more determined about
making C even more unusable than it already is, this code has resulted
in miscompilations and generally is a target rich environment for fuzzers
to feast on. We're better off without it. Go look while it's still there.
It's some of the very worst we have to offer.

ok jsing

18 months agoMark EC_KEY_{get,insert}_method_data() for removal
tb [Sun, 16 Apr 2023 08:36:13 +0000 (08:36 +0000)]
Mark EC_KEY_{get,insert}_method_data() for removal

This is unused and in the way of some house keeping. Thus it will be
relocated to the attic.

ok jsing

18 months agoMark TS_VERIFY_CTX_init() for removal
tb [Sun, 16 Apr 2023 08:31:54 +0000 (08:31 +0000)]
Mark TS_VERIFY_CTX_init() for removal

With opaque TS_VERIFY_CTX the init function dangerous and useless.
It will be dropped.

ok jsing

18 months agoPrepare addition of X509_STORE_CTX_get1_{certs,crls}(3)
tb [Sun, 16 Apr 2023 08:30:21 +0000 (08:30 +0000)]
Prepare addition of X509_STORE_CTX_get1_{certs,crls}(3)

X509_STORE_get1_{certs,crls}(3) was added to the OpenSSL 1.1 API with the
usual care. At some point later it was noticed that they didn't deal with
an X509_STORE at all, but rather with an X509_STORE_CTX, so were misnamed.
The fact that X509_STORE_CTX and X509_STORE have their roles reversed when
compared to other FOO vs FOO_CTX in this API may or may not be related.

Anyway, the X509_STORE versions will be demoted to compat defines and the
X509_STORE_CTX will be added to match OpenSSL 1.1 API more closely. This
was pointed out by schwarze a long time ago and missed in a few bumps.
Hopefully we'll manage to do it this time around.

ok jsing

18 months agoMark remaining policy tree public API for removal
tb [Sun, 16 Apr 2023 08:21:12 +0000 (08:21 +0000)]
Mark remaining policy tree public API for removal

ok jsing

18 months agoAnnotate policy tree STACK_OF() goo for removal from public API
tb [Sun, 16 Apr 2023 08:18:10 +0000 (08:18 +0000)]
Annotate policy tree STACK_OF() goo for removal from public API

ok jsing

18 months agoThe policy tree types become internal ony. Annotate them.
tb [Sun, 16 Apr 2023 08:17:04 +0000 (08:17 +0000)]
The policy tree types become internal ony. Annotate them.

ok jsing

18 months agoCipher text stealing will go away. Mark it for removal.
tb [Sun, 16 Apr 2023 08:14:34 +0000 (08:14 +0000)]
Cipher text stealing will go away. Mark it for removal.

ok jsing

18 months agoMark proxy policy API for removal in upcoming bump
tb [Sun, 16 Apr 2023 08:11:38 +0000 (08:11 +0000)]
Mark proxy policy API for removal in upcoming bump

ok jsing

18 months agoRemove the now unused ex_pcpathlen from the X509 struct
tb [Sun, 16 Apr 2023 08:08:34 +0000 (08:08 +0000)]
Remove the now unused ex_pcpathlen from the X509 struct

ok jsing

18 months agoMore ProxyCertInfo tentacles go to the attic
tb [Sun, 16 Apr 2023 08:06:42 +0000 (08:06 +0000)]
More ProxyCertInfo tentacles go to the attic

This removes ProxyCertInfo from extension caching, issuer checking
and it also drops the special path validation for proxy certs from
the legacy verifier.

ok jsing

18 months agoThe lowest performance level state for the E-cores on the M2 Pro/Max is
kettenis [Sun, 16 Apr 2023 08:02:45 +0000 (08:02 +0000)]
The lowest performance level state for the E-cores on the M2 Pro/Max is
2 instead of 1.  Handle this by taking the lowest state from the opp tables
instead of hardcoding it.  Fixes cpuperf on the M2 Pro/Max.

ok patrick@

18 months agoRemove some dead code from the new verifier
tb [Sun, 16 Apr 2023 07:59:57 +0000 (07:59 +0000)]
Remove some dead code from the new verifier

The new verifier API is currently unused as we still operate the verifier
in legacy mode. Therefore ctx->xsc is always set and the EXFLAG_PROXY will
soon be dropped from the library, so this error on encountering proxy certs
is effectively doubly dead code.

ok jsing

18 months agoDrop support for the ProxyCertInfo extension
tb [Sun, 16 Apr 2023 07:49:36 +0000 (07:49 +0000)]
Drop support for the ProxyCertInfo extension

This removes the ProxyCertInfo extension from RFC 3820 from the list of
supported extensions. Since it is a critical extension, this means that
certificates containing it will no longer be considered valid by default.

ok jsing