espie [Wed, 8 Jun 2022 14:57:12 +0000 (14:57 +0000)]
recognize @extraglob for later
okay sthen@
schwarze [Wed, 8 Jun 2022 13:08:00 +0000 (13:08 +0000)]
Surprisingly, every escape sequence can also be used as an argument
delimiter for an outer escape sequence, in which case the delimiting
escape sequence retains its syntax but usually ignores its argument
and loses its inherent effect. Add rudimentary support for this
syntax quirk in order to improve parsing compatibility with groff.
sthen [Wed, 8 Jun 2022 11:09:33 +0000 (11:09 +0000)]
sync
kettenis [Wed, 8 Jun 2022 10:49:08 +0000 (10:49 +0000)]
stfpinctrl(4)
mglocker [Wed, 8 Jun 2022 09:03:11 +0000 (09:03 +0000)]
Add a new option which allows to set an alternative base-directory to
download the installation files to. This is helpful if the default
base-directory /home isn't available for writing, i.e. when using auto
mounted home directories.
Discussed with and input received from
florian@, jmc@, sthen@, schwarze@, and ajacoutot@.
OK florian@, jmc@, sthen@
kettenis [Wed, 8 Jun 2022 08:42:09 +0000 (08:42 +0000)]
Add stfpinctrl(4).
kettenis [Wed, 8 Jun 2022 08:40:53 +0000 (08:40 +0000)]
Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.
ok jsg@
sthen [Wed, 8 Jun 2022 07:43:16 +0000 (07:43 +0000)]
sync
sashan [Tue, 7 Jun 2022 22:18:34 +0000 (22:18 +0000)]
fixes potential memory leak. if_vinput() should always consume packet
by either passing it further or releasing it.
OK mvs@
sashan [Tue, 7 Jun 2022 22:14:15 +0000 (22:14 +0000)]
fixes NULL pointer dereference panic triggered by relayd.
same panic can be triggered when address table is part
of anchor loaded by 'load anchor ... from ..,' statement.
pf_find_or_create_ruleset() function called by pfr_add_tables()
must receive ruleset name which comes from pre-allocated root
table.
OK claudio@ dlg@
kettenis [Tue, 7 Jun 2022 18:55:55 +0000 (18:55 +0000)]
Enable stfclock(4) and make xhci(4) attach to fdt.
tb [Tue, 7 Jun 2022 18:00:51 +0000 (18:00 +0000)]
Fix format strings: change %i, %li, %lli to %d, %ld, %lld and switch to
%zu for master_key_length, session_id_length and sid_ctx_length, which
are now size_t.
tb [Tue, 7 Jun 2022 17:55:08 +0000 (17:55 +0000)]
Change the loop index from an unsigned int to size_t now that all
upper bounds are known to be size_t.
ok jsing
tb [Tue, 7 Jun 2022 17:53:42 +0000 (17:53 +0000)]
Simplify another CBS_write_bytes() call in d2i_SSL_SESSION()
ok jsing
tb [Tue, 7 Jun 2022 17:52:00 +0000 (17:52 +0000)]
Switch sid_ctx_length in SSL, SSL_CTX and SSL_SESSION to a size_t
ok jsing
tb [Tue, 7 Jun 2022 17:49:22 +0000 (17:49 +0000)]
Use CBS_write_bytes() instead of manual unpacking of a CBS and assigning
length and using memcpy(). This also provides a missing overflow check
(which is done by the only caller, however).
ok jsing
tb [Tue, 7 Jun 2022 17:45:13 +0000 (17:45 +0000)]
Simplify various CBS_write_bytes() calls
Now that session_id_length is a size_t, we can pass it directly to
CBS_write_bytes() instead of using a temporary variable.
ok jsing
tb [Tue, 7 Jun 2022 17:42:35 +0000 (17:42 +0000)]
Switch SSL_SESSION's session_id_length to a size_t
ok jsing
tb [Tue, 7 Jun 2022 17:39:16 +0000 (17:39 +0000)]
Add missing error check call in ssl3_get_new_session_ticket()
EVP_Digest() can fail, so handle failure appropriately and prepare
switch of session_id_length to a size_t.
ok jsing
tb [Tue, 7 Jun 2022 17:35:49 +0000 (17:35 +0000)]
Another small readability tweak: compare explicitly against 0 and NULL,
respectively
ok jsing
tb [Tue, 7 Jun 2022 17:32:53 +0000 (17:32 +0000)]
Tweak readability of a test: compare tmp explicitly against 0 and drop
redundant parentheses.
ok jsing
tb [Tue, 7 Jun 2022 17:31:36 +0000 (17:31 +0000)]
Add a cast to SSL_SESSION_get_id() to indicate that session_id_length
is deliberately reduced to an unsigned int. Since the session_id is at
most 32 bytes, this is not a concern.
ok jsing
tb [Tue, 7 Jun 2022 17:28:05 +0000 (17:28 +0000)]
fix indent
tb [Tue, 7 Jun 2022 17:26:39 +0000 (17:26 +0000)]
Unindent and simplify remove_session_lock()
ok jsing (who informs me he had the same diff in his jungle)
tb [Tue, 7 Jun 2022 17:22:22 +0000 (17:22 +0000)]
Drop an unnecessary cast
ok jsing
tb [Tue, 7 Jun 2022 17:20:26 +0000 (17:20 +0000)]
Simplify CBS_write_bytes() invocation
Now that master_key_length is a size_t, we no longer have to fiddle with
data_len. We can rather pass a pointer to it to CBS_write_bytes().
ok jsing
tb [Tue, 7 Jun 2022 17:19:09 +0000 (17:19 +0000)]
The master_key_length can no longer be < 0
ok jsing
tb [Tue, 7 Jun 2022 17:18:21 +0000 (17:18 +0000)]
Switch the SSL_SESSION's master_key_length to a size_t
ok jsing
tb [Tue, 7 Jun 2022 17:14:17 +0000 (17:14 +0000)]
Add error checking to tls_session_secret_cb() calls
Failure of this undocumented callback was previously silently ignored.
Follow OpenSSL's behavior and throw an internal error (for lack of a
better choice) if the callback failed or if it set the master_key_length
to a negative number.
Unindent the success path and clean up some strange idioms.
ok jsing
claudio [Tue, 7 Jun 2022 16:42:07 +0000 (16:42 +0000)]
Try to be more precise with rtlabelid tracking.
By moving the rtlabel_unref into kroute_remove the unref is more reliable.
There are still places where handling is not quite right but it is a step
in the right direction.
OK tb@
claudio [Tue, 7 Jun 2022 16:12:00 +0000 (16:12 +0000)]
uint8_t not u_int8_t. Damn finger memory.
claudio [Tue, 7 Jun 2022 15:57:47 +0000 (15:57 +0000)]
Retire F_RTLABEL it was not used for anything.
Also cleanup some redundant if statements.
OK tb@
sthen [Tue, 7 Jun 2022 15:42:53 +0000 (15:42 +0000)]
merge unbound 1.16.0
sthen [Tue, 7 Jun 2022 15:39:58 +0000 (15:39 +0000)]
update to unbound 1.16.0, discussed with florian@, test from Renaud Allard
kettenis [Tue, 7 Jun 2022 12:07:45 +0000 (12:07 +0000)]
Remove uvm_km_valloc_prefer_wait(9) and uvm_km_free_wakeup(9) now that
nothing uses these functions anymore.
ok mpi@
kettenis [Tue, 7 Jun 2022 12:02:52 +0000 (12:02 +0000)]
Remove redundant check for free pages. The pmemrange code that is called
by uvm_pglistalloc(9) does a similar check already.
ok mpi@
nicm [Tue, 7 Jun 2022 10:02:19 +0000 (10:02 +0000)]
Expand arguments to some commands where it makes sense, GitHub issue
3204 from Anindya Mukherjee.
schwarze [Tue, 7 Jun 2022 09:51:03 +0000 (09:51 +0000)]
Split the excessively generic diagnostic message "invalid escape sequence"
into the more specific messages "invalid escape argument delimiter"
and "invalid escape sequence argument".
schwarze [Tue, 7 Jun 2022 09:41:22 +0000 (09:41 +0000)]
Purge duplicate error reporting from the .tr request parser:
the error was already reported earlier when roff_expand()
called roff_escape().
tb [Tue, 7 Jun 2022 08:50:07 +0000 (08:50 +0000)]
Fix path validation of AS numbers
If a certificate along the chain does not have an AS numbers extension,
this is a failure condition according to RFC 3779, section 3.3.
ok job
kettenis [Mon, 6 Jun 2022 22:28:57 +0000 (22:28 +0000)]
stfclock(4)
sthen [Mon, 6 Jun 2022 20:53:22 +0000 (20:53 +0000)]
bump pbuild's datasize-cur from 2G to 3G on i386, this or close to it
is needed to build some important ports. ok tb@
schwarze [Mon, 6 Jun 2022 19:22:54 +0000 (19:22 +0000)]
To better match groff parsing, reject digits and some mathematical
operators as argument delimiters for some escape sequences that take
numerical arguments, in the same way as it had already been done for \h.
Argument delimiter parsing for escape sequences taking numerical arguments
is not perfect yet. In particular, when a character representing a
scaling unit is abused as the argument delimiter, parsing for that
character becomes context-dependent, and it is no longer possible to
find the end of the escape sequence without calling the full numerical
expression parser, which i refrain from attempting in this commit.
For now, continuing to misparse insane constructions like \Bc1c+1cc
(which is valid in groff and resolves to "1" because 1c+1c = two
centimeters is a valid numerical expression and 'c' is also a valid
delimiter) is a small price to pay for keeping complexity at bay
and for not losing focus in the ongoing series of refinements.
tb [Mon, 6 Jun 2022 16:12:30 +0000 (16:12 +0000)]
Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some
SSLv2 remnants.
ok jsing
tb [Mon, 6 Jun 2022 16:11:00 +0000 (16:11 +0000)]
Tweak comment describing the SSL_SESSION ASN.1
ok jsing
tb [Mon, 6 Jun 2022 15:20:54 +0000 (15:20 +0000)]
Minor style cleanup in ssl_txt.c
Wrap long lines and fix a bug where the wrong struct member was checked
for NULL.
ok jsing
kettenis [Mon, 6 Jun 2022 14:58:19 +0000 (14:58 +0000)]
Enable stfclock(4) and make xhci(4) attach to fdt.
kettenis [Mon, 6 Jun 2022 14:57:33 +0000 (14:57 +0000)]
Add stfclock(4), a driver for the clock controller found on the StarFive
JH7100 SoC.
ok jsg@
claudio [Mon, 6 Jun 2022 14:45:41 +0000 (14:45 +0000)]
Simplify solock() and sounlock(). There is no reason to return a value
for the lock operation and to pass a value to the unlock operation.
sofree() still needs an extra flag to know if sounlock() should be called
or not. But sofree() is called less often and mostly without keeping the lock.
OK mpi@ mvs@
kettenis [Mon, 6 Jun 2022 14:34:11 +0000 (14:34 +0000)]
Remove unused prototype.
Fix a whitespace issue.
tb [Mon, 6 Jun 2022 13:46:37 +0000 (13:46 +0000)]
Fix comment + spacing.
Apparently 60 * 5 + 4 seconds is 5 minutes. Presumably this is the case
with sufficiently potent crack, which would explain a few things in here.
tb [Mon, 6 Jun 2022 13:18:34 +0000 (13:18 +0000)]
Remove incorrect and ungrammattical comment
The fallback to SHA-1 if SHA-256 is disabled fell victim to tedu many
moons ago when this file was still called s3_clnt.c and had no RCS ID.
schwarze [Mon, 6 Jun 2022 12:17:31 +0000 (12:17 +0000)]
adjust two desired error messages after roff_escape.c rev. 1.11
improved diagnostics for the \C escape sequence
schwarze [Mon, 6 Jun 2022 12:09:18 +0000 (12:09 +0000)]
Allow arbitrary argument delimiters for \C, like groff does.
The restriction of only allowing ' as the delimiter was introduced
by kristaps@ on 2011/04/09 when he first supported \C.
For most other escape sequences, similar restrictions were relaxed
later on, but for the rarely used \C, it was apparently forgotten.
While here, reject empty character names: they are never valid.
kettenis [Mon, 6 Jun 2022 10:50:56 +0000 (10:50 +0000)]
The StarFive JH7100 SoC has peripherals that only support 32-bit DMA
(in particular the dwmmc(4) and dwge(4) devices; there may be more).
ok jsg@
kettenis [Mon, 6 Jun 2022 09:46:07 +0000 (09:46 +0000)]
Add support for the XHCI function that is part of the Cadence USB3 DRD
controller. There are various incarnations of the controller. This diff
only adds support for the "V1"/"CDNS3" version as found on the StarFive
JH7100 SoC. Further changes may be needed to support controllers integrated
on other SoCs.
ok jsg@
tb [Mon, 6 Jun 2022 08:48:11 +0000 (08:48 +0000)]
Fix spaces before tabs
espie [Mon, 6 Jun 2022 08:18:22 +0000 (08:18 +0000)]
have compute_checksum return a status, so that we don't report similar
errors several times (for instance, if a file doesn't exist, its checksum
is not going to match, obviously)
espie [Mon, 6 Jun 2022 08:03:32 +0000 (08:03 +0000)]
zap fairly old bug from refactoring: we already validated all the set plists,
don't do it again (would skew the file system usage a bit).
Also: we don't need to check for firmware if we're not actively deleting.
normal updates won't touch them.
espie [Mon, 6 Jun 2022 07:57:21 +0000 (07:57 +0000)]
this message is seriously outdated: the packing-lists have been read by
the code that calls delete_handle already
espie [Mon, 6 Jun 2022 07:39:39 +0000 (07:39 +0000)]
Yet another iteration of the tied algorithm: some packages contain
several hundred copies of the same file (even thousands! I'm looking at you
sdcc), so matching through a list is O(n^2).
So hash the hashes on the actual file name so that we match directly if
the same name file didn't change, and use the first entry otherwise, since
the name won't match.
speeds up updating of texlive somewhat, and makes a huge difference for sdcc.
espie [Mon, 6 Jun 2022 07:21:17 +0000 (07:21 +0000)]
also zap signer if we zap digital-signature
jsg [Mon, 6 Jun 2022 07:10:15 +0000 (07:10 +0000)]
drm/i915: Fix -Wstringop-overflow warning in call to intel_read_wm_latency()
From Gustavo A. R. Silva
195fffbf8291a84580762ac6e3101489954d0216 in linux 5.15.y/5.15.45
336feb502a715909a8136eb6a62a83d7268a353b in mainline linux
espie [Mon, 6 Jun 2022 06:57:35 +0000 (06:57 +0000)]
expand on the mismatches between the tarball and the packing-list
tb [Mon, 6 Jun 2022 06:11:04 +0000 (06:11 +0000)]
Minor tweaks to psk modes regress
jsg [Mon, 6 Jun 2022 03:59:38 +0000 (03:59 +0000)]
regen
jsg [Mon, 6 Jun 2022 03:58:19 +0000 (03:58 +0000)]
drm/amdgpu: add beige goby PCI ID
From Alex Deucher
62e9bd20035b53ff6c679499c08546d96c6c60a7 in mainline linux
tb [Sun, 5 Jun 2022 20:37:24 +0000 (20:37 +0000)]
move the calls to psk kex modes tests down to match order in ssl_tlsext.c
tb [Sun, 5 Jun 2022 20:24:10 +0000 (20:24 +0000)]
Add regress coverage for PSK kex modes tlsext handlers.
schwarze [Sun, 5 Jun 2022 13:42:49 +0000 (13:42 +0000)]
With the improved escape sequence parser, it becomes easy to also improve
diagnostics. Distinguish "incomplete escape sequence", "invalid special
character", and "unknown special character" from the generic "invalid
escape sequence", also promoting them from WARNING to ERROR because
incomplete escape sequences are severe syntax violations and because
encountering an invalid or unknown special character makes it likely
that part of the document content intended by the authors gets lost.
tb [Sun, 5 Jun 2022 13:31:35 +0000 (13:31 +0000)]
Revert accidentally committed check
claudio [Sun, 5 Jun 2022 12:43:13 +0000 (12:43 +0000)]
Rework how fib_priority is handled.
Instead of passing it around all the time put the fib_priority into the
kroute state. It is only needed in send_rtmsg() in the end.
Additionally insert F_BGP_INSERTED routes with a special RTP_MINE priority.
This makes changing the fib_priority at runtime simpler because there
is no need to alter the kroute table anymore.
OK tb@ deraadt@
schwarze [Sun, 5 Jun 2022 10:19:47 +0000 (10:19 +0000)]
Small cleanup of error reporting:
call mandoc_msg() only once at the end, not sometimes in the middle,
classify incomplete, non-expanding escape sequences as ESCAPE_ERROR,
and also reduce the number of return statemants;
no formatting change intended.
dlg [Sun, 5 Jun 2022 02:54:18 +0000 (02:54 +0000)]
enable interrupt coalescing.
mvneta only supports coalescing tx completions by count, so this
uses the txmit value or half the ring as the threshold, whichever
is lower.
rx coalescing has a threshold on the number of packets, and a max
time it will wait before interrupting. however, it also has a
threshold for how many spare/empty descriptors there are on the
ring too. we use this latter threshold to have the chip interrupt
as soon as it uses the allocation that the rx ring moderation has
granted, and then first two to otherwise rate limit rx to about 4k
interrupts per second.
ok patrick@
dlg [Sun, 5 Jun 2022 02:49:30 +0000 (02:49 +0000)]
use the write lemtohXX functions for bits of the stats structure.
unbreaks the build on bigendian archs.
found by deraadt@
dlg [Sun, 5 Jun 2022 02:43:44 +0000 (02:43 +0000)]
add support for getting the frequency of the clocks mventa uses.
mvneta does interrupt coalescing based on time as counted by these
clocks, so being able to ask how fast they tick is useful.
lots of help and ok kettenis@
stsp [Sat, 4 Jun 2022 11:32:11 +0000 (11:32 +0000)]
Make iwm(4) handle 9k devices which do not support antenna B.
Problem reported by Chris Narkiewicz who owns such a device.
Johannes Berg provided helpful hints regarding the reason for
the firmware error seen by Chris.
espie [Sat, 4 Jun 2022 10:12:38 +0000 (10:12 +0000)]
document internal annotations a bit more, explain about the always-update
changes, and be more specific about @digital-signature and @signer, since
we only use the one scheme now.
tb [Sat, 4 Jun 2022 07:55:44 +0000 (07:55 +0000)]
The parse stubs need to skip over the extension data.
Found by anton with tlsfuzzer
ok anton
nicm [Sat, 4 Jun 2022 07:42:07 +0000 (07:42 +0000)]
When picking a buffer because one isn't specified by the user, ignore
named buffers. GitHub issue 3212 from David le Blanc.
jsg [Sat, 4 Jun 2022 03:13:40 +0000 (03:13 +0000)]
match on Gemini Lake HD Audio (0x3198)
on a Star Labs StarLite Mk IV laptop the audio device is subclass audio
not hd audio, so azalia does not match
reported and tested by Chris Narkiewicz
ok deraadt@
tb [Sat, 4 Jun 2022 02:14:21 +0000 (02:14 +0000)]
KNF nit
tb [Sat, 4 Jun 2022 01:14:43 +0000 (01:14 +0000)]
Tweak a comment using review feedback from jsing
millert [Fri, 3 Jun 2022 19:46:09 +0000 (19:46 +0000)]
Memory leak when assigning a string to some of the built-in variables.
Allocated string erroneously marked DONTFREE. From Miguel Pineiro Jr.
millert [Fri, 3 Jun 2022 19:42:27 +0000 (19:42 +0000)]
The fulfillment of an assignment operand had been truncating its
entry in ARGV (since circa 1989). From Miguel Pineiro Jr.
millert [Fri, 3 Jun 2022 19:40:56 +0000 (19:40 +0000)]
Fix a file management memory leak that appears to have been there
since the files array was first initialized with stdin, stdout, and
stderr (circa 1992). From Miguel Pineiro Jr.
tb [Fri, 3 Jun 2022 13:31:49 +0000 (13:31 +0000)]
Add stubbed out handlers for the pre_shared_key extension
ok jsing
tb [Fri, 3 Jun 2022 13:29:39 +0000 (13:29 +0000)]
Implement handlers for the psk_key_exchange_modes extensions.
ok jsing
tb [Fri, 3 Jun 2022 13:28:36 +0000 (13:28 +0000)]
Add a use_psk_dhe_ke flag to the TLSv1.3 handshake struct
This will be used to indicate client side support for DHE key
establishment.
ok jsing
tb [Fri, 3 Jun 2022 13:26:13 +0000 (13:26 +0000)]
Ensure that a client who sent a PSK extension has also sent a PSK
key exchange mode extension, as required by RFC 8446, 4.2.9.
ok jsing
tb [Fri, 3 Jun 2022 13:23:16 +0000 (13:23 +0000)]
Check tls_config_new() for NULL return
This way we don't crash in tls_config_insecure_noverify_cert().
From Mateusz Piotrowski on bugs
ok claudio
tb [Fri, 3 Jun 2022 13:11:04 +0000 (13:11 +0000)]
Provide #defines for the two currently registered PskKeyExchangeModes.
ok jsing
schwarze [Fri, 3 Jun 2022 12:01:42 +0000 (12:01 +0000)]
oops, update forgotten date in the footer
schwarze [Fri, 3 Jun 2022 11:50:25 +0000 (11:50 +0000)]
During identifier parsing, handle undefined escape sequences
in the same way as groff:
* \\ is always reduced to \
* \. is always reduced to .
* other undefined escape sequences are usually reduced to the escape name,
for example \G to G, except during the expansion of expanding escape
sequences having the standard argument form (in particular \* and \n),
in which case the backslash is preserved literally.
Yes, this is confusing indeed.
For example, the following have the same meaning:
* .ds \. and .ds . which is not the same as .ds \\.
* \*[\.] and \*[.] which is not the same as \*[\\.]
* .ds \G and .ds G which is not the same as .ds \\G
* \*[\G] and \*[\\G] which is not the same as \*[G] <- sic!
To feel less dirty, have a leaning toothpick, if you are so inclined.
This patch also slightly improves the string shown by the "escaped
character not allowed in a name" error message.
dlg [Fri, 3 Jun 2022 10:38:40 +0000 (10:38 +0000)]
expose hardware counters as kstats.
some of them are 16 bit, so check frequently.
now i can see what packets my apu1 is dropping in hardware.
ok claudio@
nicm [Fri, 3 Jun 2022 08:09:16 +0000 (08:09 +0000)]
Do not unintentionally turn off all mouse mode when button is also present.
djm [Fri, 3 Jun 2022 04:47:21 +0000 (04:47 +0000)]
move auth_openprincipals() and auth_openkeyfile() over to
auth2-pubkeyfile.c too; they make more sense there.
djm [Fri, 3 Jun 2022 04:31:54 +0000 (04:31 +0000)]
test setenv in both client and server, test first-match-wins too
djm [Fri, 3 Jun 2022 04:30:46 +0000 (04:30 +0000)]
Make SetEnv directives first-match-wins in both sshd_config and
sshd_config; previously if the same name was reused then the last
would win (which is the opposite to how the config is supposed to
work).
While there, make the ssh_config parsing more like sshd_config.
bz3438, ok dtucker
dtucker [Fri, 3 Jun 2022 04:00:15 +0000 (04:00 +0000)]
Add missing *-sk types to ssh-keyscan manpage.
From skazi0 via github PR#294.