openbsd
3 years agomanually tag the macro names that have false positives
schwarze [Thu, 29 Jul 2021 17:31:25 +0000 (17:31 +0000)]
manually tag the macro names that have false positives

3 years agoUpdate the list of firmware files used by iwx(4).
stsp [Thu, 29 Jul 2021 17:06:21 +0000 (17:06 +0000)]
Update the list of firmware files used by iwx(4).

3 years agoImprove the description of .Fl in multiple respects and in paricular
schwarze [Thu, 29 Jul 2021 16:23:43 +0000 (16:23 +0000)]
Improve the description of .Fl in multiple respects and in paricular
improve the .Fl examples in multiple respects, including better
demonstrating long options.
Prompted by a question from espie@.
Feedback and OK jmc@.

3 years agoTreat doas with arguments as a valid SUDO variable. Allows one to
anton [Thu, 29 Jul 2021 15:34:09 +0000 (15:34 +0000)]
Treat doas with arguments as a valid SUDO variable. Allows one to
specify SUDO="doas -n" which I do while running make regress.

ok dtucker@

3 years agoEnsure that the kill signal undergoing testing is not ignored.
anton [Thu, 29 Jul 2021 15:33:17 +0000 (15:33 +0000)]
Ensure that the kill signal undergoing testing is not ignored.

ok bluhm@

3 years agoFix device class.
visa [Thu, 29 Jul 2021 14:11:53 +0000 (14:11 +0000)]
Fix device class.

3 years agoFix a documentation bug i introduced that tb@ pointed out:
schwarze [Thu, 29 Jul 2021 12:39:47 +0000 (12:39 +0000)]
Fix a documentation bug i introduced that tb@ pointed out:
X509_policy_check(3) never returns 2.
If validation succeeds, it always returns 1.

3 years agoSwitch iwx(4) to -63 firmware images as shipped in iwx-firmware-20210512.
stsp [Thu, 29 Jul 2021 12:13:58 +0000 (12:13 +0000)]
Switch iwx(4) to -63 firmware images as shipped in iwx-firmware-20210512.

These images contain fixes which address fragattacks vulnerabilities:
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00473.html

Running fw_update(1) may be required before rebooting into a new kernel.
sysupgrade(8) will take care of this.

When reporting issues, please enable 'ifconfig iwx0 debug', reproduce the
error once more, and include the full dmesg in your bug report.

Tested:
ax200: stsp, kevlo, hrvoje, jmc, Mark Patruck, Ashton Fagg
ax201: kettenis, Fredrik Engberg, Eric Auge

ok kevlo@

3 years agoImplement support for the BAR_FRAME_RELEASE iwx(4) firmware notification.
stsp [Thu, 29 Jul 2021 12:01:45 +0000 (12:01 +0000)]
Implement support for the BAR_FRAME_RELEASE iwx(4) firmware notification.

New firmware will generate this notification when a block ack request is
received. Older firmware passed the block ack request frame to the driver.

ok kevlo@

3 years agoGet Tx queues working with new iwx(4) firmware.
stsp [Thu, 29 Jul 2021 12:01:04 +0000 (12:01 +0000)]
Get Tx queues working with new iwx(4) firmware.

ADD_STA command version >= 12 implies that firmware uses an internal AUX
station for scanning. We do not configure an AUX Tx queue in this case
and data queue indices assigned by firmware shift upwards accordingly.

ok kevlo@

3 years agoSupport the new iwx(4) firmware TLC_MNG_CONFIG command.
stsp [Thu, 29 Jul 2021 12:00:30 +0000 (12:00 +0000)]
Support the new iwx(4) firmware TLC_MNG_CONFIG command.

This command was expanded by a 4 byte max_tx_op field. As far as I can tell
the Linux driver makes no use of this field, so just initialize it to zero.
New firmware panics when we try to initialize Tx rate scaling otherwise.

ok kevlo@

3 years agoSupport the new iwx(4) firmware session protection command.
stsp [Thu, 29 Jul 2021 11:58:35 +0000 (11:58 +0000)]
Support the new iwx(4) firmware session protection command.

Required for having associations succeed with new firmware.

ok kevlo@

3 years agoAdd support for iwx(4) umac scan command version 14.
stsp [Thu, 29 Jul 2021 11:57:59 +0000 (11:57 +0000)]
Add support for iwx(4) umac scan command version 14.

