openbsd
2 years agoadd empty drm_of.h for 5.15.61 drm_bridge.c
jsg [Thu, 18 Aug 2022 00:55:32 +0000 (00:55 +0000)]
add empty drm_of.h for 5.15.61 drm_bridge.c

2 years agodrm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()
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

2 years agodrm/amdgpu: Remove one duplicated ef removal
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

2 years agodrm/amdgpu: fix check in fbdev init
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

2 years agodrm/amdgpu: Check BO's requested pinning domains against its preferred_domains
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

2 years agodrm/gem: Properly annotate WW context on drm_gem_lock_reservations() error
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

2 years agoImplement the SSL_CTRL_GET_SHARED_GROUP control
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

2 years agoMention support for booting off RAID 1C
kn [Wed, 17 Aug 2022 18:50:11 +0000 (18:50 +0000)]
Mention support for booting off RAID 1C

2 years agoRefactor tls1_get_supported_group()
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

2 years agoAdd SSL_get_shared_{curve,group}()
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

2 years agoMake tls1_get_{format,group_}list() take a const SSL
tb [Wed, 17 Aug 2022 18:42:13 +0000 (18:42 +0000)]
Make tls1_get_{format,group_}list() take a const SSL

ok jsing

2 years agoProvide ssl_security_shared_group()
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

2 years agoVisited this airport in 2019
job [Wed, 17 Aug 2022 18:12:16 +0000 (18:12 +0000)]
Visited this airport in 2019

2 years agoFix vldc(4) event filters
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@

2 years agoUse memset() instead of bzero().
claudio [Wed, 17 Aug 2022 15:16:12 +0000 (15:16 +0000)]
Use memset() instead of bzero().
OK tb@ deraadt@

2 years agoConvert bzero() to memset(), bcmp() to memcmp() and bcopy() to memcpy().
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@

2 years agoNo more disklabel -B.
miod [Wed, 17 Aug 2022 13:49:57 +0000 (13:49 +0000)]
No more disklabel -B.

2 years agoUpdate to tzdata2022cgtz from https://github.com/JodaOrg/global-tz
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.

2 years agoClarify and tidy up some comments
job [Wed, 17 Aug 2022 11:57:46 +0000 (11:57 +0000)]
Clarify and tidy up some comments

OK tb@

2 years agoJust use struct kif and kill struct kif_node. No need for this extra
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@

2 years agoJust 2 newline changes.
claudio [Wed, 17 Aug 2022 09:16:44 +0000 (09:16 +0000)]
Just 2 newline changes.

2 years agoAdd default case to switch to silence a warning seen with gcc.
claudio [Wed, 17 Aug 2022 09:15:06 +0000 (09:15 +0000)]
Add default case to switch to silence a warning seen with gcc.

2 years agoDeduplicate peer certificate chain processing code.
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@

2 years agoadd an extra flag to sk_probe() to indicate whether we're
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

2 years agoAdjust desired output after the bugfix man.c rev. 1.137.
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.

2 years agoRestore the traditional behaviour of the man(7) single-font
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.

2 years agouse .Cm for "sign"; from josiah frentsos
jmc [Tue, 16 Aug 2022 20:24:08 +0000 (20:24 +0000)]
use .Cm for "sign"; from josiah frentsos

2 years agoNew tests of tabs in fill mode, in particular
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.

2 years agoAdjust the desired output after the improvements in term.c rev. 1.150.
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.

2 years agoWhen starting a new input line, even when continuing the same output
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.

2 years agoEven though the constant ASCII_ESC is only used in the roff pre-parser roff.c,
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.

2 years agoRemove -c compat
kn [Tue, 16 Aug 2022 16:18:16 +0000 (16:18 +0000)]
Remove -c compat

Ought to go in 2020 already.

OK deraadt

2 years ago-v prints to standard error not output
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.

2 years ago-v option should only act based upon syscall success. test case is
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

2 years agoRemove kqueue-related ktrace points from poll(2) and select(2)
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@

