1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-30 17:16:30 +00:00
Commit Graph

239175 Commits

Author SHA1 Message Date
bluhm
43496798ef Fix OpenBSD RCS ID typos. from Andrius V 2025-05-22 04:34:18 +00:00
dlg
94488e849e get rid of unecessary casts
ok florian@
2025-05-22 04:24:11 +00:00
dtucker
133e262539 Output the current name for PermitRootLogin's "prohibit-password" in sshd -T
instead of its deprecated alias "without-password".  bz#3788, patch from
cjwatson at debian.org.
2025-05-22 04:22:03 +00:00
dtucker
533f560f90 Copy arg to be passed to dirname(). POSIX allows dirname() to modify
its args and return a pointer into it, so this prevents an overlapping
strlcpy.  bz#3819, patch from cjwatson at debian.org
2025-05-22 03:53:46 +00:00
dtucker
3ac71bda67 Add $OpenBSD$ marker for easier syncing. 2025-05-22 03:41:10 +00:00
joshua
0a034d763a Convert sha_test to use new test framework
ok beck
2025-05-22 03:35:40 +00:00
joshua
afab96b37e Convert md_test to use new test framework
ok jsing tb beck
2025-05-22 03:24:47 +00:00
bluhm
40adde36ad Fix trailing whitespace. 2025-05-22 03:12:33 +00:00
bluhm
f4df864dc7 Remove redundant NULL check from divert_packet() that it already
in in_pcbunref().
2025-05-22 03:09:00 +00:00
tobhe
0487f6a681 Add PERFORMANCE_LEVEL_SET logic and initialize all domains to the same
level.

On Snapdragon X Elite there are 3 performance domains spanning 4 CPUs
each, where each can go from level 0 (719 Mhz) to 12 (3418 Mhz).
By default domain 0 boots into level 10, domains 1 and 2 boot into
level 12. Since the kernel only understands a single global performance
value we keep them in sync by initializing them all to 12 for now.

While there, also move PERFORMANCE_LEVEL_GET to a separate function
and clean up a bit.

ok patrick@
2025-05-22 03:04:01 +00:00
joshua
32856335d4 Fix test_errorf macro expanding to two lines
This caused test_fail to always be called when used in certain conditions,
and wrapping with do {} while (0) fixes this.
2025-05-22 02:23:41 +00:00
tb
6359e523fc TAL stands for Trust Anchor Locator, not Location
ok beck
2025-05-22 02:10:27 +00:00
kn
d758b026dd pkg_delete -c does more than file cleanup 2025-05-22 01:40:21 +00:00
kenjiro
58283cdb7d Add basic HKDF test using EVP_PKEY_HKDF
Add a basic test case for HKDF using EVP_PKEY_HKDF to evp_test.c.
This test verifies the correct derivation of output keying material
using SHA-256, matching the test vector from RFC 5869 Appendix A.1.