ok kevlo@

3 years agoAdd support for iwx(4) "reduced" scan config command required by new firmware.
stsp [Thu, 29 Jul 2021 11:57:33 +0000 (11:57 +0000)]
Add support for iwx(4) "reduced" scan config command required by new firmware.

ok kevlo@

3 years agoHandle iwx(4) PHY context command version 3.
stsp [Thu, 29 Jul 2021 11:56:53 +0000 (11:56 +0000)]
Handle iwx(4) PHY context command version 3.

ok kevlo@

3 years agoNew iwx(4) firmware doesn't require an AUX station to be added.
stsp [Thu, 29 Jul 2021 11:56:21 +0000 (11:56 +0000)]
New iwx(4) firmware doesn't require an AUX station to be added.

ADD_STA command version >= 12 implies that firmware uses an internal
AUX station for scanning, and firmware panics if we try to add one.

ok kevlo@

3 years agoRemove support for the narrow command header on the iwx(4) command queue.
stsp [Thu, 29 Jul 2021 11:53:46 +0000 (11:53 +0000)]
Remove support for the narrow command header on the iwx(4) command queue.

This is related to the previous commit which fixed "BAD COMMAND" firmware
errors. We can no longer use old-style "narrow" commands on the command
queue with new firmware, and our current -48 firmware images don't seem
to care either way. We can simplify this code and align it with iwlwifi.

ok kevlo@

3 years agoFix "BAD COMMAND" errors with new iwx(4) firmware.
stsp [Thu, 29 Jul 2021 11:52:58 +0000 (11:52 +0000)]
Fix "BAD COMMAND" errors with new iwx(4) firmware.

Firmware API versions >= 50 reject old-style commands in group 0 with a
"BAD_COMMAND" firmware error. We must pretend that such commands were in
the LONG_GROUP instead in order for firmware to accept them.

ok kevlo@

3 years agoHandle iwx(4) firmware alive response version 5.
stsp [Thu, 29 Jul 2021 11:52:11 +0000 (11:52 +0000)]
Handle iwx(4) firmware alive response version 5.

ok kevlo@

3 years agoRecognize "phy integration" and "num stations" TLVs found in new iwx(4)
stsp [Thu, 29 Jul 2021 11:51:39 +0000 (11:51 +0000)]
Recognize "phy integration" and "num stations" TLVs found in new iwx(4)
firmware images. For now, we can simply ignore them while loading firmware.

ok kevlo@

3 years agoIgnore debug sections present in newer iwx(4) firmware images.
stsp [Thu, 29 Jul 2021 11:50:57 +0000 (11:50 +0000)]
Ignore debug sections present in newer iwx(4) firmware images.

ok kevlo@

3 years agoIncrease fixed limits for the number of iwx(4) command versions, channels,
stsp [Thu, 29 Jul 2021 11:50:37 +0000 (11:50 +0000)]
Increase fixed limits for the number of iwx(4) command versions, channels,
and microcode sections. Required for loading new firmware images.

ok kevlo@

3 years agoDeclare additional iwx(4) firmware capability and api support flags.
stsp [Thu, 29 Jul 2021 11:49:53 +0000 (11:49 +0000)]
Declare additional iwx(4) firmware capability and api support flags.

ok kevlo@

3 years agoDocument X509_STORE_set_verify_func(3), mostly using text from the
schwarze [Thu, 29 Jul 2021 10:13:45 +0000 (10:13 +0000)]
Document X509_STORE_set_verify_func(3), mostly using text from the
OpenSSL 1.1.1 branch, which is still under a free license, tweaked
by me.

While here, garbage collect the weird BUGS section.

3 years agoChange driver class from DV_DULL to DV_IFNET, so that it can be recognized
patrick [Thu, 29 Jul 2021 09:19:42 +0000 (09:19 +0000)]
Change driver class from DV_DULL to DV_IFNET, so that it can be recognized
as boot interface when doing netboot.  This makes auto install/upgrade work.

ok kettenis@ visa@

3 years agodocument X509_STORE_CTX_get0_parent_ctx(3)
schwarze [Thu, 29 Jul 2021 09:14:23 +0000 (09:14 +0000)]
document X509_STORE_CTX_get0_parent_ctx(3)

