openbsd
2 years agoKNF nit
tb [Sat, 4 Jun 2022 02:14:21 +0000 (02:14 +0000)]
KNF nit

2 years agoTweak a comment using review feedback from jsing
tb [Sat, 4 Jun 2022 01:14:43 +0000 (01:14 +0000)]
Tweak a comment using review feedback from jsing

2 years agoMemory leak when assigning a string to some of the built-in variables.
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.

2 years agoThe fulfillment of an assignment operand had been truncating its
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.

2 years agoFix a file management memory leak that appears to have been there
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.

2 years agoAdd stubbed out handlers for the pre_shared_key extension
tb [Fri, 3 Jun 2022 13:31:49 +0000 (13:31 +0000)]
Add stubbed out handlers for the pre_shared_key extension

ok jsing

2 years agoImplement handlers for the psk_key_exchange_modes extensions.
tb [Fri, 3 Jun 2022 13:29:39 +0000 (13:29 +0000)]
Implement handlers for the psk_key_exchange_modes extensions.

ok jsing

2 years agoAdd a use_psk_dhe_ke flag to the TLSv1.3 handshake struct
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

2 years agoEnsure that a client who sent a PSK extension has also sent a PSK
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

2 years agoCheck tls_config_new() for NULL return
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

2 years agoProvide #defines for the two currently registered PskKeyExchangeModes.
tb [Fri, 3 Jun 2022 13:11:04 +0000 (13:11 +0000)]
Provide #defines for the two currently registered PskKeyExchangeModes.

ok jsing

2 years agooops, update forgotten date in the footer
schwarze [Fri, 3 Jun 2022 12:01:42 +0000 (12:01 +0000)]
oops, update forgotten date in the footer

2 years agoDuring identifier parsing, handle undefined escape sequences
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.

2 years agoexpose hardware counters as kstats.
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@

2 years agoDo not unintentionally turn off all mouse mode when button is also present.
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.

2 years agomove auth_openprincipals() and auth_openkeyfile() over to
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.

2 years agotest setenv in both client and server, test first-match-wins too
djm [Fri, 3 Jun 2022 04:31:54 +0000 (04:31 +0000)]
test setenv in both client and server, test first-match-wins too

2 years agoMake SetEnv directives first-match-wins in both sshd_config and
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

2 years agoAdd missing *-sk types to ssh-keyscan manpage.
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.

2 years agoAdd period at end of "not known by any other names" message. github PR#320
dtucker [Fri, 3 Jun 2022 03:21:09 +0000 (03:21 +0000)]
Add period at end of "not known by any other names" message.  github PR#320
from jschauma, ok djm@

2 years agossh-keygen -A: do not generate DSA keys by default. Based on github PR#303
dtucker [Fri, 3 Jun 2022 03:17:42 +0000 (03:17 +0000)]
ssh-keygen -A: do not generate DSA keys by default.  Based on github PR#303
from jsegitz with man page text from jmc@, ok markus@ djm@

2 years agofix the definition of the MVNETA_PRXITTH Port RX Intr Threshold register
dlg [Fri, 3 Jun 2022 03:17:36 +0000 (03:17 +0000)]
fix the definition of the MVNETA_PRXITTH Port RX Intr Threshold register

2 years agoLet btrace(8) execute the END probe upon receiving a SIGTERM signal
jca [Thu, 2 Jun 2022 21:38:46 +0000 (21:38 +0000)]
Let btrace(8) execute the END probe upon receiving a SIGTERM signal

While SIGINT (already handled) makes sense for interactive use, handling
SIGTERM in the same manner is less surprising for scripting.  This lets
you do:

  btrace ... & some workload; kill $!

and get the expected output.

ok mpi@

2 years agoDo not attempt to use client in config file (it will be NULL), GitHub
nicm [Thu, 2 Jun 2022 21:19:32 +0000 (21:19 +0000)]
Do not attempt to use client in config file (it will be NULL), GitHub
issue 3206.