ok tb@ joshua@
2025-05-22 00:13:47 +00:00
schwarze
91d6bc35dd Fix wrong description of PKG_CONFIG_DEBUG_SPEW.
Add complete description of PKG_CONFIG_MAXIMUM_TRAVERSE_DEPTH.
Improve descriptions of various other options and variables.
This patch was accepted and pushed upstream by Ariadne Conill.
2025-05-21 21:42:19 +00:00
claudio
c902741cb1 Define CPU_MIN_BUSY_CYCLES and CPU_MAX_BUSY_CYCLES outside of MULTIPROCESSOR
since the ddb_mtx_enter is not under MULTIPROCESSOR.
This is enough to unbreak GENERIC kernels.
Reported by tb@
2025-05-21 18:41:41 +00:00
dv
fdb740e5a2 Zap uvm_share(). No longer used by vmm(4).
ok mpi@
2025-05-21 16:59:32 +00:00
schwarze
55f00fa1d3 Revert deprecation of the .Li macro because a question from Evan Silberman
revealed an (admittedly rare) use case that is not only legitimate, but even
provides .Li with semantic significance: unquoted in-line literal display.
Make it clear that .Ql is still the normal macro for in-line literal displays.
Consistently mention that the term "literal display" implies formatting with
a constant-width font, resulting in improved descriptions for several
macros implementing literal displays.
OK jmc@.
2025-05-21 16:43:41 +00:00
visa
d6f5249517 kqueue: Improve EVFILT_USER compatibility
Always set `data' and `udata' of the EVFILT_USER event when triggering
it with NOTE_TRIGGER. Preserve `fflags' when the event is cleared
with EV_CLEAR. These make the behaviour more similar to kqueue(2) /
kevent(2) of FreeBSD, to avoid OS-specific quirks in user code.

Tested by volker@
OK tedu@ mvs@
2025-05-21 14:10:16 +00:00
jmatthew
c2568eef3c remove unused HTOLE16 macro that somehow came over here from ixl(4) 2025-05-21 12:51:14 +00:00
jmatthew
e03501a6e4 Don't process link state change events that arrive before we've fully
set up the interface.

from Yuichiro NAITO
2025-05-21 12:45:27 +00:00
job
44adf23353 Watch should not assume characters are printable as ISO-8859-1
Fixes display of UTF-8 characters

Input from florian@ stsp@
2025-05-21 12:44:12 +00:00
jsing
52de836330 Reorder some functions. 2025-05-21 12:12:42 +00:00
djm
1e5ec4c767 Correct FILES section to mention new default path to agent sockets.
Spotted by / ok jmc@
2025-05-21 12:12:20 +00:00
jsing
772bd68ac4 Remove GHASH_CHUNK and size_t related code from GCM encrypt/decrypt.
This adds significant complexity to the code. On amd64 and aarch64 it
results in a minimal slowdown for aligned inputs and a performance
improvement for unaligned inputs.

ok beck@ joshua@ tb@
2025-05-21 12:11:23 +00:00
jsing
ac7f5714f7 Fix wrapping. 2025-05-21 11:37:07 +00:00
jsing
824f363240 Remove now unused AES assembly generation scripts. 2025-05-21 11:03:48 +00:00
kettenis
1f62937d71 In preparation of moving work from the reaper into exit1(), introduce a
new (optional) pmap function that "purges" a pmap to optimize a subsqeuent
uvm space teardown.  Rewire the arm64 TLB flush optimization to use that
new function.

ok mpi@, claudio@
2025-05-21 09:42:59 +00:00
kn
2bdc12efdb unbreak build; typofix d{ea -> ae}mon; noticed by bluhm 2025-05-21 09:42:21 +00:00
mvs
fa0a14c87a Get rid of unused pr_hardlimit_warning', pr_hardlimit_ratecap' and
`pr_hardlimit_warning_last'.

ok dlg tedu
2025-05-21 09:33:48 +00:00
djm
b67b1feba2 for SOCKS4A don't perform a local hostname lookup that we're not going
to use; spotted by lucas@
2025-05-21 09:14:01 +00:00
mpi
ee0e82c908 Move pmap_deactivate() and sched_exit() into MI exit1().
ok kettenis@
2025-05-21 09:06:58 +00:00
mpi
8e23f39938 Improve mtx_enter() for machines with a huge number of CPUs.
- Always read the value just before issuing an atomic operation to avoid
locking the cache line.

- Use an exponential backoff for the busy loop when waiting for a contended
lock.

Prevent hangs on Ampere Altra with highly contended mutexes.

ok kettenis@, dlg@
2025-05-21 09:04:00 +00:00
joshua
f5bd35de83 Add initial regress test framework
Add a test framework for use in LibreSSL regression tests. This test
framework aims to be as lightweight and as simple to use as possible.

The design is mostly inspired by Go's test system, and aims to be a
drop-in utility in most existing regress tests.