3 years agodocument X509_STORE_CTX_set_app_data(3) and X509_STORE_CTX_get_app_data(3)
schwarze [Thu, 29 Jul 2021 08:32:13 +0000 (08:32 +0000)]
document X509_STORE_CTX_set_app_data(3) and X509_STORE_CTX_get_app_data(3)

3 years agodrm/i915/gvt: Clear d3_entered on elsp cmd submission.
jsg [Thu, 29 Jul 2021 03:15:56 +0000 (03:15 +0000)]
drm/i915/gvt: Clear d3_entered on elsp cmd submission.

From Colin Xu
1df4fe5a8871f49d34d681ff5b7f93a84d50af4b in linux 5.10.y/5.10.54
c90b4503ccf42d9d367e843c223df44aa550e82a in mainline linux

3 years agodrm/amdgpu: update golden setting for sienna_cichlid
jsg [Thu, 29 Jul 2021 03:12:14 +0000 (03:12 +0000)]
drm/amdgpu: update golden setting for sienna_cichlid

From Likun Gao
fc31b5be1383e31ca046fdd6e11e0a9a0b3a01d5 in linux 5.10.y/5.10.54
3e94b5965e624f7e6d8dd18eb8f3bf2bb99ba30d in mainline linux

3 years agodrm: Return -ENOTTY for non-drm ioctls
jsg [Thu, 29 Jul 2021 03:09:17 +0000 (03:09 +0000)]
drm: Return -ENOTTY for non-drm ioctls

From Charles Baylis
69a603aa170e1c145b93d5d7efcca83a8b1268fe in linux 5.10.y/5.10.54
3abab27c322e0f2acf981595aa8040c9164dc9fb in mainline linux

3 years agoA slightly less precise match on the ifconfig output lines works
deraadt [Wed, 28 Jul 2021 20:48:36 +0000 (20:48 +0000)]
A slightly less precise match on the ifconfig output lines works
better for rdomain or metric tuned interfaces
from leon fischer

3 years agoadd format attribute to vaararg functions.
benno [Wed, 28 Jul 2021 19:39:50 +0000 (19:39 +0000)]
add format attribute to vaararg functions.
millert@ thinks its useful.

3 years agoreference veb(4) bridges in tpmr(4). While there improve the description.
benno [Wed, 28 Jul 2021 19:19:38 +0000 (19:19 +0000)]
reference veb(4) bridges in tpmr(4). While there improve the description.
With and ok jmc@

3 years agocleanup some md vs mi differences that accumulated
deraadt [Wed, 28 Jul 2021 17:39:22 +0000 (17:39 +0000)]
cleanup some md vs mi differences that accumulated

3 years agobump rpki-client version to 7.2
benno [Wed, 28 Jul 2021 15:45:34 +0000 (15:45 +0000)]
bump rpki-client version to 7.2

3 years agodocument X509_STORE_CTX_get0_policy_tree(3)
schwarze [Wed, 28 Jul 2021 14:48:09 +0000 (14:48 +0000)]
document X509_STORE_CTX_get0_policy_tree(3)
and X509_STORE_CTX_get_explicit_policy(3)

3 years agodocument X509_policy_tree_free(3)
schwarze [Wed, 28 Jul 2021 14:00:33 +0000 (14:00 +0000)]
document X509_policy_tree_free(3)

3 years agoconsisely explain the meaning of return values rather than merely
schwarze [Wed, 28 Jul 2021 13:47:21 +0000 (13:47 +0000)]
consisely explain the meaning of return values rather than merely
refering to child object names defined in the standard

3 years agoThe clocks for the Rockchip Ethernet controller need to be enabled much
patrick [Wed, 28 Jul 2021 13:43:11 +0000 (13:43 +0000)]
The clocks for the Rockchip Ethernet controller need to be enabled much
earlier.  So far we haven't noticed this, as we had the assumption that
all clocks are enabled anyway.  On the NanoPi R4S this does not seem to
be the case, so we need to bring the clock enable code closer to the
other bringup code.

ok kettenis@

3 years agoOn some RK3399 boards the firmware disables some of the clocks. Allow
patrick [Wed, 28 Jul 2021 13:39:39 +0000 (13:39 +0000)]
On some RK3399 boards the firmware disables some of the clocks.  Allow
some of those clocks to be enabled.