2 years agoWhen deleting or renaming a buffer and a buffer name is specified,
nicm [Thu, 2 Jun 2022 20:41:21 +0000 (20:41 +0000)]
When deleting or renaming a buffer and a buffer name is specified,
complain if the buffer doesn't exist instead of silently deleting or
renaming the most recent buffer. GitHub issue 3205.

2 years agoTake the size of allocation into account when checking the kernel reserve.
kettenis [Thu, 2 Jun 2022 18:00:53 +0000 (18:00 +0000)]
Take the size of allocation into account when checking the kernel reserve.

ok mpi@

2 years agoDon't treat the first arg as a 4.3BSD option string if it contains a '/'.
millert [Thu, 2 Jun 2022 15:35:55 +0000 (15:35 +0000)]
Don't treat the first arg as a 4.3BSD option string if it contains a '/'.
Also document that files-to-dump could be interpreted as a 4.3BSD option
if it doesn't contain a slash.  OK deraadt@

2 years agoSince \. is not a character escape sequence, re-classify it from the
schwarze [Thu, 2 Jun 2022 14:49:25 +0000 (14:49 +0000)]
Since \. is not a character escape sequence, re-classify it from the
wrong parsing class ESCAPE_SPECIAL to the better-suited parsing class
ESCAPE_UNDEF, exactly like it is already done for the similar \\,
which isn't a character escape sequence either.

No formatting change is intended just yet, but this will matter for
upcoming improvements in the parser for roff(7) macro, string, and
register names.

See the node "5.23.2 Copy Mode" in "info groff" regarding
what \\ and \. really mean.

2 years agoUse consistent spacing around assignments
tb [Thu, 2 Jun 2022 12:08:41 +0000 (12:08 +0000)]
Use consistent spacing around assignments

2 years agoOnly constraints and verify need static linking in here.
tb [Thu, 2 Jun 2022 11:48:36 +0000 (11:48 +0000)]
Only constraints and verify need static linking in here.

2 years agoAvoid the layering violation of re-parsing for \E in roff_expand().
schwarze [Thu, 2 Jun 2022 11:28:16 +0000 (11:28 +0000)]
Avoid the layering violation of re-parsing for \E in roff_expand().
To that end, add another argument to roff_escape()
returning the index of the escape name.
This also makes the code in roff_escape() a bit more uniform
in so far as it no longer needs the "char esc_name" local variable
but now does everything with indices into buf[].
No functional change.

2 years agoAdjust lowest allowed routing priority to be bigger than RTP_LOCAL.
claudio [Thu, 2 Jun 2022 11:12:47 +0000 (11:12 +0000)]
Adjust lowest allowed routing priority to be bigger than RTP_LOCAL.
RTP_LOCAL is internally used by the kernel and is not available for
userland. The minimal usable routing prio is 2.
OK tb@

2 years agoUse a common idiom to check if the user supplied routing priority is
claudio [Thu, 2 Jun 2022 11:05:15 +0000 (11:05 +0000)]
Use a common idiom to check if the user supplied routing priority is
in range. Also rephrase the error message.
OK tb@

2 years agoCleanup ktable_exists() usage and its warning message.
claudio [Thu, 2 Jun 2022 09:29:34 +0000 (09:29 +0000)]
Cleanup ktable_exists() usage and its warning message.

Check the return value in all cases and use a common idiom for this check.
OK tb@

2 years agoAdjust some warning messages to be a bit more accurate. ktable_update()
claudio [Thu, 2 Jun 2022 08:46:25 +0000 (08:46 +0000)]
Adjust some warning messages to be a bit more accurate. ktable_update()
actually loads a routing table and not really an rdomain.

2 years agoWhen running sysupgrade on -stable move to the next release, not
florian [Thu, 2 Jun 2022 07:44:18 +0000 (07:44 +0000)]
When running sysupgrade on -stable move to the next release, not
-current.
Found the hard way by & OK sthen

2 years agoImplement and enable IPv4, TCP, and UDP checksum offloading for igc.
mbuhl [Thu, 2 Jun 2022 07:41:17 +0000 (07:41 +0000)]
Implement and enable IPv4, TCP, and UDP checksum offloading for igc.