ok jsing tb beck
2025-05-21 08:57:13 +00:00
djm
5631c5cb34 add SOCKS4A to help text 2025-05-21 08:46:42 +00:00
djm
2883a66a6c test SOCKS4A; ok tb 2025-05-21 08:41:52 +00:00
djm
48617f1e52 add SOCKS4A support to nc(1)'s proxy (-X) mode
SOCKS4A is a fairly obscure extension to the olde SOCKS4 protocol that
allows passing the destination as a string rather than a literal IPv4
address, which is the only thing that vanilla SOCKS4 supports.

The motivation for adding something so niche is to test the SOCKS4A
server code in ssh(1)'s dynamic forwarding (-D) support.

ok tb@
2025-05-21 08:41:35 +00:00
djm
0bf636086e remove log tarballing "it seemed like a good idea at the time" - dtucker@
ensure that log files have correct perms when running under sudo/doas

ok dtucker@
2025-05-21 08:36:39 +00:00
florian
ed4510b7cb Switch main loop to libevent.
This gets rid of select(2) and gives us safe signal handlers for free.

OK deraadt, job
2025-05-21 08:32:10 +00:00
job
fa65431ebf Remove 't' feature^Wcomplication
The 3 highlighting modes can be accessed through 'c', 'l', and 'w'.
The operator should just those toggles (instead of a toggle that does
different things depending on what happened before).

OK kn@
2025-05-21 07:37:11 +00:00
job
b10ad03f04 Display hostname + time of day in upper right corner
Seems more important to help the operator understand where they are and
whether the thing is moving; rather than learning what year it is. This
makes watch more like top(1).

OK kn@
2025-05-21 07:16:25 +00:00
djm
5e8f660962 use logit_f("...") instead of logit("func: ...") 2025-05-21 06:44:24 +00:00
djm
79493ce72e function to make a sshbuf from a hex string; useful in tests
also constify some arguments
2025-05-21 06:43:48 +00:00
kn
f1a571bc1d Drop chroot(2) + rdaemon() and rely on pledge(2) to daemon(3) as usual
Less code and a simpler mental model of dropping filesystem access.

Same as usr.sbin/dhcrelay/dhcrelay.c r1.69.

OK brynet
2025-05-21 05:09:17 +00:00
kn
472bc62a63 Drop chroot(2) + rdaemon() and rely on pledge(2) to daemon(3) as usual
"stdio route" denies file I/O, so confining to /var/empty/ is pointless,
requiring a preopened /dev/null to later pass into custom rdaemon().

Drop all that and rely on tight promises after daemonising.

OK brynet
2025-05-21 05:05:33 +00:00
kn
812dc45b8b drop custom rdaemon(), daemon(3) as usual
There is no chroot(2), only unveil(2) to a single file, see initial commit.

Defer unveil for deamon(3) to see /dev/null and drop cargo-culted code.

OK deraadt brynet
2025-05-21 04:50:38 +00:00
florian
c300a90542 Construct the command line with two loops.
This is less clever and easier on the eyes.

Input deraadt, tedu, schwarze, tb
OK schwarze, tb; previous version OK job
2025-05-21 04:41:33 +00:00
jmatthew
6a2e23f1da Add acpitimer so we get a working delay function on some (virtual) machines
that lack acpihpet.  This fixes crashes when installing from emulated IDE
CD drives, as reported most recently by Nicole Findlay.

ok mlarkin@
2025-05-21 04:13:52 +00:00
mlarkin
94254965f1 remove a couple includes that weren't needed from previous commit
The previous commit had an include added that wasn't needed.
2025-05-21 04:11:57 +00:00
jmatthew
1969dc3732 Move the code to attach acpitimer outside #ifndef SMALL_KERNEL so we can
make the clock/delay setup on ramdisk kernels more like GENERIC.

ok mlarkin@
2025-05-21 04:10:21 +00:00