Noticed on the NanoPi R4S, where the Ethernet controller clocks were
surprisingly turned off.

ok kettenis@

3 years agoExplain the meaning of the policy_oids input argument, correct the
schwarze [Wed, 28 Jul 2021 13:39:20 +0000 (13:39 +0000)]
Explain the meaning of the policy_oids input argument, correct the
description of the *pexplicit_policy output argument and make it
less technical, and drop the mention of the expected_policy_set
because the library provides no accessor function for it.

3 years agoSwitch to an MI implementation of kmap_atomic() and implement
kettenis [Wed, 28 Jul 2021 13:28:04 +0000 (13:28 +0000)]
Switch to an MI implementation of kmap_atomic() and implement
kmap_atomic_prot().  Use this to unstub ttm_copy_io_ttm_page()
and ttm_copy_ttm_io_page().  This fixes suspend/resume of machines
with certain radeondrm(4) hardware.

Based on a diff from jsg@.  Tested by Edd Barrett and Alf Schlichting.
ok jsg@

3 years agoAdd RK3399 PCIe PHY reference clocks.
patrick [Wed, 28 Jul 2021 13:10:28 +0000 (13:10 +0000)]
Add RK3399 PCIe PHY reference clocks.

ok kettenis@

3 years agoAdd RK3399 Type-C PHY clocks.
patrick [Wed, 28 Jul 2021 13:04:46 +0000 (13:04 +0000)]
Add RK3399 Type-C PHY clocks.

ok kettenis@

3 years agoAdd more checks for ROA maxLength values
job [Wed, 28 Jul 2021 12:32:14 +0000 (12:32 +0000)]
Add more checks for ROA maxLength values

* maxLength may not be zero or negative
* maxLength can't be lower than the prefixlength of ip_addr
* maxLength can't be higher than the maximum prefix length

OK claudio@

3 years agoUse a more descriptive name for the raw sensor which reflects the number
anton [Wed, 28 Jul 2021 09:56:54 +0000 (09:56 +0000)]
Use a more descriptive name for the raw sensor which reflects the number
of battery levels the device can report.

3 years agoDelay installation of sensors until a device with battery support is
anton [Wed, 28 Jul 2021 09:55:58 +0000 (09:55 +0000)]
Delay installation of sensors until a device with battery support is
connected. Allows sensorsd(8) to pick up hotplugged devices.

Thanks to Laurence Tratt <laurie at tratt dot net> for the report.

3 years agofix broken small build; ok florian@
anton [Wed, 28 Jul 2021 07:57:10 +0000 (07:57 +0000)]
fix broken small build; ok florian@

3 years agoexplicitely -> explicitly;
jmc [Wed, 28 Jul 2021 07:37:04 +0000 (07:37 +0000)]
explicitely -> explicitly;

3 years agoFix previous: In one spot I incorrectly used Pos (unsigned short) where
tb [Wed, 28 Jul 2021 07:36:06 +0000 (07:36 +0000)]
Fix previous: In one spot I incorrectly used Pos (unsigned short) where
I should have used Byte (unsigned char) which led to passing twice the
correct size to free.

Found & tested by bluhm with the sys/netinet/ipsec tests on i386.

3 years agoMake window-linked and window-unlinked window options, GitHub issue
nicm [Wed, 28 Jul 2021 07:06:54 +0000 (07:06 +0000)]
Make window-linked and window-unlinked window options, GitHub issue
2790.

3 years agono need to talk about version 2 with the -Q option, so rewrite the
jmc [Wed, 28 Jul 2021 05:57:42 +0000 (05:57 +0000)]
no need to talk about version 2 with the -Q option, so rewrite the
text to read better;

issue reported by debian at helgefjell de
ok djm dtucker

3 years agoRemove outdated information
job [Wed, 28 Jul 2021 00:46:05 +0000 (00:46 +0000)]
Remove outdated information

3 years agosync
deraadt [Tue, 27 Jul 2021 23:00:43 +0000 (23:00 +0000)]
sync