ok kevlo@

2 years agoStop hiding a few assertions behind the opt-in LOCKF_DIAGNOSTIC option.
anton [Thu, 2 Jun 2022 05:32:28 +0000 (05:32 +0000)]
Stop hiding a few assertions behind the opt-in LOCKF_DIAGNOSTIC option.
This code has already been exercised quite extensively by syzkaller and
got decent test coverage.

2 years agoenable aq(4) on arm64 now that it works reasonably well
jmatthew [Thu, 2 Jun 2022 03:09:39 +0000 (03:09 +0000)]
enable aq(4) on arm64 now that it works reasonably well

2 years agoFix a buffer overrun in the roff(7) escape sequence parser that could
schwarze [Wed, 1 Jun 2022 23:20:19 +0000 (23:20 +0000)]
Fix a buffer overrun in the roff(7) escape sequence parser that could
be triggered by macro arguments ending in double backslashes, for
example if people wrote .Sq "\\" instead of the correct .Sq "\e".

The bug was hard to find because it caused a segfault only very rarely,
according to my measurements with a probability of less than one permille.
I'm sorry that the first one to hit the bug was an arm64 release build
run by deraadt@.  Thanks to bluhm@ for providing access to an arm64
machine for debugging purposes.  In the end, the bug turned out to be
architecture-independent.

The reason for the bug was that i assumed an invariant that does not exist.
The function roff_parse_comment() is very careful to make sure that the
input buffer does not end in an escape character before passing it on,
so i assumed this is still true when reaching roff_expand() immediately
afterwards.  But roff_expand() can also be reached from roff_getarg(),
in which case there *can* be a lone escape character at the end of the
buffer in case copy mode processing found and converted a double
backslash.

Fix this by handling a trailing escape character correctly in the
function roff_escape().

The lesson here probably is to refrain from assuming an invariant
unless verifying that the invariant actually holds is reasonably
simple.  In some cases, in particular for invariants that are important
but not simple, it might also make sense to assert(3) rather than just
assume the invariant.  An assertion failure is so much better than a
buffer overrun...

2 years agochange amd64 pmap_convert to return void
dv [Wed, 1 Jun 2022 17:47:18 +0000 (17:47 +0000)]
change amd64 pmap_convert to return void

There are no other return options, so adjust function signature to
void. This also allows for cleaning up its usage in vmm(4) in the
vm pmap initialization logic.

ok mlarkin@

2 years agocallers to pf(4) must continue to run with packet as returned
sashan [Wed, 1 Jun 2022 17:34:13 +0000 (17:34 +0000)]
callers to pf(4) must continue to run with packet as returned
by firewall.

OK dlg@

2 years agoremove unused pmap_convert prototype from i386
dv [Wed, 1 Jun 2022 17:16:00 +0000 (17:16 +0000)]
remove unused pmap_convert prototype from i386

Leftover lint from early days of vmm(4).

ok mlarkin@

2 years agoIf escape-time is 0, force to 1 instead - not waiting at all is asking
nicm [Wed, 1 Jun 2022 15:43:22 +0000 (15:43 +0000)]
If escape-time is 0, force to 1 instead - not waiting at all is asking
for problems on some platforms.

2 years agoRemove a confusing comment that has been stale since e2k19 (r1.26).
tb [Wed, 1 Jun 2022 14:48:53 +0000 (14:48 +0000)]
Remove a confusing comment that has been stale since e2k19 (r1.26).

2 years agoAdd a regress test for the end of lock range ambiguity bug.
visa [Wed, 1 Jun 2022 14:21:50 +0000 (14:21 +0000)]
Add a regress test for the end of lock range ambiguity bug.

2 years agoFix ambiguity with lock range end
visa [Wed, 1 Jun 2022 14:18:43 +0000 (14:18 +0000)]
Fix ambiguity with lock range end

When the user requests a lock range that ends at LLONG_MAX, replace
the end point with the special EOF value -1. This avoids ambiguity
with lf_end in lf_split(). The ambiguity could result in a broken
data structure.