2 years agoRemove obsolete kern.nselcoll sysctl.
visa [Tue, 16 Aug 2022 13:29:52 +0000 (13:29 +0000)]
Remove obsolete kern.nselcoll sysctl.

OK millert@ deraadt@

2 years agoregen
jsg [Tue, 16 Aug 2022 09:29:21 +0000 (09:29 +0000)]
regen

2 years agoadd id for Intel Optane SSD 9 Series (900P/905P)
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@

2 years agoDo not send kroutes from the RDE to the FIB with the true_nexthop but
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@

2 years agoSome more tests of no-fill mode similar to mdoc/Bd/blank.in
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.

2 years agoSimplify handling of no-fill mode in man(7) by inspecting NODE_NOFILL
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.

2 years agooops, once again, i failed to correctly sync some dates in the footer
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

2 years agoDistinguish between escape sequences that produce no output
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.

2 years agosync
deraadt [Mon, 15 Aug 2022 17:58:49 +0000 (17:58 +0000)]
sync

2 years agoAdd initial piece for softraid(4) support on arm64
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).

2 years agoRun IPv6 hop-by-hop options processing in parallel. The ip6_hbhchcheck()
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@

2 years agoremove FSPACE macros, unused after uvm_map_sel_limits() removal
jsg [Mon, 15 Aug 2022 15:53:45 +0000 (15:53 +0000)]
remove FSPACE macros, unused after uvm_map_sel_limits() removal

2 years agoIntroduce tcp_sogetpcb() to assign `inp' and `tp' from passed socket.
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@

2 years agounifdef KDB
jsg [Mon, 15 Aug 2022 13:33:22 +0000 (13:33 +0000)]
unifdef KDB

2 years agoFix a doc comment to match upstream
tb [Mon, 15 Aug 2022 13:29:05 +0000 (13:29 +0000)]
Fix a doc comment to match upstream

2 years agoAdd softraid(4) RAID 1C boot support
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.

2 years agoIn GNU, Heirloom, and Plan 9 roff, tab positions apply to *input* lines,
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.

2 years agoAdjust whitespace (tabs vs spaces) on one line to reduce diff with upstream
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

2 years agoNeither clt_descreq nor clt_descresp in struct client need to be void *.
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@

2 years agoAdd missing RCS tag and zap a trailing space
tb [Mon, 15 Aug 2022 11:52:37 +0000 (11:52 +0000)]
Add missing RCS tag and zap a trailing space

2 years agoRevert previous. It was not ok'ed by dlg@.
mvs [Mon, 15 Aug 2022 11:38:35 +0000 (11:38 +0000)]
Revert previous. It was not ok'ed by dlg@.

2 years agoInitialize readbytes in BIO_gets()
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

2 years agoAvoid shadowing the cbs function parameter in tlsext_alpn_server_parse()
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

2 years agoRemove redeclaration of ret
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

2 years agoFor FCGI_END_REQUEST reset the clt struct similar to what is done in the
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@

2 years agoIn GNU, Heirloom, and Plan 9 roff, literal tab characters are
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.

2 years agoplug some memory leaks in server_file_index when failures occur
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@

2 years agoplug a fd leak in read_errdoc if fstat fails or if the file is empty
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@

2 years agoIntroduce 'pr_usrreqs' structure and move existing user-protocol
mvs [Mon, 15 Aug 2022 09:11:38 +0000 (09:11 +0000)]
Introduce 'pr_usrreqs' structure and move existing user-protocol
handlers into it. We want to split existing (*pr_usrreq)() to multiple
short handlers for each PRU_ request as it was already done for
PRU_ATTACH and PRU_DETACH. This is the preparation step, (*pr_usrreq)()
split will be done with the following diffs.

Based on reverted diff from guenther@.

ok bluhm@

2 years agoStop doing lockless `t_flags' check within task_add(9) and task_del(9).
mvs [Mon, 15 Aug 2022 09:10:36 +0000 (09:10 +0000)]
Stop doing lockless `t_flags' check within task_add(9) and task_del(9).
This doesn't work on MP systems. We do locked `t_flags' check just after
lockless check, so just remove it.

