jsing [Sat, 20 Aug 2022 18:17:33 +0000 (18:17 +0000)]
Rewrite i2c_ASN1_INTEGER() using CBB/CBS.
This gives us cleaner and safer code, although it is worth noting that we
now generate the encoding even when called with NULL as the output pointer
(and then discard it, returning just the length).
Resolves oss-fuzz #49963.
ok tb@
jsing [Sat, 20 Aug 2022 17:55:08 +0000 (17:55 +0000)]
Make it possible to signal an error from an i2c_* function.
In asn1_i2d_ex_primitive(), asn1_ex_i2c() returning -1 is used to indicate
that the object is optional and should be skipped, while -2 is used to
indicate that indefinite length encoding should be used. Any other negative
value was treated as success, resulting in the out pointer being walked
backwards. Avoid this by treating any negative value (aside from -1 and -2)
as a failure, propagating it up the stack.
Additionally, check the return value of the second asn1_ex_i2c() call to
ensure that it matches the value returned by the first call. This makes
sure that the length of the encoded object is correct, plus it detects the
case where a failure occurs during the second call.
Discussed with tb@ (who also flagged the negative value issue).
tb [Sat, 20 Aug 2022 17:39:22 +0000 (17:39 +0000)]
Add #define for RTLD_NOLOAD missed in last ld.so commit.
sthen [Sat, 20 Aug 2022 14:14:24 +0000 (14:14 +0000)]
document RTLD_NOLOAD, from FreeBSD via guenther@
sthen [Sat, 20 Aug 2022 14:13:48 +0000 (14:13 +0000)]
add ld.so RTLD_NOLOAD regress tests, ok jca@ guenther@
sthen [Sat, 20 Aug 2022 14:11:31 +0000 (14:11 +0000)]
Support RTLD_NOLOAD in ld.so. From guenther@. OK jca@ guenther@
krw [Sat, 20 Aug 2022 13:10:45 +0000 (13:10 +0000)]
Restore the exemption from start/size checks that OpenBSD (A6)
MBR partitions previously enjoyed.
Found and fix tested by matthieu@
kn [Sat, 20 Aug 2022 11:10:50 +0000 (11:10 +0000)]
Unhook vmd for i386
OK sthen
tb [Sat, 20 Aug 2022 09:16:18 +0000 (09:16 +0000)]
Add an empty pkcs12_local.h and include it where it will soon be needed.
tb [Sat, 20 Aug 2022 07:03:24 +0000 (07:03 +0000)]
Align description of -g and -u with mount_tmpfs.8
"Reads better indeed" otto
kn [Sat, 20 Aug 2022 06:39:24 +0000 (06:39 +0000)]
-k and -K are mutually exclusive, make usage match manual
OK millert
otto [Sat, 20 Aug 2022 05:59:57 +0000 (05:59 +0000)]
Accept both names and ids for -g and -u and implement missing error
handling. Code from mount_msdos (which got it from chmod/chown).
ok tb@ deraadt@
kn [Fri, 19 Aug 2022 18:56:26 +0000 (18:56 +0000)]
Zap useless cast
opendev(3) takes a const char * (since 2012, thanks tb),
just what getinfo() provides.
No amd64 object change.
OK millert tb
kn [Fri, 19 Aug 2022 17:49:10 +0000 (17:49 +0000)]
Improve RAID level parsing
Check for numeric levels before checking for single-character ones
("c" and "C") such that a) invalid synopsis (no "-l") is detected as such
# bioctl -c 10 vnd0 softraid0
bioctl: Invalid RAID level
# ./obj/bioctl -c 10 vnd0 softraid0
usage: bioctl ...
and b) ten is correctly treated as valid but unsupported level:
# bioctl -c 10 -l vnd0a softraid0
bioctl: Invalid RAID level
# ./obj/bioctl -c 10 -l vnd0a softraid0
bioctl: unsupported RAID level
Uppercase the abbreviation while here.
Feedback OK tb
schwarze [Fri, 19 Aug 2022 12:49:36 +0000 (12:49 +0000)]
Up to version 1.22.4, groff_mdoc(7) only considered the first word
when comparing section headers. For example, ".Sh SEE ELSEWHERE"
and ".Sh SEE Em ALSO" were considered instances of a SEE ALSO
section. In groff-current, exact matches with no sub-macros are
required. Adjust mandoc behaviour.
While here, also fix a very minor mandoc bug, even though no
detrimental effect of the bug on formatting is known. While using
sub-macros in the .Sh HEAD is bad style, the parsers accept it, so
setting the section attribute on the HEAD needs to act recursively.
tb [Fri, 19 Aug 2022 12:45:53 +0000 (12:45 +0000)]
Check the resources in ROAs and RSCs against EE certs
The resources delegated in the RFC 3779 extensions of the EE cert for
ROAs or RSCs can be a subset of the resources in the auth chain. So far
we compared that the resources of ROAs and RSCs are covered by the auth
chain, which is not entirely correct. Extract the necessary data from
the EE cert into rpki-client's own data structures, then verify that
the EE cert's resources cover the ones claimed in the ROA or RSC.
Do this as part or ROA and RSC parsing, that the EE cert's resources are
covered by the auth chain is checked in valid_x509() later on.
All this is a bit more annoying and intrusive than it should be...
ok claudio job
claudio [Fri, 19 Aug 2022 09:11:18 +0000 (09:11 +0000)]
Fix nexthop lookup for connected routes.
In knexthop_true_nexthop() connected routes need to be handled specially.
If a nexthop is directly reachable the gateway needs to remain the same.
There is no nexthop set for F_CONNECTED kroutes. A very similar trick
is used in rde_rib.c::nexthop_update() but was forgotten here.
Regression noticed by Daniel Jakots (danj at chown.me).
OK tb@
kn [Fri, 19 Aug 2022 08:27:48 +0000 (08:27 +0000)]
Split -p into own synopsis
Platform-dependent preparation of the filesystem required by the boot loader
only ever creates a new fileystem without instaling using any bootstrap files.
To reflect reality, turn
# installboot -nvp vnd0
Using / as root
would install bootstrap on /dev/rvnd0c
using first-stage /usr/mdec/biosboot, second-stage /usr/mdec/boot
would newfs
545c9bdf92aa18f9.i
into
# ./obj/installboot -nvp vnd0
would newfs
4db2c0e89e0d3268.i
and error out if -p is combined with -r or stages:
$ man -hl./installboot.8
installboot [-nv] [-r root] disk [stage1 [stage2]]
installboot [-nv] -p disk
Feedback OK millert
kn [Fri, 19 Aug 2022 08:09:42 +0000 (08:09 +0000)]
Document lease files
Feedback OK jmc
djm [Fri, 19 Aug 2022 06:07:47 +0000 (06:07 +0000)]
attemp FIDO key signing without PIN and use the error code returned
to fall back only if necessary. Avoids PIN prompts for FIDO tokens
that don't require them; part of GHPR#302
djm [Fri, 19 Aug 2022 05:53:28 +0000 (05:53 +0000)]
remove incorrect check that can break enrolling a resident key
(introduced in r1.40)
mpi [Fri, 19 Aug 2022 05:53:19 +0000 (05:53 +0000)]
Grab the mutex before iterating on the global list.
Prevent race reported some months ago.
ok mlarkin@, jsg@, kn@
jmc [Fri, 19 Aug 2022 05:47:32 +0000 (05:47 +0000)]
spelling;
dtucker [Fri, 19 Aug 2022 04:02:46 +0000 (04:02 +0000)]
Strictly enforce the maximum allowed SSH2 banner size in ssh-keyscan
and prevent a one-byte buffer overflow. Patch from Qualys, ok djm@
jmatthew [Fri, 19 Aug 2022 03:50:32 +0000 (03:50 +0000)]
Add local bind mode, where ypldap manages the YP binding file itself
rather than relying on ypbind to do it, which also means you don't need
portmap running. In this mode, ypldap binds its rpc sockets to loopback,
so YP services are only available to the host it's running on. The
previous behaviour, now called portmap bind mode, is still the default.
encouragement from deraadt@ and dlg@
djm [Fri, 19 Aug 2022 03:06:30 +0000 (03:06 +0000)]
double free() in error path; from Eusgor via GHPR333
tb [Thu, 18 Aug 2022 18:42:13 +0000 (18:42 +0000)]
Adjust signatures of BIO_ctrl functions
In bio.h r1.54, the signature of BIO_callback_ctrl() was changed from
bio_info_cb to BIO_info_cb. Adjust manual to reflect this change.
At the moment, bio_info_cb and BIO_info_cb are still distinct types with
our BIO_info_cb matching OpenSSL's definition. Historically, bio_info_cb
had a different type, but that leads to issues with casting function
pointers. The ecosystem has moved on to embrace the new type and several
ports confuse the two types because OpenSSL decided to "solve" the issues
with "typedef BIO_info_cb bio_info_cb; /* backward compatibilty */". We
will align with this in the next bump.
ok jsing
claudio [Thu, 18 Aug 2022 17:02:42 +0000 (17:02 +0000)]
In kroute_insert() fix the check for multipath routes. Use a helper variable
since krm is only set for IPv4 routes but not for IPv6 ones.
OK tb@
tb [Thu, 18 Aug 2022 16:26:33 +0000 (16:26 +0000)]
Allow empty attribute sets in CSRs
While each attribute must contain at least one extension, it is not
required that a CSR have attributes at all. Instead of signalling an
error by returning NULL if no extensions are found, return an empty
stack of extensions.
Via OpenSSL
1f02ca2d
ok jsing
job [Thu, 18 Aug 2022 15:20:27 +0000 (15:20 +0000)]
Remove dangling ASPA references until we land real support
OK tb@
jsg [Thu, 18 Aug 2022 13:05:43 +0000 (13:05 +0000)]
repair printing of cpu class after machdep.c 1.652
ok daniel@ mlarkin@
claudio [Thu, 18 Aug 2022 12:14:00 +0000 (12:14 +0000)]
There is no need to pass the fd to send_rtmsg(), the fd is always the
one from kr_state and removing this argument helps portability.
OK tb@
tb [Thu, 18 Aug 2022 07:00:59 +0000 (07:00 +0000)]
Tweak prototype to match function definition (n -> index)
miod [Thu, 18 Aug 2022 06:31:36 +0000 (06:31 +0000)]
Move recomputation of hz and stathz from glk to glkclk, lets a kernel with
glkclk disabled keep correct values of those. NFC
jsg [Thu, 18 Aug 2022 01:04:54 +0000 (01:04 +0000)]
drm/bridge: Move devm_drm_of_get_bridge to bridge/panel.c
From Maxime Ripard
f2725951579701420879c29e87043e77537ac0c6 in linux 5.15.y/5.15.61
d4ae66f10c8b9959dce1766d9a87070e567236eb in mainline linux
jsg [Thu, 18 Aug 2022 01:02:22 +0000 (01:02 +0000)]
drm/dp/mst: Read the extended DPCD capabilities during system resume
From Imre Deak
4a54c13786c5a596b4e072b36e245029e11a565c in linux 5.15.y/5.15.61
7a710a8bc909313951eb9252d8419924c771d7c2 in mainline linux
jsg [Thu, 18 Aug 2022 00:59:23 +0000 (00:59 +0000)]
drm/bridge: Add a function to abstract away panels
From Maxime Ripard
ed486d15084f7429298ca4c577e5647a3fdca934 in linux 5.15.y/5.15.61
87ea95808d53e56b03e620e8f8f3add48899a88d in mainline linux
jsg [Thu, 18 Aug 2022 00:55:32 +0000 (00:55 +0000)]
add empty drm_of.h for 5.15.61 drm_bridge.c
jsg [Thu, 18 Aug 2022 00:48:40 +0000 (00:48 +0000)]
drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()
From Alexey Kodanev
deb603c5928e546609c0d5798e231d0205748943 in linux 5.15.y/5.15.61
136f614931a2bb73616b292cf542da3a18daefd5 in mainline linux
jsg [Thu, 18 Aug 2022 00:46:01 +0000 (00:46 +0000)]
drm/amdgpu: Remove one duplicated ef removal
From xinhui pan
e45491556e2ae96d02eb4ccf18a5cc6ff2d30edc in linux 5.15.y/5.15.61
e1aadbab445b06e072013a1365fd0cf2aa25e843 in mainline linux
jsg [Thu, 18 Aug 2022 00:43:54 +0000 (00:43 +0000)]
drm/amdgpu: fix check in fbdev init
From Alex Deucher
27f8f5219fe4658537ba28fd01657e1062ac3960 in linux 5.15.y/5.15.61
jsg [Thu, 18 Aug 2022 00:41:20 +0000 (00:41 +0000)]
drm/amdgpu: Check BO's requested pinning domains against its preferred_domains
From Leo Li
eb3c69c7c777d9d3c016568cb062ef02197a5a4e in linux 5.15.y/5.15.61
f5ba14043621f4afdf3ad5f92ee2d8dbebbe4340 in mainline linux
jsg [Thu, 18 Aug 2022 00:38:21 +0000 (00:38 +0000)]
drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error
From Dmitry Osipenko
da2a1aa058acd7eb2cccd9de74df0809cbe4f1f8 in linux 5.15.y/5.15.61
2939deac1fa220bc82b89235f146df1d9b52e876 in mainline linux
tb [Wed, 17 Aug 2022 18:51:47 +0000 (18:51 +0000)]
Implement the SSL_CTRL_GET_SHARED_GROUP control
This implements SSL_get_shared_{curve,group}() in a bug-compatible
fashion with OpenSSL.
This is your average OpenSSL-style overloaded parameter API where n >= 0
means "return the n-th shared group's NID" (as if anyone possibly ever
cared about the case n > 0) and n == -1 means "return the number of
shared groups". There is also an undocumented case n == -2 for Suite B
profile support which falls back to n == 0 in case Suite B profile
support is disabled, so n == -2 is the same as n == 0 in LibreSSL.
The API also returns 0 for error, which is indistinguishable from a
count of 0 shared groups but coincides with NID_undef. Contrary to claims
in the documentation, the API doesn't actually return -1 for clients,
rather it returns 0.
Obviously this entire exercise is pretty useless, but since somebody
exposed it because they could and someone else used it because they could
we need to provide it.
ok jsing
kn [Wed, 17 Aug 2022 18:50:11 +0000 (18:50 +0000)]
Mention support for booting off RAID 1C
tb [Wed, 17 Aug 2022 18:45:25 +0000 (18:45 +0000)]
Refactor tls1_get_supported_group()
This splits tls1_get_supported_group() into a few helper functions to
be able to count shared groups and to return the n-th shared group since
someone thought it is a great idea to expose that in a single API and
some others thought it is useful to add this info to log noise.
This is all made a bit more complicated thanks to the security level
having its tentacles everywhere and because a user-provided security
callback can influence the list of groups shared by the peers.
ok jsing
tb [Wed, 17 Aug 2022 18:43:17 +0000 (18:43 +0000)]
Add SSL_get_shared_{curve,group}()
These are wrappers of SSL_ctrl() using the SSL_CTRL_GET_SHARED_GROUP
control. Do not provide SSL_CTRL_GET_SHARED_CURVE since that is only
mentioned in Net::SSLeay docs according to codesearch.debian.net.
ok jsing
tb [Wed, 17 Aug 2022 18:42:13 +0000 (18:42 +0000)]
Make tls1_get_{format,group_}list() take a const SSL
ok jsing
tb [Wed, 17 Aug 2022 18:41:17 +0000 (18:41 +0000)]
Provide ssl_security_shared_group()
Refactor ssl_security_supported_group() into a wrapper of a new internal
ssl_security_group() which takes a secop as an argument. This allows
adding ssl_security_shared_group() which will be needed in upcoming
commits.
ok jsing
job [Wed, 17 Aug 2022 18:12:16 +0000 (18:12 +0000)]
Visited this airport in 2019
visa [Wed, 17 Aug 2022 15:26:56 +0000 (15:26 +0000)]
Fix vldc(4) event filters
Indicate non-activeness when the device is not ready for reading
or writing. This should make the event filters behave more like
the old poll code.
"makes sense to me" mpi@
claudio [Wed, 17 Aug 2022 15:16:12 +0000 (15:16 +0000)]
Use memset() instead of bzero().
OK tb@ deraadt@
claudio [Wed, 17 Aug 2022 15:15:25 +0000 (15:15 +0000)]
Convert bzero() to memset(), bcmp() to memcmp() and bcopy() to memcpy().
The memory regions passed to memcpy() can not overlap so no need for memmove().
OK tb@ deraadt@
miod [Wed, 17 Aug 2022 13:49:57 +0000 (13:49 +0000)]
No more disklabel -B.
millert [Wed, 17 Aug 2022 13:41:50 +0000 (13:41 +0000)]
Update to tzdata2022cgtz from https://github.com/JodaOrg/global-tz
Adds experimental structured comments in zone1970.tab to clarify
whether Zones like Africa/Abidjan and Europe/Istanbul cross continent
or ocean boundaries.
job [Wed, 17 Aug 2022 11:57:46 +0000 (11:57 +0000)]
Clarify and tidy up some comments
OK tb@
claudio [Wed, 17 Aug 2022 10:54:52 +0000 (10:54 +0000)]
Just use struct kif and kill struct kif_node. No need for this extra
struct.
OK tb@
claudio [Wed, 17 Aug 2022 09:16:44 +0000 (09:16 +0000)]
Just 2 newline changes.
claudio [Wed, 17 Aug 2022 09:15:06 +0000 (09:15 +0000)]
Add default case to switch to silence a warning seen with gcc.
jsing [Wed, 17 Aug 2022 07:39:19 +0000 (07:39 +0000)]
Deduplicate peer certificate chain processing code.
Rather than reimplement this in each TLS client and server, deduplicate it
into a single function. Furthermore, rather than dealing with the API
hazard that is SSL_get_peer_cert_chain() in this code, simply produce two
chains - one that has the leaf and one that does not.
SSL_get_peer_cert_chain() can then return the appropriate one.
This also moves the peer cert chain from the SSL_SESSION to the
SSL_HANDSHAKE, which makes more sense since it is not available on
resumption.
ok tb@
djm [Wed, 17 Aug 2022 06:01:57 +0000 (06:01 +0000)]
add an extra flag to sk_probe() to indicate whether we're
probing for a FIDO resident key or not. Unused here, but will
make like easier for portable
schwarze [Tue, 16 Aug 2022 23:03:15 +0000 (23:03 +0000)]
Adjust desired output after the bugfix man.c rev. 1.137.
The new version of the output file was generated with groff-current.
schwarze [Tue, 16 Aug 2022 22:59:48 +0000 (22:59 +0000)]
Restore the traditional behaviour of the man(7) single-font
macros .B, .I, .SM, and .SB that the next-line scope extends
to the end of the next logical input line and is not extended
if that line ends with a \c (no-space) escape sequence.
While improving a loosely related feature in the man(7) .TP
macro, a regression entered the groff codebase in groff
commit
3549fd9f (28-Apr-2017) caused by the usual sloppiness
of Bjarni Ingi Gislason. Since that time, groff wrongly had \c
extend next-line scope to a second line for these macros.
In man.c rev. 1.127 (25-Aug-2018) i synched mandoc behaviour
with groff in this respect, unfortunately failing to notice
the recent regression in groff. The groff regression was
finally fixed by gbranden@ in commit
09c028f3 (07-Jun-2022).
With the present commit, mandoc is back in sync with both GNU and
Heirloom roff regarding the interaction of single-font macros with \c.
jmc [Tue, 16 Aug 2022 20:24:08 +0000 (20:24 +0000)]
use .Cm for "sign"; from josiah frentsos
schwarze [Tue, 16 Aug 2022 18:04:04 +0000 (18:04 +0000)]
New tests of tabs in fill mode, in particular
when multiple input or output lines are involved.
schwarze [Tue, 16 Aug 2022 17:59:12 +0000 (17:59 +0000)]
Adjust the desired output after the improvements in term.c rev. 1.150.
The new version of this file was generated with groff-current.
Heirloom nroff produces exactly the same output for the content
of the DESCRIPTION.
schwarze [Tue, 16 Aug 2022 17:44:53 +0000 (17:44 +0000)]
When starting a new input line, even when continuing the same output
line, use the current output position as the reference position
for tabs on that input line. This brings mandoc in line with the
behaviour of GNU, Heirloom, and Plan 9 roff.
schwarze [Tue, 16 Aug 2022 17:29:18 +0000 (17:29 +0000)]
Even though the constant ASCII_ESC is only used in the roff pre-parser roff.c,
move it to the top level include file mandoc.h to reduce the risk of causing
clashes when introducing new ASCII_* constants in the future.
kn [Tue, 16 Aug 2022 16:18:16 +0000 (16:18 +0000)]
Remove -c compat
Ought to go in 2020 already.
OK deraadt
kn [Tue, 16 Aug 2022 13:59:51 +0000 (13:59 +0000)]
-v prints to standard error not output
stderr is expected and stdout would break vnconfig(8)'s usage
where vnd_dev is omitted and a new one is printed on stdout.
deraadt [Tue, 16 Aug 2022 13:52:41 +0000 (13:52 +0000)]
-v option should only act based upon syscall success. test case is
"rm -rfv nonexistent". problem spotted by Alfred Morgan
ok millert
visa [Tue, 16 Aug 2022 13:32:16 +0000 (13:32 +0000)]
Remove kqueue-related ktrace points from poll(2) and select(2)
These ktrace points do not seem useful any longer because the new
implementation of poll(2) and select(2) appears to work well.
OK deraadt@ mpi@
visa [Tue, 16 Aug 2022 13:29:52 +0000 (13:29 +0000)]
Remove obsolete kern.nselcoll sysctl.
OK millert@ deraadt@
jsg [Tue, 16 Aug 2022 09:29:21 +0000 (09:29 +0000)]
regen
jsg [Tue, 16 Aug 2022 09:28:45 +0000 (09:28 +0000)]
add id for Intel Optane SSD 9 Series (900P/905P)
initial patch from Andreas Bartelt
ok deraadt@
claudio [Tue, 16 Aug 2022 08:14:58 +0000 (08:14 +0000)]
Do not send kroutes from the RDE to the FIB with the true_nexthop but
instead use exit_nexthop (the nexthop from BGP). The FIB code can then
do the lookup and replace the nexthop in the FIB.
This solves an issue when multiple nexthops change concurrently. In the
RDE the decision process handles these changes ansynchronously which
resulted in bad true_nexthops to be sent to the FIB. The exit_nethop
is stable so the data sent to the FIB is always correct.
Fix a bug in netxhop tracking introduced in 1.280. On RTM_CHANGE when the
nexthop of a kroute changes a knexthop_send_update() must be sent but
knexthop_track() does not do that because the kroute did not change.
Introduce a knexthop_update() function for this case instead.
OK tb@
schwarze [Mon, 15 Aug 2022 18:55:29 +0000 (18:55 +0000)]
Some more tests of no-fill mode similar to mdoc/Bd/blank.in
after vertical spacing was improved in man_term.c rev. 1.192.
schwarze [Mon, 15 Aug 2022 18:44:24 +0000 (18:44 +0000)]
Simplify handling of no-fill mode in man(7) by inspecting NODE_NOFILL
at the beginning of the node handler, in the same way as it is done
in the mdoc(7) node handler.
As a side effect, this also fixes a bug: if an input line contained
nothing but an escape sequence producing no output whatsoever (for
example, \fR), the old code incorrectly emitted a blank line anyway,
whereas the new code only emits such a blank link if the input line
actually produces output (even invisible zero-width output). To make
the distinction, the ASCII_NBRZW -> lastcol -> term_newln() mechanism
established in term.c rev. 1.149 is used.
schwarze [Mon, 15 Aug 2022 18:18:46 +0000 (18:18 +0000)]
oops, once again, i failed to correctly sync some dates in the footer
schwarze [Mon, 15 Aug 2022 17:59:00 +0000 (17:59 +0000)]
Distinguish between escape sequences that produce no output
whatsoever (for example \fR) and escape sequences that produce
invisible zero-width output (for example \&). No, i'm not joking,
groff does make that distinction, and it has consequences in some
situations, for example for vertical spacing in no-fill mode.
Heirloom and Plan 9 behaviour is subtly different, but in case of
doubt, we want to follow groff.
While this fixes the behaviour for the majority of escape sequences,
in particular for those most likely to occur in practice, it is not
perfect yet because some of the more exotic ESCAPE_IGNORE sequences
are actually of the "no output whatsoever" type but treated
as "invisible zero-width" for now. With the new ASCII_NBRZW mechanism
in place, switching them over one by one when the need arises will
no longer be very difficult.
deraadt [Mon, 15 Aug 2022 17:58:49 +0000 (17:58 +0000)]
sync
kn [Mon, 15 Aug 2022 17:06:43 +0000 (17:06 +0000)]
Add initial piece for softraid(4) support on arm64
arm64 is the only currently supported OpenBSD platform which both
a) supports booting off root on softraid(4) (kernel and bootloader) and
b) is an EFI platform (as far as installboot(8) is concerned).
Currently, installboot treats softraid root volumes as regular devices,
ignoring ignores chunk devices completely.
Teach installboot the first bits of softraid support for EFI:
installing the single-stage boot loader on chunks rather than the volume.
Copy over sparc64's softraid stage-1 code as-is and make its stage-2 a NOOP:
# ./obj/installboot -v sd4
Using / as root
installing bootstrap on /dev/rsd4c
using first-stage /usr/mdec/BOOTAA64.EFI
sd4: softraid volume with 1 disk(s)
sd0a: installing boot blocks on /dev/rsd0c
copying /usr/mdec/BOOTAA64.EFI to /tmp/installboot.KuBD4zkfpM/efi/boot/bootaa64.efi
writing /tmp/installboot.KuBD4zkfpM/efi/boot/startup.nsh
arm64 miniroot fits and boots with this.
OK stsp
As of now, EFI partitions must still be created manually as installboot's
'-p' does not support softraid at all (next missing piece for root on
softraid on arm64 installations to work out-of-the-box).
bluhm [Mon, 15 Aug 2022 16:15:36 +0000 (16:15 +0000)]
Run IPv6 hop-by-hop options processing in parallel. The ip6_hbhchcheck()
code is MP safe and moves from ip6_local() to ip6_ours(). If there
are any options, store the chain offset and next protocol in a mbuf
tag. When dequeuing without tag, it is a regular IPv6 header. As
mbuf tags degrade performance, use them only if a hop-by-hop header
is present. Such packets are rare and pf drops them by default.
OK mvs@
jsg [Mon, 15 Aug 2022 15:53:45 +0000 (15:53 +0000)]
remove FSPACE macros, unused after uvm_map_sel_limits() removal
mvs [Mon, 15 Aug 2022 14:44:18 +0000 (14:44 +0000)]
Introduce tcp_sogetpcb() to assign `inp' and `tp' from passed socket.
This function will help to avoid code duplication when tcp_usrreq() will
be divided to multiple handlers.
ok bluhm@
jsg [Mon, 15 Aug 2022 13:33:22 +0000 (13:33 +0000)]
unifdef KDB
tb [Mon, 15 Aug 2022 13:29:05 +0000 (13:29 +0000)]
Fix a doc comment to match upstream
kn [Mon, 15 Aug 2022 13:13:41 +0000 (13:13 +0000)]
Add softraid(4) RAID 1C boot support
This is the arm64 adaptation of stsp's (commitid: p55cmsVoEH0fRg77)
"add support for booting from RAID 1C softraid(4) volumes on amd64".
Tell the boot loader to decrypt 1C like C volumes and check the number of
disks in 1C like in 1C volumes -- no new code rquired.
Tested on SolidRun CEX7
OK stsp
NB: While kernel and boot loader support root on softraid on arm64,
installboot(8) does not, i.e. default installations still require manual
disk preparation for now.
schwarze [Mon, 15 Aug 2022 13:01:40 +0000 (13:01 +0000)]
In GNU, Heirloom, and Plan 9 roff, tab positions apply to *input* lines,
not to *output* lines. In particular, if an input line gets broken in
fill mode and a tab occurs in the second output line, it advances to a
position of at least (width of the first output line) + (width of a
space character even though this is never printed) + (width of the part
of the second output line that precedes the tab).
Implement the same logic in mandoc.
Again, do not use tabs in filled text: they have surprising effects,
including this one.
tb [Mon, 15 Aug 2022 12:29:19 +0000 (12:29 +0000)]
Adjust whitespace (tabs vs spaces) on one line to reduce diff with upstream
claudio [Mon, 15 Aug 2022 12:29:17 +0000 (12:29 +0000)]
Neither clt_descreq nor clt_descresp in struct client need to be void *.
They both are only used as struct http_descriptor.
OK tb@
tb [Mon, 15 Aug 2022 11:52:37 +0000 (11:52 +0000)]
Add missing RCS tag and zap a trailing space
mvs [Mon, 15 Aug 2022 11:38:35 +0000 (11:38 +0000)]
Revert previous. It was not ok'ed by dlg@.
tb [Mon, 15 Aug 2022 10:48:45 +0000 (10:48 +0000)]
Initialize readbytes in BIO_gets()
If the bgets() callback returns <= 0, we currently rely on the user
provided callback to set readbytes, which isn't ideal. This also
matches what's done in BIO_read() and BIO_write().
ok jsing
tb [Mon, 15 Aug 2022 10:46:53 +0000 (10:46 +0000)]
Avoid shadowing the cbs function parameter in tlsext_alpn_server_parse()
ok jsing
tb [Mon, 15 Aug 2022 10:45:25 +0000 (10:45 +0000)]
Remove redeclaration of ret
When ret was introduced in an outer scope in r1.113, this declaration
wasn't garbage collected.
ok jsing
claudio [Mon, 15 Aug 2022 10:29:03 +0000 (10:29 +0000)]
For FCGI_END_REQUEST reset the clt struct similar to what is done in the
file and other cases. Especially when the session uses keep-alive it is
important to set TOREAD_HTTP_HEADER so that the state machine knows what's
next.
OK op@
schwarze [Mon, 15 Aug 2022 10:21:01 +0000 (10:21 +0000)]
In GNU, Heirloom, and Plan 9 roff, literal tab characters are
non-breakable in exactly the same way as "\ ". That is, the preceding
word, the tab character, and the following word are always kept
together on the same output line. If filling is enabled and an
output line break is required before the end of the following word,
the break occurs before the beginning of the preceding word.
Make mandoc behave in the same way.
Of course, using literal tab characters in filled text remains a
bad idea, and the "WARNING: tab in filled text" remains unchanged.
op [Mon, 15 Aug 2022 09:40:14 +0000 (09:40 +0000)]
plug some memory leaks in server_file_index when failures occur
namelist and its entries are not freed if escape_html fails or if we
fail in the inner loop. Move scandir later so it's closer to the for
loop and handle escape_html and url_encode failures.
With lots of help from tb, thanks!
ok tb@
op [Mon, 15 Aug 2022 09:36:19 +0000 (09:36 +0000)]
plug a fd leak in read_errdoc if fstat fails or if the file is empty
tweak/ok tb@