This change is visible to userspace in a corner case. When a lock range
has been requested with an end point at absolute position LLONG_MAX,
fcntl(F_GETLK) returns l_len == 0, instead of a positive value, for that
range. This seems consistent with FreeBSD and Linux.

OK anton@

Reported-by: syzbot+c93afea6c27a3fa3af39@syzkaller.appspotmail.com
2 years agoFix lock range start when l_whence == SEEK_END and l_len < 0.
visa [Wed, 1 Jun 2022 14:16:28 +0000 (14:16 +0000)]
Fix lock range start when l_whence == SEEK_END and l_len < 0.

OK anton@

2 years agoLimit the number of RSC checklist FileNameAndHash entries the same way
tb [Wed, 1 Jun 2022 10:59:21 +0000 (10:59 +0000)]
Limit the number of RSC checklist FileNameAndHash entries the same way
as mft FileAndHash entries are checked.

ok claudio job

2 years agoFix off-by-one in MAX_MANIFEST_ENTRIES check
tb [Wed, 1 Jun 2022 10:58:34 +0000 (10:58 +0000)]
Fix off-by-one in MAX_MANIFEST_ENTRIES check

ok claudio job

2 years agoshrink dmesg output by printing the ethernet address on the attach line.
dlg [Wed, 1 Jun 2022 08:19:15 +0000 (08:19 +0000)]
shrink dmesg output by printing the ethernet address on the attach line.

2 years agomark the mvneta interrupt handler as mpsafe.
dlg [Wed, 1 Jun 2022 06:33:46 +0000 (06:33 +0000)]
mark the mvneta interrupt handler as mpsafe.

link state changes still take the kernel lock, but packet processing
is unlocked now.

2 years agorework the rx ring processing.
dlg [Wed, 1 Jun 2022 04:31:08 +0000 (04:31 +0000)]
rework the rx ring processing.

this is another big step toward making the code mpsafe, and makes
a bunch of ring operations such as dmamap syncs and register updates
get done once for the ring rather than for every packet.

2 years agomark mvneta_start mpsafe.
dlg [Wed, 1 Jun 2022 03:51:19 +0000 (03:51 +0000)]
mark mvneta_start mpsafe.

the interrupt handler is still under kernel lock, but at least you
can queue packets from another cpu concurrently.

2 years agodont have to say Ethernet address in dmesg, address is fine
dlg [Wed, 1 Jun 2022 03:39:57 +0000 (03:39 +0000)]
dont have to say Ethernet address in dmesg, address is fine

2 years agotrim some white space
dlg [Wed, 1 Jun 2022 03:37:41 +0000 (03:37 +0000)]
trim some white space

2 years agorework tx start and completion.
dlg [Wed, 1 Jun 2022 03:34:21 +0000 (03:34 +0000)]
rework tx start and completion.

this is a big step toward making the code mpsafe, and makes a bunch
of ring operations such as dmamap syncs and register updates per
start/completion call rather than per packet.

2 years agoMake sure we error on parse failure.
tb [Tue, 31 May 2022 21:35:46 +0000 (21:35 +0000)]
Make sure we error on parse failure.

ok claudio

2 years agoRudimentary implementation of the \A escape sequence, following groff
schwarze [Tue, 31 May 2022 20:21:40 +0000 (20:21 +0000)]
Rudimentary implementation of the \A escape sequence, following groff
semantics (test identifier for syntactical validity), not at all
following the completely unrelated Heirloom semantics (define
hyperlink target position).

The main motivation for providing this implementation is to get \A
into the parsing class ESCAPE_EXPAND that corresponds to groff parsing
behaviour, which is quite similar to the \B escape sequence (test
numerical expression for syntactical validity).  This is likely
to improve parsing of nested escape sequences in the future.

Validation isn't perfect yet.  In particular, this implementation
rejects \A arguments containing some escape sequences that groff
allows to slip through.  But that is unlikely to cause trouble even
in documents using \A for non-trivial purposes.  Rejecting the nested
escapes in question might even improve robustnest because the rejected
names are unlikely to really be usable for practical purposes - no
matter that groff dubiously considers them syntactically valid.