ok dlg@

2 years agoNotify when a paste buffer is deleted, GitHub issue 3302 from George
nicm [Mon, 15 Aug 2022 09:10:34 +0000 (09:10 +0000)]
Notify when a paste buffer is deleted, GitHub issue 3302 from George
Nachman.

2 years agoUse TCP_INFO instead of kvm magic to extract information about the tcp streams.
claudio [Mon, 15 Aug 2022 09:06:54 +0000 (09:06 +0000)]
Use TCP_INFO instead of kvm magic to extract information about the tcp streams.
Variable names listed by -l change and there is no more need to change
kern.allowkmem. To get all possible values tcpbench still needs to be run
as root.
OK bluhm@ djm@

2 years agoAdd a Nobr terminfo capability to tell tmux the terminal does not use
nicm [Mon, 15 Aug 2022 08:54:03 +0000 (08:54 +0000)]
Add a Nobr terminfo capability to tell tmux the terminal does not use
bright colours for bold (makes a difference to how tmux applies palette
differences). From Damien Tardy-Panis in GitHub issue 3301.

2 years agoAdd some const, from Markus F X J Oberhumer.
nicm [Mon, 15 Aug 2022 08:41:13 +0000 (08:41 +0000)]
Add some const, from Markus F X J Oberhumer.

2 years agoDon't stop at first match when updating environment.
nicm [Mon, 15 Aug 2022 08:37:03 +0000 (08:37 +0000)]
Don't stop at first match when updating environment.

2 years agodrop detection code for 386sx/386dx CPUs
daniel [Mon, 15 Aug 2022 04:17:50 +0000 (04:17 +0000)]
drop detection code for 386sx/386dx CPUs

OpenBSD/i386 doesn't actually support running on 386sx or 386dx CPUs
so we don't need to test whether we're running on one of these CPUs
anymore.

The 486 (which was launched in 1989) added a few new features over
the 386:
- an alignment check flag in EFLAGS
- 3 new userland instructions: bswap / cmpxchg / xadd
- 3 new kernel mode instructions: invd / wbinvd / invlpg
- new bits in CR0 (386 CPUs did not support ring0 write protection)
- new bits in CR3

In this diff, we remove the code that checks for the alignment check
flag as we've only supported Pentium (or newer) CPUs for some time.

The rest of the diff is about updating comments related to pre-486
CPUs. 2 files under arch/amd64 are updated to keep them in sync
with the arch/i386 updates.

ok mlarkin@, jsg@; tweak from miod@

2 years agoremove unused uvm_aiobuf_pool
jsg [Mon, 15 Aug 2022 03:21:04 +0000 (03:21 +0000)]
remove unused uvm_aiobuf_pool

2 years agoremove unused uvm_map_sel_limits()
jsg [Mon, 15 Aug 2022 03:12:12 +0000 (03:12 +0000)]
remove unused uvm_map_sel_limits()
ok miod@ millert@

2 years agoremove tulip_mbuf_compress() unused since if_de.c 1.127
jsg [Mon, 15 Aug 2022 02:07:11 +0000 (02:07 +0000)]
remove tulip_mbuf_compress() unused since if_de.c 1.127
ok miod@

2 years agoremove unused smc91cxx_activate()
jsg [Mon, 15 Aug 2022 01:59:00 +0000 (01:59 +0000)]
remove unused smc91cxx_activate()
ok miod@

2 years agoremove msdosfs findwin95()
jsg [Mon, 15 Aug 2022 01:47:09 +0000 (01:47 +0000)]
remove msdosfs findwin95()

unused since msdosfs_vfsops.c 1.95
ok miod@ millert@

2 years agoremove unused uvideo_enable()/uvideo_disable()
jsg [Mon, 15 Aug 2022 01:35:07 +0000 (01:35 +0000)]
remove unused uvideo_enable()/uvideo_disable()
ok mglocker@ miod@