3 years agoHaving 'taken charge' of the interface by eliminating other
krw [Tue, 27 Jul 2021 18:35:30 +0000 (18:35 +0000)]
Having 'taken charge' of the interface by eliminating other
dhclient instances for the interface, check if the IPv4
AUTOCONF flag is set. If it is, go quietly into that good
night and let dhcpleased do its thing, comforted by the fact
that dhcpleased knows that a new lease has been requested.

requested, tested & ok florian@

3 years agoPOSIX mandates that -F str be treated the same as -v FS=str.
millert [Tue, 27 Jul 2021 18:28:19 +0000 (18:28 +0000)]
POSIX mandates that -F str be treated the same as -v FS=str.
For a null string, this was not the case.  Since awk(1) documents
that a null string for FS has a specific behavior, make -F '' behave
consistently with -v FS="".  https://github.com/onetrueawk/awk/pull/128

3 years agoPlease muscle memory when dhclient $if is run and request a new lease.
florian [Tue, 27 Jul 2021 18:17:37 +0000 (18:17 +0000)]
Please muscle memory when dhclient $if is run and request a new lease.
An upcoming diff for dhclient(8) will make it exit when it discovers
an autoconf flag at startup.
"Quite a pleasing diff." deraadt@

3 years agoRevert "Use per-CPU counters for tunnel descriptor block" diff.
mvs [Tue, 27 Jul 2021 17:13:03 +0000 (17:13 +0000)]
Revert "Use per-CPU counters for tunnel descriptor block" diff.

Panic reported by Hrvoje Popovski.

3 years agoImprove markup.
florian [Tue, 27 Jul 2021 14:38:36 +0000 (14:38 +0000)]
Improve markup.
Suggested by schwarze

3 years agoword fix; reported by debian at helgefjell de
jmc [Tue, 27 Jul 2021 14:28:46 +0000 (14:28 +0000)]
word fix; reported by debian at helgefjell de

3 years agostandardise the grammar in the options list;
jmc [Tue, 27 Jul 2021 14:14:25 +0000 (14:14 +0000)]
standardise the grammar in the options list;
issue reported by debian at helgefjell de

ok dtucker djm

3 years agozap trailing comma in SEE ALSO;
jmc [Tue, 27 Jul 2021 14:12:41 +0000 (14:12 +0000)]
zap trailing comma in SEE ALSO;

3 years agoImplemented from the Linux driver:
mglocker [Tue, 27 Jul 2021 13:36:59 +0000 (13:36 +0000)]
Implemented from the Linux driver:

* Introduce split transaction order queues.
* Improve the NAK interrupt handler routine.
* Mostly move from list_move() to list_move_tail().

Those changes fix an attachment problem seen for certain devices which
are issuing NAK interrupts during split transactions, which don't get
handled correctly by the driver today.  This could result in unexpected
channel halting, printing "ChHltd set, but reason is unknown", which
finally leaves the device back on a disabled USB port.

ok kettenis@

3 years ago'{' and '}' are fixed parts of the 'interface' decleration', not optional.
deraadt [Tue, 27 Jul 2021 13:28:25 +0000 (13:28 +0000)]
'{' and '}' are fixed parts of the 'interface' decleration', not optional.
concern raised by kn.
ok florian

3 years agonew manual page X509_policy_check(3)
schwarze [Tue, 27 Jul 2021 13:27:46 +0000 (13:27 +0000)]
new manual page X509_policy_check(3)

3 years agomore readable documentation
espie [Tue, 27 Jul 2021 13:21:50 +0000 (13:21 +0000)]
more readable documentation
ok kmos@ sthen@ kn@

3 years agoIntroduce mutex(9) to protect pipex(4) session content.
mvs [Tue, 27 Jul 2021 09:29:09 +0000 (09:29 +0000)]
Introduce mutex(9) to protect pipex(4) session content.

With bluhm@'s diff for parallel forwarding pipex(4) could be accessed in
parallel through (*ifp->if_input)() -> ether_input() ->
pipex_pppoe_input(). PPPOE pipex(4) sessions are mostly immutable except
MPPE crypt.

The new per-session `pxs_mtx' mutex(9) used to protect session's
`ccp-id' which is incremented each time we send CCP reset-request.