2 years agofix spacing;
jmc [Tue, 31 May 2022 20:12:24 +0000 (20:12 +0000)]
fix spacing;

2 years agoFix typo: argv[1] -> argv[i]
tb [Tue, 31 May 2022 19:37:02 +0000 (19:37 +0000)]
Fix typo: argv[1] -> argv[i]

2 years agoRemove old checklists and add a couple of new ones.
tb [Tue, 31 May 2022 19:14:15 +0000 (19:14 +0000)]
Remove old checklists and add a couple of new ones.

2 years agoThe pflow regression test could fail due to a race where the close(2)
mbuhl [Tue, 31 May 2022 19:01:46 +0000 (19:01 +0000)]
The pflow regression test could fail due to a race where the close(2)
call of the receiver was called before the FIN on the sender was
processed.

OK bluhm@
OK anton@

2 years agoI made non-trivial contributions to these files.
tb [Tue, 31 May 2022 18:51:35 +0000 (18:51 +0000)]
I made non-trivial contributions to these files.

2 years agoShuffle two helper functions down.
tb [Tue, 31 May 2022 18:45:14 +0000 (18:45 +0000)]
Shuffle two helper functions down.

This way the helper functions appear in the order they are used in
rsc_parse_econtent().

2 years agoUpdate reference to RSC draft 08
tb [Tue, 31 May 2022 18:42:26 +0000 (18:42 +0000)]
Update reference to RSC draft 08

ok claudio job

2 years agoRemove now unused ASN1_frame() and cms_econtent_version()
tb [Tue, 31 May 2022 18:41:43 +0000 (18:41 +0000)]
Remove now unused ASN1_frame() and cms_econtent_version()

ok claudio job

2 years agoRewrite rsc.c using ASN.1 templates
tb [Tue, 31 May 2022 18:40:15 +0000 (18:40 +0000)]
Rewrite rsc.c using ASN.1 templates

This implements the constrained versions of the RFC 3779 structures
since OpenSSL's 3779 API doesn't expose IPAddrBlocks. This way we can
also avoid extra checks after walking the structs. Use the previously
exposed sbgp_as_{id,range}() and sbgp_addr{,_range}() to remove a lot
of copy-pasted code.

While parsing ConstrainedASIdentifiers allocate only once and for
ConstrainedIPAddrBlocks allocate once per address family instead of
doing a reallocation for each asid or prefix.

This removes the last explicit use of ASN1_TYPE and ASN1_SEQUENCE_ANY
from rpki-client.

ok claudio job

2 years agoPrepare rewrite of rsc.c with templated ASN.1
tb [Tue, 31 May 2022 18:33:16 +0000 (18:33 +0000)]
Prepare rewrite of rsc.c with templated ASN.1

Change signatures of various functions to avoid using struct parse and
expose sbgp_as_{id,range}() and sbgp_addr{,_range}() so they can be used
from rsc.c. This is a mostly mechanical diff.

ok claudio job

2 years agoTrivial patch to put the roff(7) \g (interpolate format of register)
schwarze [Tue, 31 May 2022 18:08:02 +0000 (18:08 +0000)]
Trivial patch to put the roff(7) \g (interpolate format of register)
escape sequence into the correct parsing class, ESCAPE_EXPAND.
Expansion of \g is supposed to work exactly like the expansion
of the related escape sequence \n (interpolate register value),
but since we ignore the .af (assign output format) request,
we just interpolate an empty string to replace the \g sequence.

Surprising as it may seem, this actually makes a formatting difference
for deviate input like ".O\gNx" which used to raise bogus "escaped
character not allowed in a name" and "skipping unknown macro" errors
and printed nothing, whereas now it correctly prints "OpenBSD".

2 years agoAdd a missing space.
nicm [Tue, 31 May 2022 16:13:43 +0000 (16:13 +0000)]
Add a missing space.

