ratchov [Tue, 23 Jul 2024 06:34:03 +0000 (06:34 +0000)]
sndiod: Properly update the poll(2) event masks after i/o.
If there are no descriptors to poll for an event source, we call
the i/o handlers immediately (before poll(2) is called). As this
may generate output for other descriptors, their the poll(2) event
masks need to be updated.
kettenis [Mon, 22 Jul 2024 22:06:27 +0000 (22:06 +0000)]
Specify a priority for _libc_preinit() to make sure it runs before other
constructors (such as the constructor for libcompiler_rt).
ok guenther@
dv [Mon, 22 Jul 2024 17:55:18 +0000 (17:55 +0000)]
rpcgen(1): default to "STDIN" as input file when compiling to headers.
FreeBSD, NetBSD, and GNU all use a variation of "STDIN" as the
default input filename when compiling to header files (-h) to prevent
a NULL-pointer deference. Adopt a similar approach.
ok millert@
nicm [Mon, 22 Jul 2024 15:27:42 +0000 (15:27 +0000)]
Expand full array option values if no index is provided, GitHub issue
4051.
jsing [Mon, 22 Jul 2024 14:50:45 +0000 (14:50 +0000)]
Revise regress to match cipher suite values change.
jsing [Mon, 22 Jul 2024 14:47:15 +0000 (14:47 +0000)]
Use cipher suite values instead of IDs.
OpenSSL has had the concept of cipher IDs, which were a way of working
around overlapping cipher suite values between SSLv2 and SSLv3. Given
that we no longer have to deal with this issue, replace the use of IDs
with cipher suite values. In particular, this means that we can stop
mapping back and forth between the two, simplifying things considerably.
While here, remove the 'valid' member of the SSL_CIPHER. The ssl3_ciphers[]
table is no longer mutable, meaning that ciphers cannot be disabled at
runtime (and we have `#if 0' if we want to do it at compile time).
Clean up the comments and add/update RFC references for cipher suites.
ok tb@
jsg [Mon, 22 Jul 2024 14:03:22 +0000 (14:03 +0000)]
remove unneeded prototypes for functions in other files
jsg [Mon, 22 Jul 2024 12:05:38 +0000 (12:05 +0000)]
remove prototype with no matching function
yasuoka [Mon, 22 Jul 2024 10:00:16 +0000 (10:00 +0000)]
Fix ipcp module to use (the maximum sequence number from the db) + 1
properly.
claudio [Mon, 22 Jul 2024 09:44:37 +0000 (09:44 +0000)]
Sync with proc.h: s/PS_STOPPED/PS_STOPPING/
OK kettenis@
claudio [Mon, 22 Jul 2024 09:43:47 +0000 (09:43 +0000)]
Rename PS_STOPPED to PS_STOPPING. I want to use PS_STOPPED to indicate
that a process has been stopped so make room for that.
OK kettenis@
yasuoka [Mon, 22 Jul 2024 09:39:23 +0000 (09:39 +0000)]
Modify ipcp module to return a result for
IMSG_RADIUSD_MODULE_IPCP_DISCONNECT and radiusctl to handle the
result.
yasuoka [Mon, 22 Jul 2024 09:27:16 +0000 (09:27 +0000)]
Make some functions "static".
claudio [Mon, 22 Jul 2024 08:18:53 +0000 (08:18 +0000)]
Switch proc_finish_wait() to use the process as argument instead of its
ps_mainproc. dowait6() needs to stop using ps_mainproc and this is the
first step.
OK guenther@
bluhm [Sun, 21 Jul 2024 19:41:31 +0000 (19:41 +0000)]
For AMD SEV determine C-bit position and guest mode in locore0.
Actually determine the C-bit position if we are running as a guest
with SEV enabled. Configure pg_crypt, pg_frame and pg_lgframe
accordingly, using the physical address bit reduction provided by
cpuid.
from hshoexer@; OK mlarkin@
kettenis [Sun, 21 Jul 2024 18:57:31 +0000 (18:57 +0000)]
Populate hwcap and hwcap2 based on the sanitized values of the ID register
values and the feature bits that we recognize.
ok naddy@, jca@
jca [Sun, 21 Jul 2024 16:49:26 +0000 (16:49 +0000)]
Export basic HWCAP bits to let applications detect Altivec & VSX on powerpc64
Input from miod@ and gkoehler@, tests & ok gkoehler@
jca [Sun, 21 Jul 2024 16:46:56 +0000 (16:46 +0000)]
Export basic HWCAP bits to let applications detect Altivec on powerpc
Input from miod@ and gkoehler@, tests & ok gkoehler@
deraadt [Sun, 21 Jul 2024 16:19:25 +0000 (16:19 +0000)]
A few manual ret-cleans. Seeing as these pertain to interrupt servicing,
the stack utilization ends up near the the deep end of the stack where,
retcleans are useful. tested for a while in snaps
ok bluhm
tb [Sun, 21 Jul 2024 13:25:11 +0000 (13:25 +0000)]
asn1time: indicate which comparison function failed
extracted from a diff by Kenjiro Nakayama
fcambus [Sun, 21 Jul 2024 13:18:15 +0000 (13:18 +0000)]
Add optimized character rendering case for 6 pixels wide fonts in
rasops32_putchar().
From jon (at) elytron (dot) openbsd (dot) amsterdam.
tb [Sun, 21 Jul 2024 09:24:07 +0000 (09:24 +0000)]
Add back a .
tb [Sun, 21 Jul 2024 08:36:43 +0000 (08:36 +0000)]
Unify description of the obsolete ENGINE parameter
This uses the same language in most manuals mentioning the obsolete
ENGINE parameters. Make it clear that it is always ignored and that
NULL should be passed. Always call it engine instead of a mix of e
pe, impl, eng.
tb [Sun, 21 Jul 2024 08:25:33 +0000 (08:25 +0000)]
Drop ENGINE from EVP_PKEY_derive example
tb [Sun, 21 Jul 2024 08:10:17 +0000 (08:10 +0000)]
Garbage collect ENGINE "use" from EVP_PKEY_decrypt() example
tb [Sun, 21 Jul 2024 08:02:17 +0000 (08:02 +0000)]
Make example slightly less terrible by dropping the ENGINE "handling"
tb [Sat, 20 Jul 2024 18:37:38 +0000 (18:37 +0000)]
Fix golden numbers after beck broke it months ago
(why is it always me who gets to clean up this shit?)
mvs [Sat, 20 Jul 2024 17:26:19 +0000 (17:26 +0000)]
Unlock udp(4) somove().
Socket splicing belongs to sockets buffers. udp(4) sockets are fully
switched to fine-grained buffers locks, so use them instead of exclusive
solock().
Always schedule somove() thread to run as we do for tcp(4) case. This
brings delay to packet processing, but it is comparable wit non splicing
case where soreceive() threads are always scheduled.
So, now spliced udp(4) sockets rely on sb_lock() of `so_rcv' buffer
together with `sb_mtx' mutexes of both buffers. Shared solock() only
required around pru_send() call, so the most of somove() thread runs
simultaneously with network stack.
Also document 'sosplice' structure locking.
Feedback, tests and OK from bluhm.
jsg [Sat, 20 Jul 2024 12:34:52 +0000 (12:34 +0000)]
UVIDEO_DEBUG needs fcntl.h
reported by Peter J. Philipp
anton [Sat, 20 Jul 2024 06:54:15 +0000 (06:54 +0000)]
Fix regression introduced in previous causing HEAD requests to be
erroneously rejected as malformed.
ok chrisz@
jsing [Sat, 20 Jul 2024 04:04:23 +0000 (04:04 +0000)]
Remove cipher from SSL_SESSION.
For a long time SSL_SESSION has had both a cipher ID and a pointer to
an SSL_CIPHER (and not both are guaranteed to be populated). There is also
a pointer to an SSL_CIPHER in the SSL_HANDSHAKE that denotes the cipher
being used for this connection. Some code has been using the cipher from
SSL_SESSION and some code has been using the cipher from SSL_HANDSHAKE.
Remove cipher from SSL_SESSION and use the version in SSL_HANDSHAKE
everywhere. If resuming from a session then we need to use the SSL_SESSION
cipher ID to set the SSL_HANDSHAKE cipher. And we still need to ensure that
we update the cipher ID in the SSL_SESSION whenever the SSL_HANDSHAKE
cipher changes (this only occurs in a few places).
ok tb@
bluhm [Fri, 19 Jul 2024 16:58:31 +0000 (16:58 +0000)]
Unlock sysctl net.inet.ip.redirect and net.inet6.ip6.redirect.
Variable ip and ip6 sendredirects is only read once during packet
processing. Use atomic_load_int() to access the value in exactly
one read instruction. No memory barriers needed as there is no
correlation with other values.
Sort the ip and ip6 checks, so the difference is easier to see.
Move access to global variable to the end.
OK mvs@
bluhm [Fri, 19 Jul 2024 15:41:58 +0000 (15:41 +0000)]
Relax socket lock assertion in UDP input and send.
OK mvs@
bluhm [Fri, 19 Jul 2024 15:28:51 +0000 (15:28 +0000)]
unveil(2) /etc/gettytab.db in getty(8) to avoid possible violation.
OK deraadt@
deraadt [Fri, 19 Jul 2024 14:32:56 +0000 (14:32 +0000)]
sync
jsing [Fri, 19 Jul 2024 08:56:17 +0000 (08:56 +0000)]
Annotate issues with tls_session_secret_cb() related code.
jsing [Fri, 19 Jul 2024 08:54:31 +0000 (08:54 +0000)]
Move client ciphers from SSL_SESSION to SSL_HANDSHAKE.
SSL_SESSION has a 'ciphers' member which contains a list of ciphers
that were advertised by the client. Move this from SSL_SESSION to
SSL_HANDSHAKE and rename it to match reality.
ok tb@
djm [Fri, 19 Jul 2024 04:33:36 +0000 (04:33 +0000)]
test transfers in mux proxy mode too
chrisz [Fri, 19 Jul 2024 04:26:23 +0000 (04:26 +0000)]
Keep Content-length header in HEAD responses.
ok millert@
yasuoka [Thu, 18 Jul 2024 22:40:09 +0000 (22:40 +0000)]
Send Access-Reject when the authentication is not handled or the user
is not found.
yasuoka [Thu, 18 Jul 2024 22:18:00 +0000 (22:18 +0000)]
unveil .db is needed. Also move pledge() earlier.
kettenis [Thu, 18 Jul 2024 17:18:01 +0000 (17:18 +0000)]
Fix typos in previous commit spotted by naddy@
millert [Thu, 18 Jul 2024 15:38:57 +0000 (15:38 +0000)]
The source of a link (name1) may not be a directory.
POSIX says this is implementation-dependent; OpenBSD does not allow
it. OK guenther@
bluhm [Thu, 18 Jul 2024 14:46:28 +0000 (14:46 +0000)]
In pfattach() pass malloc type instead of flags to cpumem_malloc().
from markus@
deraadt [Thu, 18 Jul 2024 11:21:10 +0000 (11:21 +0000)]
sync
yasuoka [Thu, 18 Jul 2024 08:58:59 +0000 (08:58 +0000)]
Fix memory leaks and improve id handling of iked_radserver_req.
original diff from markus
ok tobhe
jmc [Thu, 18 Jul 2024 05:44:46 +0000 (05:44 +0000)]
remove extra punctuation; from alexander arch
yasuoka [Thu, 18 Jul 2024 02:45:31 +0000 (02:45 +0000)]
Since libcrypto is used to calc message authenticator, use libcrypto
md5 also in other places instead libc md5.
ok millert
djm [Thu, 18 Jul 2024 01:47:27 +0000 (01:47 +0000)]
mention mux proxy mode
yasuoka [Thu, 18 Jul 2024 00:28:53 +0000 (00:28 +0000)]
Add a link to radiud_file(8)
millert [Wed, 17 Jul 2024 20:57:15 +0000 (20:57 +0000)]
sed: use warn()/err() where appropriate
Use warn()/err() instead of sed's homegrown warning()/error() for
things other than parser problems. The warning()/error() functions
display the file and line number in addition to the error message.
This also removes of the COMPILE/FATAL argument to error() since
now all calls to error() are for compilation/parsing issues.
OK op@ espie@
yasuoka [Wed, 17 Jul 2024 20:50:28 +0000 (20:50 +0000)]
Add Message-Authenticator attriubte when sending Access-Request.
ok millert
tb [Wed, 17 Jul 2024 15:22:56 +0000 (15:22 +0000)]
Add RCS id
kettenis [Wed, 17 Jul 2024 15:21:59 +0000 (15:21 +0000)]
Clean up the cpi_id_aa64xxx variables at the end of autoconf such that
sysclt(2) and ID register access emulation can share the variables.
ok jca@
jsing [Wed, 17 Jul 2024 15:01:22 +0000 (15:01 +0000)]
Enable regress for SSL_CIPHER_get_handshake_digest()
Turns out this is already linked statically.
deraadt [Wed, 17 Jul 2024 14:57:59 +0000 (14:57 +0000)]
sync
jsing [Wed, 17 Jul 2024 14:51:54 +0000 (14:51 +0000)]
Rework cipher find test to also provide coverage for SSL_CIPHER_*()
claudio [Wed, 17 Jul 2024 13:29:05 +0000 (13:29 +0000)]
Be clear that RUSAGE_CHILDREN only works for terminated children that have
been waited for. If you SIG_IGN SIGCHLD or don't call any of the wait
functions then RUSAGE_CHILDREN wont report anything.
OK deraadt@ millert@
yasuoka [Wed, 17 Jul 2024 11:31:46 +0000 (11:31 +0000)]
Fix some gcc warnings
deraadt [Wed, 17 Jul 2024 11:20:24 +0000 (11:20 +0000)]
minor repairs
yasuoka [Wed, 17 Jul 2024 11:19:27 +0000 (11:19 +0000)]
Error if config parameter is unknown. This also fixes a gcc warning.
spotted by deraadt
yasuoka [Wed, 17 Jul 2024 11:13:22 +0000 (11:13 +0000)]
Document "authentication-filter".
yasuoka [Wed, 17 Jul 2024 11:05:11 +0000 (11:05 +0000)]
Decrypt "Password" attribute always before passing the packet to
modules. Also, don't assume the authenticator of the packet from the
module that has no secret is valid.
yasuoka [Wed, 17 Jul 2024 10:15:39 +0000 (10:15 +0000)]
Delete log_info() line for debug.
claudio [Wed, 17 Jul 2024 09:54:14 +0000 (09:54 +0000)]
Sync struct proc P_BITS with reality.
Remove "\027XX" (old systrace flag) and "\035SOFTDEP".
OK jsg@
yasuoka [Wed, 17 Jul 2024 08:26:19 +0000 (08:26 +0000)]
Fix indent
millert [Wed, 17 Jul 2024 03:05:19 +0000 (03:05 +0000)]
Display an error message for "sed -i" if the file is unwritable
Previously, sed would fail silently if it was unable to move the
temporary file into place. Also allow "sed -i" on symbolic link--the
link will be broken but this matches GNU sed behavior. From espie@
OK op@
jsing [Tue, 16 Jul 2024 14:38:59 +0000 (14:38 +0000)]
Update regress for removal of SSL_HANDSHAKE_MAC_DEFAULT.
jsing [Tue, 16 Jul 2024 14:38:04 +0000 (14:38 +0000)]
Clean up SSL_HANDSHAKE_MAC_DEFAULT.
The handshake MAC needs to be upgraded when TLSv1.0 and TLSv1.1
ciphersuites are used with TLSv1.2. Since we no longer support TLSv1.0
and TLSv1.1, we can simply upgrade the handshake MAC in the ciphersuite
table and remove the various defines/macros/code that existed to handle
the upgrade.
ok tb@
tb [Tue, 16 Jul 2024 10:19:38 +0000 (10:19 +0000)]
Fix .Ox for SSL_CIPHER_get_handshake_digest()
deraadt [Tue, 16 Jul 2024 08:25:47 +0000 (08:25 +0000)]
sync
miod [Tue, 16 Jul 2024 06:18:20 +0000 (06:18 +0000)]
Only perform the static_assert checks in C>=11 environment; unbreaks build
on platforms using gcc.
deraadt [Tue, 16 Jul 2024 05:01:10 +0000 (05:01 +0000)]
Fix the SIGHUP signal race. ed's "event loop" operates a getchar(); check
the hup flag before and after that call, when the buffer structures are stable
for write_file() to work. Remove the hup handling from the SPL0() macro,
because this is run in at least one place during structure instability.
The SIGINT handler, which uses siglongjmp(), is also trusting the SPL1/SPL0
dance more than it should.
ok millert
jsg [Tue, 16 Jul 2024 01:14:23 +0000 (01:14 +0000)]
match on Atom C3000
from and tested by Brendan Shanks
tb [Mon, 15 Jul 2024 18:50:42 +0000 (18:50 +0000)]
Switch the EVP_PKEY_*attr* API to LCRYPTO_UNUSED()
This would have prevented the PKCS12 oopsie.
tb [Mon, 15 Jul 2024 15:43:25 +0000 (15:43 +0000)]
Fix PKCS12_create()
This tries to copy some microsoft attributes which are not usually present
and chokes on the now disabled EVP_PKEY_*attr* API. Instead of reviving
about four layers of traps and indirection, just inline the two functions
in a way that should be more obvious.
found by anton via the ruby-openssl tests
ok jsing
mglocker [Mon, 15 Jul 2024 15:33:54 +0000 (15:33 +0000)]
Make the touchpad on the Samsung Galaxy Book4 Edge work.
ok patrick@
jsing [Mon, 15 Jul 2024 14:45:15 +0000 (14:45 +0000)]
Mop up TLS1_PRF* defines.
These have not been used for a long time, however SSL_CIPHER was not opaque
at the time, hence they had to stick around. Now that SSL_CIPHER is opaque
we can simply mop them up.
ok tb@
martijn [Mon, 15 Jul 2024 13:32:50 +0000 (13:32 +0000)]
Add e2fs_fsmnt, and the newly defined e2fs_kbytes_written to the list of
fields that can differ between the primary and 1st backup superblock.
This fixes fsck issues I've encountered on my system with a shared home
partition.
OK miod@
martijn [Mon, 15 Jul 2024 13:27:36 +0000 (13:27 +0000)]
Add ext4 field definitions. Taken from NetBSD, with some cosmetic
changes to keep it in line with our style.
OK miod@
anton [Mon, 15 Jul 2024 10:11:56 +0000 (10:11 +0000)]
fix signature of main()
patrick [Mon, 15 Jul 2024 09:56:30 +0000 (09:56 +0000)]
Add support for the RK3588 eMMC controller. This is mostly the same, with
some HS400 bits that we don't support yet. While there, fix some constants
that weren't applied to the correct registers.
ok dlg@
patrick [Mon, 15 Jul 2024 09:54:38 +0000 (09:54 +0000)]
Add RK3588 eMMC clocks and resets.
ok dlg@
jsg [Mon, 15 Jul 2024 07:24:03 +0000 (07:24 +0000)]
sync PS_BITS with flags; ok claudio@
jmc [Mon, 15 Jul 2024 05:36:08 +0000 (05:36 +0000)]
bioctl.8:
- tweak bioctl text
- don;t repeat the device examples
- reinstate softraid device being always softraid0
usage():
- add vertical blank between two formats
- rewrap to match 80col (shorter and matches man)
feedback/ok krw kn
anton [Mon, 15 Jul 2024 05:24:02 +0000 (05:24 +0000)]
enable warnings and apply a dash of knfmt
jsg [Mon, 15 Jul 2024 00:11:59 +0000 (00:11 +0000)]
ocurred -> occurred
sashan [Sun, 14 Jul 2024 19:51:08 +0000 (19:51 +0000)]
This change allows user to define table inside the anchor like that:
anchor foo {
table <bar> { 192.168.1.1 }
pass in from <bar> to <self>
}
Without this diff one must either create table <bar> in main
ruleset (root) or use 'pfctl -a foo -t bar -T add 192.168.1.1'
This glitch is hard to notice. Not many human admins try to attach
tables to non-global anchors. Deamons which configure pf(4) automatically
at run time such as relayd(8) and spamd(8) create tables attached to
thair anchors (for example 'relayd/*') but the deamons use way similar
to pfctl(8) to add and manage those tables.
The reason why I'd like to seal this gap is that my long term goal
is to turn global `pfr_ktable` in pf(4) into member of pf_anchor.
So each ruleset will get its own tree of tables.
feedback and OK bluhm@
miod [Sun, 14 Jul 2024 19:33:59 +0000 (19:33 +0000)]
Add missing <machine/elf.h> for compound arches.
The spice^Wkernel must flow^Wbuild.
bluhm [Sun, 14 Jul 2024 18:53:39 +0000 (18:53 +0000)]
Unlock IPv6 sysctl net.inet6.ip6.forwarding from net lock.
Use atomic operations to read ip6_forwarding while processing packets
in the network stack.
To make clear where actually the router property is needed, use the
i_am_router variable based on ip6_forwarding. It already existed
in nd6_nbr. Move i_am_router setting up the call stack until all
users are independent.
The forwarding decisions in pf_test, pf_refragment6, ip6_input do
also not interfere.
Use a new array ipv6ctl_vars_unlocked to make transition of all the
integer sysctls easier. Adapt IPv4 to the new style.
OK mvs@
anton [Sun, 14 Jul 2024 18:49:32 +0000 (18:49 +0000)]
enable warnings and fix complaints
jmc [Sun, 14 Jul 2024 18:11:18 +0000 (18:11 +0000)]
fix SEE ALSO and a word tweak;
jmc [Sun, 14 Jul 2024 18:09:05 +0000 (18:09 +0000)]
grammar and macro tweaks;
jmc [Sun, 14 Jul 2024 18:03:59 +0000 (18:03 +0000)]
zap a stray Nd line;
yasuoka [Sun, 14 Jul 2024 16:22:59 +0000 (16:22 +0000)]
Add radiusd_file(5) and link it from radiusd.conf(5).
yasuoka [Sun, 14 Jul 2024 16:09:23 +0000 (16:09 +0000)]
Add new radiusd_eap2mschap module. It provides conversions from EAP
to MSCHAPv2.
krw [Sun, 14 Jul 2024 16:09:06 +0000 (16:09 +0000)]
Shuffle verbiage to make page more general. e.g. by mentioning
nvme(4).
Feedback jmc@ jmatthew@ deraadt@ kn@
ok jmc@ kn@
tb [Sun, 14 Jul 2024 16:06:31 +0000 (16:06 +0000)]
Rewrite EVP_PKEY_add1_attr_by_NID()
Instead of jumping through many layers that cause headache, we can achieve
the same in an entirely straightforward way without losing clarity.
ok jsing
tb [Sun, 14 Jul 2024 16:04:10 +0000 (16:04 +0000)]
Disable most EVP_PKEY_*attr* API
There is a single consumer of this entire family of function, namely
the openssl(1) pkcs12 command uses EVP_PKEY_add1_attr_by_NID, so leave
that one intact for now.
ok jsing
tb [Sun, 14 Jul 2024 15:56:08 +0000 (15:56 +0000)]
Forgot to annotate the TMP UGLY CAST[S] as requested by jsing
h/t to levitte