The new `pxm_mtx' mutex(9) used to protect MPPE context. Each pipex(4)
session has two of them: one for the input and one for output path.

Where is no lock order limitations because those new mutex(9)'es never
held together.

ok bluhm@

3 years agoThe SIOCAIFADDR_IN6 ioctl could lose a race against another process
florian [Tue, 27 Jul 2021 08:15:11 +0000 (08:15 +0000)]
The SIOCAIFADDR_IN6 ioctl could lose a race against another process
configuring the same IP.
I forgot to fix slaacd after fixing the same problem in dhcpleased.
Pointed out by afresh1

3 years agoRestructure struct prefix a bit and move the rib pointer to the union
claudio [Tue, 27 Jul 2021 07:50:01 +0000 (07:50 +0000)]
Restructure struct prefix a bit and move the rib pointer to the union
that splits the normal RIB linkage vs the adjrib-out linkage. This is
done to make a bit of space to put an extra add-path related id into
the struct without blowing its size over 128 bytes.
Long run this struct should be split up but the necessary changes are
too large right now so this is the 2nd best option.
OK benno@

3 years agoImplemnt the RFC8050 in the MRT parser. With this MRT dumps containing
claudio [Tue, 27 Jul 2021 07:42:37 +0000 (07:42 +0000)]
Implemnt the RFC8050 in the MRT parser. With this MRT dumps containing
add-path information will be dumped properly.

There is one bit where this implementation is not in line with the RFC.
The encoding of DUMP_V2_RIB_GENERIC_ADDPATH for non IPv4 or IPv6 prefixes
is implemented the way gobgp did it (which seems to be the only other BGP
implementation that supports generic encoding). The RFC puts the path_id
in the NLRI for generic encoding instead of adding it to RIB entry struct
like in the IPv4 and IPv6 encoding. This is an open discussion point with
the RFC author.

OK benno@

3 years agoAdd the needed MRT dump defines for RFC8050 support. This will be used
claudio [Tue, 27 Jul 2021 07:32:08 +0000 (07:32 +0000)]
Add the needed MRT dump defines for RFC8050 support. This will be used
to dump add-path enabled systems because the NLRI format changes based
on the add-path capability and there is no way to know which format is
in use so new message types had to be added.
Also extend the ctl_show_rib structure to include the path_id.
OK benno@

3 years agoreplace efibind.h files with the small amount we need
jsg [Tue, 27 Jul 2021 07:20:11 +0000 (07:20 +0000)]
replace efibind.h files with the small amount we need
tested on armv7 arm64 and amd64 (bootx64)

ok kettenis@ mpi@

3 years agoImplement RFC9072: Extended Optional Parameters Length for BGP OPEN Message
claudio [Tue, 27 Jul 2021 07:14:31 +0000 (07:14 +0000)]
Implement RFC9072: Extended Optional Parameters Length for BGP OPEN Message

This allows to send more then 255 bytes of optional parameters. With this
it is possible to send more capabilities. bgpd will switch automatically
to the new extended lenght format if needed but by default the old 1 byte
param length encoding is used to keep compatible with old systems.

OK benno@

3 years agoFix Rx hash type
kevlo [Tue, 27 Jul 2021 01:44:55 +0000 (01:44 +0000)]
Fix Rx hash type
This matches what Linux and FreeBSD do.

ok jmatthew@

3 years agoUse per-CPU counters for tunnel descriptor block (tdb) statistics.
mvs [Mon, 26 Jul 2021 23:17:06 +0000 (23:17 +0000)]
Use per-CPU counters for tunnel descriptor block (tdb) statistics.
'tdb_data' struct became unused and was removed.

ok bluhm@

3 years agoPrint a few more registers in dump_regs().
kettenis [Mon, 26 Jul 2021 22:13:19 +0000 (22:13 +0000)]
Print a few more registers in dump_regs().

3 years agoDo not queue crypto operations for IPsec. The packet entries in
bluhm [Mon, 26 Jul 2021 21:27:56 +0000 (21:27 +0000)]
Do not queue crypto operations for IPsec.  The packet entries in
task queues were unlimited and could overflow during havy traffic.
Even if we still use hardware drivers that sleep, softnet task
instead of soft interrupt can handle this now.  Without queues net
lock is inherited and kernel lock is only needed once per packet.
This results in less lock contention and faster IPsec.
Also protect tdb drop counters with net lock and avoid a leak in
crypto dispatch error handling.
intense testing Hrvoje Popovski; OK mpi@

3 years agoThe mbuf header cleanup in revision 1.173 of ip_icmp.c was too
bluhm [Mon, 26 Jul 2021 20:44:44 +0000 (20:44 +0000)]
The mbuf header cleanup in revision 1.173 of ip_icmp.c was too
strict.  ICMP error packets generated by pf were not passed
immediately, but could be blocked.  Preserve PF_TAG_GENERATED flag
in icmp_reflect() and icmp6_reflect().
reported by sf@; OK patrick@ kn@

3 years agoFix typo.
bluhm [Mon, 26 Jul 2021 20:38:18 +0000 (20:38 +0000)]
Fix typo.
from alf schlichting

3 years agoAdd error checks for i2d_X509_NAME()
tb [Mon, 26 Jul 2021 16:54:20 +0000 (16:54 +0000)]
Add error checks for i2d_X509_NAME()

This avoids potential malloc(-1) and malloc(0), spotted by schwarze
while documenting X509_ocspid_print().

ok schwarze

3 years agoAdjust driver for device tree binding changes.
kettenis [Mon, 26 Jul 2021 16:47:52 +0000 (16:47 +0000)]
Adjust driver for device tree binding changes.

3 years agoFix accounting of the number of frames queued on an iwx(4) Tx ring.
stsp [Mon, 26 Jul 2021 14:15:40 +0000 (14:15 +0000)]
Fix accounting of the number of frames queued on an iwx(4) Tx ring.

Stop decrementing ring->queued inside the if-statement which guards
maintenance of the OACTIVE flag. This is wrong and resulted in a negative
counter value (visible in firmware error traces). The counter is already
decremented in the loop above where frames are taken off the ring.

3 years agonew manual page X509_policy_tree_level_count(3)
schwarze [Mon, 26 Jul 2021 14:03:43 +0000 (14:03 +0000)]
new manual page X509_policy_tree_level_count(3)
documenting the X509_POLICY_TREE object and its sub-objects

3 years agoReport write() and ioctl() errors encountered when writing GPT or MBR to disk.
krw [Mon, 26 Jul 2021 13:05:14 +0000 (13:05 +0000)]
Report write() and ioctl() errors encountered when writing GPT or MBR to disk.

Consolidate GPT/MBR read()/write() operations into DISK_writesectors() and
DISK_readsectors(), producing clearer logic and consistent handling of i/o and
errors.

Add some DPRINTF() and #ifdef DEBUG sections to allow more detailed error
reporting when desired.

3 years agosmall tweaks to dhcpleased.conf(5), ok jmc florian
sthen [Mon, 26 Jul 2021 12:59:41 +0000 (12:59 +0000)]
small tweaks to dhcpleased.conf(5), ok jmc florian

3 years agoPass make flags to kernel and lib builds
kn [Mon, 26 Jul 2021 12:47:44 +0000 (12:47 +0000)]
Pass make flags to kernel and lib builds

Running `make -j4' in /usr/src/distrib/amd64/ramdisk_cd/ et al. executes
make(1) to both build the RAMDISK kernel and build libraries.