2 years agossh-keygen: implement "verify-required" certificate option
naddy [Tue, 31 May 2022 14:05:12 +0000 (14:05 +0000)]
ssh-keygen: implement "verify-required" certificate option

This was already documented when support for user-verified FIDO
keys was added, but the ssh-keygen(1) code was missing.

ok djm@

2 years agoTrim menu item text correctly, GitHub issue 3197.
nicm [Tue, 31 May 2022 10:22:42 +0000 (10:22 +0000)]
Trim menu item text correctly, GitHub issue 3197.

2 years agoIntroduce a integration test for max-communities
claudio [Tue, 31 May 2022 09:50:26 +0000 (09:50 +0000)]
Introduce a integration test for max-communities

2 years agoExtend community unit test to also check community_count()
claudio [Tue, 31 May 2022 09:46:54 +0000 (09:46 +0000)]
Extend community unit test to also check community_count()

2 years agoImplement a max communities filter match
claudio [Tue, 31 May 2022 09:45:33 +0000 (09:45 +0000)]
Implement a max communities filter match

When max-communities X is set on a filterrule the filter will match when
more than X communities are present in the path. In other words
max-communities 0 means no communities are allowed and max-communities 3
limits it up to 3 communities.
There is max-communities, max-ext-communities and max-large-communities
for each of the 3 community attributes. These three max checks can be used
together.
OK tb@ job@

2 years agosync
deraadt [Mon, 30 May 2022 23:31:45 +0000 (23:31 +0000)]
sync

2 years agoDummy implementation of the roff(7) \V (interpolate environment variable)
schwarze [Mon, 30 May 2022 22:50:40 +0000 (22:50 +0000)]
Dummy implementation of the roff(7) \V (interpolate environment variable)
escape sequence.  This is needed to get \V into the correct parsing
class, ESCAPE_EXPAND.

It is intentional that mandoc(1) output is *not* influenced by environment
variables, so interpolate the name of the variable with some decorating
punctuation rather than interpolating its value.

2 years agoknf; fix whitespace in structs
dv [Mon, 30 May 2022 17:58:20 +0000 (17:58 +0000)]
knf; fix whitespace in structs

2 years agosfgpio(4)
kettenis [Mon, 30 May 2022 17:44:10 +0000 (17:44 +0000)]
sfgpio(4)

2 years agoAdd sfgpio(4), a driver for the GPIO controller found on the
kettenis [Mon, 30 May 2022 17:39:09 +0000 (17:39 +0000)]
Add sfgpio(4), a driver for the GPIO controller found on the
SiFive FU740 SoC.

ok jca@

2 years agogrep(1): print full context when using match count
dv [Mon, 30 May 2022 16:07:28 +0000 (16:07 +0000)]
grep(1): print full context when using match count

When using the match count flag (-m), grep was not printing the
context after the match if the -A or -C flags were provided.

This changes the logic to continue printing lines after hitting the
match count.

ok op@, millert@

2 years agoReplace selwakeup() with KNOTE() in pipe event activation.
visa [Mon, 30 May 2022 14:06:16 +0000 (14:06 +0000)]
Replace selwakeup() with KNOTE() in pipe event activation.

Recommit the reverted change selectively so that only pipes are
affected. Leave sockets untouched for now.

2 years agoRemove duplicates from completion list, GitHub issue 3178.
nicm [Mon, 30 May 2022 13:07:46 +0000 (13:07 +0000)]
Remove duplicates from completion list, GitHub issue 3178.

2 years agoAdd pane_start_path to match start_command.
nicm [Mon, 30 May 2022 13:07:06 +0000 (13:07 +0000)]
Add pane_start_path to match start_command.