2 years agoUnbreak, don't assume we always hold the NET_LOCK
jca [Sun, 14 Aug 2022 21:10:08 +0000 (21:10 +0000)]
Unbreak, don't assume we always hold the NET_LOCK

After net/if.c:rev 1.661 ifioctl() doesn't take the net lock any more
around SIOCGIFMEDIA and SIOCSIFMEDIA, which broke cad_ioctl().
The same was already true about SIOCGIFSFFPAGE.  Only release/reacquire
the net lock if warranted.

Input mvs@, ok miod@ mvs@ bluhm@

2 years agoUse size_t for the length parameters, not off_t.
millert [Sun, 14 Aug 2022 15:01:18 +0000 (15:01 +0000)]
Use size_t for the length parameters, not off_t.
Now that zlib uses unsigned long for its totals there is no reason
to use off_t in ctfdump.  This is similar to the changes in db_ctf.c.
OK tb@

2 years agodb_ctf_decompress: use size_t not off_t for length parameter
millert [Sun, 14 Aug 2022 14:57:38 +0000 (14:57 +0000)]
db_ctf_decompress: use size_t not off_t for length parameter
The only caller of db_ctf_decompress() passes a size_t for the length.
This eliminates sign comparison warnings without using casts.
OK jca@ tb@

2 years agoUse size_t, not off_t, for length parameters.
millert [Sun, 14 Aug 2022 14:54:13 +0000 (14:54 +0000)]
Use size_t, not off_t, for length parameters.
This matches how the functions are called and eliminates a few casts.
OK tb@

2 years agoremove unneeded includes in sys/kern
jsg [Sun, 14 Aug 2022 01:58:27 +0000 (01:58 +0000)]
remove unneeded includes in sys/kern
ok mpi@ miod@

2 years agoIntroduce the pru_*() wrappers for corresponding (*pr_usrreq)() calls.
mvs [Sat, 13 Aug 2022 21:01:46 +0000 (21:01 +0000)]
Introduce the pru_*() wrappers for corresponding (*pr_usrreq)() calls.

This is helpful for the following (*pr_usrreq)() split to multiple
handlers. But right now this makes code more readable.

Also add '#ifndef _SYS_SOCKETVAR_H_' to sys/socketvar.h. This prevents the
collisions when both sys/protosw.h and sys/socketvar.h are included
together. Both 'socket' and 'protosw' structures are required to be
defined before pru_*() wrappers, so we need to include sys/socketvar.h to
sys/protosw.h.

ok bluhm@

2 years agoRemove needless include pledge.h accidently added in previous commit.
bluhm [Sat, 13 Aug 2022 19:13:45 +0000 (19:13 +0000)]
Remove needless include pledge.h accidently added in previous commit.
OK claudio@

2 years agoblist: fix a possible blist corruption with blist_alloc() due to unsigned
semarie [Sat, 13 Aug 2022 16:02:15 +0000 (16:02 +0000)]
blist: fix a possible blist corruption with blist_alloc() due to unsigned
swblk_t on OpenBSD.

reorder if condition in blst_meta_alloc(), in order to check if the node is
'Terminator' node first (and leave the loop).