Doing so does not propagate the flags specified to the ramdisk_cd
invocation, which in turn means `-j4' for example is ignored and both kernel
and libraries will not be built in parallel.

Pass make(1)'s MFLAGS along to retain relevant flags;  make is clever enough
to separate flags, variable assignments and targets from each other and only
pass along things to `MFLAGS' that'd make sense, i.e. `make -C. -j4 foo=bar'
does *not* pass `-C.' to change directories.
(can be easily tested with `make -p ... | grep MFLAGS'.)

This makes hacking on ramdisks/the installer much faster, espescially since
the `bsd' target does `make clean' and therefore builds a new kernel every
time.

OK deraadt

3 years agofix an mbuf leak with m_len 0 mbufs
jsg [Mon, 26 Jul 2021 11:06:36 +0000 (11:06 +0000)]
fix an mbuf leak with m_len 0 mbufs

from niklas@ via mikeb@

3 years agoImplement possibility to send vendor class identifier (option 60) and
florian [Mon, 26 Jul 2021 09:26:36 +0000 (09:26 +0000)]
Implement possibility to send vendor class identifier (option 60) and
client identifier (option 61). Some dhcp servers expect these options
and refuse to hand out a lease without them.
Need for vendor class identifier pointed out & tested by bket
Need for client identifier pointed out by sthen
Input & reads OK sthen (as part of a larger diff)
OK kn (as part of a larger diff)

3 years agoThe SIOCAIFADDR ioctl could lose a race against another process
florian [Mon, 26 Jul 2021 09:22:00 +0000 (09:22 +0000)]
The SIOCAIFADDR ioctl could lose a race against another process
configuring the same IP.
Found the hard way by afresh1

3 years agoQt4 cleanup
rsadowski [Mon, 26 Jul 2021 07:37:05 +0000 (07:37 +0000)]
Qt4 cleanup

Drop all references to qt4 and replace by qt5/6.

Tweaks and OK espie@

3 years agoretry i2c transfers on -EAGAIN up to the number of times specified in
jsg [Mon, 26 Jul 2021 06:24:22 +0000 (06:24 +0000)]
retry i2c transfers on -EAGAIN up to the number of times specified in
struct i2c_adapter

inteldrm gmbus returns -EAGAIN to fallback to gpio bitbanging

3 years agoAdd mtx_enter/mtx_leave in kvp_pool_keys().
asou [Mon, 26 Jul 2021 06:00:37 +0000 (06:00 +0000)]
Add mtx_enter/mtx_leave in kvp_pool_keys().

ok mikeb

3 years agoPass a socket pointer to various socket buffer routines in preparation for
mpi [Mon, 26 Jul 2021 05:51:13 +0000 (05:51 +0000)]
Pass a socket pointer to various socket buffer routines in preparation for
per-socket locking.

No functional change.

3 years agoDedup dtls1_dispatch_alert()/ssl3_dispatch_alert().
jsing [Mon, 26 Jul 2021 03:17:38 +0000 (03:17 +0000)]
Dedup dtls1_dispatch_alert()/ssl3_dispatch_alert().

The code for dtls1_dispatch_alert() and ssl3_dispatch_alert() is largely
identical - with a bit of reshuffling we can use ssl3_dispatch_alert() for
both protocols and remove the ssl_dispatch_alert function pointer.

ok inoguchi@ tb@

3 years agoConsistently use __asm instead of asm/__asm__
jca [Sun, 25 Jul 2021 22:58:39 +0000 (22:58 +0000)]
Consistently use __asm instead of asm/__asm__

ok kettenis@

3 years agoThe output of server_root_strip() is a string. Use the correct format
benno [Sun, 25 Jul 2021 20:31:41 +0000 (20:31 +0000)]
The output of server_root_strip() is a string. Use the correct format
"%s".  Same for the output of relay_expand_http().
with and ok claudio@
Found by Cedric Tessier, thanks!

3 years agonanosleep.2: HISTORY: correct historic sleep() system call origins
cheloha [Sun, 25 Jul 2021 15:47:26 +0000 (15:47 +0000)]
nanosleep.2: HISTORY: correct historic sleep() system call origins

A sleep() system call first appeared in Research UNIX v2, not v3.
See, e.g., the TOC here:

https://www.tuhs.org/Archive/Distributions/Research/Dennis_v2/v2man.pdf

Pointed out by jsg@ in a related discussion on tech@:

https://marc.info/?l=openbsd-tech&m=162718667209936&w=2

3 years agoKill unused sbinsertoob().
mpi [Sun, 25 Jul 2021 14:13:47 +0000 (14:13 +0000)]
Kill unused sbinsertoob().

ok mvs@

3 years agoDocument X509_STORE_CTX_set_trust(3), X509_STORE_CTX_set_purpose(3),
schwarze [Sun, 25 Jul 2021 14:05:03 +0000 (14:05 +0000)]
Document X509_STORE_CTX_set_trust(3), X509_STORE_CTX_set_purpose(3),
and X509_STORE_CTX_purpose_inherit(3).  These functions look deceptively
simple on first sight, but their semantics is surprisingly complicated.

3 years agoIf the lease didn't contain renewal or rebinding options set the
florian [Sun, 25 Jul 2021 12:35:58 +0000 (12:35 +0000)]
If the lease didn't contain renewal or rebinding options set the
defaults before validating the times to prevent excessive logging.
Found the hard way & OK brynet