2 years agoSet PWD so shells have a hint about the real path (this was done before
nicm [Mon, 30 May 2022 13:06:41 +0000 (13:06 +0000)]
Set PWD so shells have a hint about the real path (this was done before
but lost in a merge). GitHub issue 3186.

2 years agoFix property name from Sergei Dyshel, and a typo from imcusg at gmail
nicm [Mon, 30 May 2022 13:06:10 +0000 (13:06 +0000)]
Fix property name from Sergei Dyshel, and a typo from imcusg at gmail
dot com.

2 years agoCheck if args_strtonum argument is NULL or not a string, from Anindya
nicm [Mon, 30 May 2022 13:04:24 +0000 (13:04 +0000)]
Check if args_strtonum argument is NULL or not a string, from Anindya
Mukherjee.

2 years agoDo not allow pipe-pane on dead panes, from Anindya Mukherjee, GitHub
nicm [Mon, 30 May 2022 13:03:46 +0000 (13:03 +0000)]
Do not allow pipe-pane on dead panes, from Anindya Mukherjee, GitHub
issue 3174.

2 years agoIf a mouse position was above the maximum supported by the normal mouse
nicm [Mon, 30 May 2022 13:02:55 +0000 (13:02 +0000)]
If a mouse position was above the maximum supported by the normal mouse
protocol (223), tmux was allowing it to wrap around. However, since tmux
was not correctly handling this on input, other programs also do not
handle it correctly, and the alternative SGR mouse mode is now
widespread, this seems unnecessary, so remove this feature. Also define
some constants to make it clearer what the numbers mean. Mostly from
Leonid S Usov in GitHub issue 3165.

2 years agoAdd a way for lines added to copy mode to be passed through the parser
nicm [Mon, 30 May 2022 13:00:18 +0000 (13:00 +0000)]
Add a way for lines added to copy mode to be passed through the parser
to handle escape sequences and use it for run-shell, GitHub issue 3156.

2 years agoiTerm2 has OSC 7, from Gregory Anders.
nicm [Mon, 30 May 2022 12:57:31 +0000 (12:57 +0000)]
iTerm2 has OSC 7, from Gregory Anders.

2 years agoSpacing/style nits.
nicm [Mon, 30 May 2022 12:55:25 +0000 (12:55 +0000)]
Spacing/style nits.

2 years agoEmit window-layout-changed on swap-pane, from George Nachman.
nicm [Mon, 30 May 2022 12:54:09 +0000 (12:54 +0000)]
Emit window-layout-changed on swap-pane, from George Nachman.

2 years agoBetter error reporting when applying custom layouts.
nicm [Mon, 30 May 2022 12:52:02 +0000 (12:52 +0000)]
Better error reporting when applying custom layouts.

2 years agoDo not send focus sequences when focus is enabled or disabled by the
nicm [Mon, 30 May 2022 12:51:27 +0000 (12:51 +0000)]
Do not send focus sequences when focus is enabled or disabled by the
application if it is turned off. GitHub issue 3142.

2 years agoAdd an ACL list for users connecting to the tmux socket. Users may be
nicm [Mon, 30 May 2022 12:48:57 +0000 (12:48 +0000)]
Add an ACL list for users connecting to the tmux socket. Users may be
forbidden from attaching, forced to attach read-only, or allowed to
attach read-write. A new command, server-access, configures the list.
tmux gets the user using getpeereid(3) of the client socket. Users must
still configure file system permissions manually. From Dallas Lyons and
others.

2 years agomove bufsz description after appbufsz as per struct fields order
op [Mon, 30 May 2022 10:31:59 +0000 (10:31 +0000)]
move bufsz description after appbufsz as per struct fields order

ok ratchov@

2 years agomake a first pass at providing kstats from the hardware counters.
dlg [Mon, 30 May 2022 10:30:33 +0000 (10:30 +0000)]
make a first pass at providing kstats from the hardware counters.

mvneta counters are read to clear, so we accumulate them over time.
they are also mostly 32bit, except for 2 of them, so this handles
all the 32bit counters in a loop and deals with the 64bit ones as
exceptions.

i can see rx drops now, but not the rx rx counters yet. i'll figure
it out.

this is mostly inspired by em(4).

2 years agotell the compiler about the tx/rx desc alignment.
dlg [Mon, 30 May 2022 09:37:46 +0000 (09:37 +0000)]
tell the compiler about the tx/rx desc alignment.

this leads to better (and shorter) code.

ok patrick@