DragonFlyBSD is unaffected by it as swblk_t is signed (and the first condition
isn't taken).

add a regress test for it.

while here, more the KASSERT() to KDASSERT(). it is useful but only with DEBUG.

ok miod@ todd@

2 years agoCorrect rx data rate for rtl8192eu
kevlo [Sat, 13 Aug 2022 14:16:59 +0000 (14:16 +0000)]
Correct rx data rate for rtl8192eu

ok stsp@, jmatthew@

2 years agoclarify the boot text;
jmc [Sat, 13 Aug 2022 11:13:17 +0000 (11:13 +0000)]
clarify the boot text;
discussed with and ok stsp

2 years agoThe portgen Python modue has been rotting and doesn't generate a usable
kmos [Sat, 13 Aug 2022 07:14:07 +0000 (07:14 +0000)]
The portgen Python modue has been rotting and doesn't generate a usable
port. Disable it and pull mention of it from the portgen(1) man page.

Don't delete the modules yet, in case someone wants to whip it back into
shape.

ok sthen

2 years agoavoid uninitialised var when boot_unit has an unexpected value
jsg [Sat, 13 Aug 2022 06:44:48 +0000 (06:44 +0000)]
avoid uninitialised var when boot_unit has an unexpected value
tested by and ok aoyama@

2 years agosync
deraadt [Sat, 13 Aug 2022 04:35:12 +0000 (04:35 +0000)]
sync

2 years agoCrank amd64 boot loader version numbers for softraid(4) RAID 1C boot support.
stsp [Fri, 12 Aug 2022 20:18:58 +0000 (20:18 +0000)]
Crank amd64 boot loader version numbers for softraid(4) RAID 1C boot support.

2 years agoadd support for booting from RAID 1C softraid(4) volumes on amd64
stsp [Fri, 12 Aug 2022 20:17:46 +0000 (20:17 +0000)]
add support for booting from RAID 1C softraid(4) volumes on amd64

Only boot-loader changes are needed. Both installboot(8) and
the kernel already do what is required to make this work.

ok kn@

Tested:
biosboot on vmm: kn, stsp
biosboot and efiboot on server hardware: stsp

2 years agoRevert to pre-r1.249 more laissez-faire checks for valid MBR
krw [Fri, 12 Aug 2022 20:05:49 +0000 (20:05 +0000)]
Revert to pre-r1.249 more laissez-faire checks for valid MBR
partitions.

miod@ (re)discovered an off-by-one in some device size
calculations. Whether the ancient misbehaviour of some devices to
confuse number of sectors with highest valid sector address or
something newer.

Should fix miod@'s octeon boot disk.

2 years agoMake sure we don't pass uninitialized siginfo values to trapsignal(); from
miod [Fri, 12 Aug 2022 17:19:52 +0000 (17:19 +0000)]
Make sure we don't pass uninitialized siginfo values to trapsignal(); from
clang via jsg@, ok jsg@

2 years agoRemove differences between ip_fragment() and ip6_fragment(). They
bluhm [Fri, 12 Aug 2022 17:04:16 +0000 (17:04 +0000)]
Remove differences between ip_fragment() and ip6_fragment().  They
do nearly the same thing, so they should look similar.
OK sashan@

2 years agoUpdate to 2022bgtz from https://github.com/JodaOrg/global-tz
millert [Fri, 12 Aug 2022 16:50:57 +0000 (16:50 +0000)]
Update to 2022bgtz from https://github.com/JodaOrg/global-tz
Major changes:
 o Chile's DST is delayed by a week in September 2022.
 o Iran no longer observes DST after 2022.
 o Rename Europe/Kiev to Europe/Kyiv.

2 years agoFix non working continue in do while(0) loop.
bluhm [Fri, 12 Aug 2022 16:42:54 +0000 (16:42 +0000)]
Fix non working continue in do while(0) loop.
OK mvs@ jca@
CID 1519492

2 years agoRemove unused fields from 'pflow_softc' structure.
mvs [Fri, 12 Aug 2022 16:38:50 +0000 (16:38 +0000)]
Remove unused fields from 'pflow_softc' structure.

ok bluhm@

2 years agoFix race between pflow_output_process() and pflow_clone_destroy().
mvs [Fri, 12 Aug 2022 16:38:09 +0000 (16:38 +0000)]
Fix race between pflow_output_process() and pflow_clone_destroy().

Unlink pflow(4) interface from `pflowif_list' before start destruction to
prevent pflow_output_process() being rescheduled. Also wait until running
pflow_output_process() task finished.

Problem reported and fix tested by Hrvoje Popovski.

ok bluhm@

2 years agoFix upper bound in a for loop (no functional change).
tb [Fri, 12 Aug 2022 16:13:40 +0000 (16:13 +0000)]
Fix upper bound in a for loop (no functional change).