openbsd
3 years agoaplpcie(4)
kettenis [Sat, 27 Feb 2021 17:15:33 +0000 (17:15 +0000)]
aplpcie(4)

3 years agoSet RTF_GATEWAY for host route based on RTM_GET response.
tobhe [Sat, 27 Feb 2021 17:07:04 +0000 (17:07 +0000)]
Set RTF_GATEWAY for host route based on RTM_GET response.

3 years agoapldart(4) is needed here as well.
kettenis [Sat, 27 Feb 2021 16:31:33 +0000 (16:31 +0000)]
apldart(4) is needed here as well.

3 years agoaipldart(4)
kettenis [Sat, 27 Feb 2021 16:26:41 +0000 (16:26 +0000)]
aipldart(4)

3 years agoaplpcie(4)
kettenis [Sat, 27 Feb 2021 16:23:41 +0000 (16:23 +0000)]
aplpcie(4)

3 years agoAdd apldart(4), a driver for the IOMMU on Apple M1 SoCs.
kettenis [Sat, 27 Feb 2021 16:19:14 +0000 (16:19 +0000)]
Add apldart(4), a driver for the IOMMU on Apple M1 SoCs.

ok patrick@

3 years agoWhile I wrote the initial version of resolvd(8) it diverged so much
florian [Sat, 27 Feb 2021 15:20:54 +0000 (15:20 +0000)]
While I wrote the initial version of resolvd(8) it diverged so much
that it's not appropriate to claim that I wrote it.

3 years agoMove handling of cipher/hash based cipher suites into the new record layer.
jsing [Sat, 27 Feb 2021 14:20:50 +0000 (14:20 +0000)]
Move handling of cipher/hash based cipher suites into the new record layer.

ok tb@

3 years agoDisentangle log_debug() output from tick_msg() output.
krw [Sat, 27 Feb 2021 13:59:00 +0000 (13:59 +0000)]
Disentangle log_debug() output from tick_msg() output.

Simplifies -v output, and reduces non-'-v' output.

Reduce non-'-v' output further by only displaying the first 'link up'
event.

Restore behaviour specified in dhclient.conf(5) of going daemon after
link-timeout seconds, rather than waiting another link-timeout seconds
for a lease to be accepted.

Lease verbiage problem reported, and fix tested by Mihai Popescu. Thanks!

Link verbiage problems reported, fix tested & ok tb@.

3 years agoReplace stray direct call of f_event with filter_event().
visa [Sat, 27 Feb 2021 13:43:16 +0000 (13:43 +0000)]
Replace stray direct call of f_event with filter_event().

This does not change the current behaviour, but filterops should be
invoked through filter_*() for consistency.

3 years agoIdentify DTLS based on the version major value.
jsing [Sat, 27 Feb 2021 13:38:35 +0000 (13:38 +0000)]
Identify DTLS based on the version major value.

This avoids the need to match specific DTLS version numbers.

3 years agoAdd dobeep functions that take messages to basic.c.
lum [Sat, 27 Feb 2021 13:24:52 +0000 (13:24 +0000)]
Add dobeep functions that take messages to basic.c.
No functional change intended.

3 years agoRework route_input() and rtm_sendup(). While we perform foreach loop
mvs [Sat, 27 Feb 2021 11:44:48 +0000 (11:44 +0000)]
Rework route_input() and rtm_sendup(). While we perform foreach loop
in route_input() we drop solock() after we checked socket state. We
pass mbuf(9) to this socket at next loops, while it referenced as
`last'. Socket's state could be changed by concurrent thread while
it's not locked.

Since we perform socket's checks and output in same iteration, the
logic which prevents mbuf(9) chain copy for the last socket in list
was removed.

ok bluhm@ claudio@

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:35:20 +0000 (10:35 +0000)]
Path #defines are traditionally prefixed with _PATH.
Pointed out by deraadt

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:32:28 +0000 (10:32 +0000)]
Path #defines are traditionally prefixed with _PATH.
Pointed out by deraadt

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:28:12 +0000 (10:28 +0000)]
Path #defines are traditionally prefixed with _PATH.
pointed out by deraadt

3 years agoPath #defines are traditionally prefixed with _PATH.
florian [Sat, 27 Feb 2021 10:21:08 +0000 (10:21 +0000)]
Path #defines are traditionally prefixed with _PATH.
pointed out by deraadt

3 years agoRead the lease file into a statically sized buffer and pass it over to
florian [Sat, 27 Feb 2021 10:07:41 +0000 (10:07 +0000)]
Read the lease file into a statically sized buffer and pass it over to
the engine process for parsing instead of passing an fd.
Let's us tighten the engine's pledge back down to "stdio".

3 years agoAdd logger(1) support for daemons that are logging to stdout/stderr (mostly from
ajacoutot [Sat, 27 Feb 2021 09:28:04 +0000 (09:28 +0000)]
Add logger(1) support for daemons that are logging to stdout/stderr (mostly from
the go ecosystem).
Properly handle failing daemon startup now that we have pipefail.

To take advantage of this new feature, just add foo_logger=facility to the
daemon rc.d(8) script or in rc.conf.local(8) or use rcctl:
rcctl set foo logger daemon.info

tweak for checking flags in rcctl(8) from martijn@
"this looks pretty good" deraadt@
ok sthen@

3 years agotrim some code i accidentally left into the nvgre add address function
dlg [Sat, 27 Feb 2021 09:21:22 +0000 (09:21 +0000)]
trim some code i accidentally left into the nvgre add address function

3 years agorecover scope from v6 nvgre endpoint addresses for userland to look at.
dlg [Sat, 27 Feb 2021 09:20:38 +0000 (09:20 +0000)]
recover scope from v6 nvgre endpoint addresses for userland to look at.

3 years agoIt is perfectly fine to POLLIN and POLLOUT at the same time. It may
claudio [Sat, 27 Feb 2021 08:59:29 +0000 (08:59 +0000)]
It is perfectly fine to POLLIN and POLLOUT at the same time. It may
actually make things a bit faster.
OK deraadt@

3 years agoHandle NULL term_type.
nicm [Sat, 27 Feb 2021 06:28:16 +0000 (06:28 +0000)]
Handle NULL term_type.

3 years agoregen
jsg [Sat, 27 Feb 2021 03:04:22 +0000 (03:04 +0000)]
regen

3 years agosort and fix RTL8713 id
jsg [Sat, 27 Feb 2021 03:03:40 +0000 (03:03 +0000)]
sort and fix RTL8713 id

3 years agoregen
jsg [Sat, 27 Feb 2021 03:01:25 +0000 (03:01 +0000)]
regen

3 years agosort
jsg [Sat, 27 Feb 2021 03:00:54 +0000 (03:00 +0000)]
sort

3 years agoregen
jsg [Sat, 27 Feb 2021 02:37:06 +0000 (02:37 +0000)]
regen

3 years agoadd ids for Intel Xeon Scalable
jsg [Sat, 27 Feb 2021 02:36:33 +0000 (02:36 +0000)]
add ids for Intel Xeon Scalable

Used by at least Skylake-SP (SKX) and Cascade Lake-SP (CLX).

Covers Xeon Scalable, Xeon D, Xeon W, Core Extreme/Core X product
families.  The Scalable parts are marketed as Xeon Bronze, Silver, Gold
and Platinum.

As most of these ids are not described in public documents from Intel
use Skylake-ESystem.inf and KabyLakePCH-HSystem.inf from Intel's Windows
drivers to get an idea of what the names should be.  With the name for
0x2088 found in a Intel authored Linux driver.

Initial patch and much discussion from Karel Gardas.

3 years agoput the mac addr into a uint64_t to compare it to the ethernet slow addr.
dlg [Sat, 27 Feb 2021 01:19:11 +0000 (01:19 +0000)]
put the mac addr into a uint64_t to compare it to the ethernet slow addr.

also do the ethertype comparison before the conversion above.

3 years agoCheck session, window, pane in the right order when working out format type.
nicm [Fri, 26 Feb 2021 21:53:41 +0000 (21:53 +0000)]
Check session, window, pane in the right order when working out format type.

3 years agoSet RTF_GATEWAY for flow routes, not for host route.
tobhe [Fri, 26 Feb 2021 21:06:02 +0000 (21:06 +0000)]
Set RTF_GATEWAY for flow routes, not for host route.

3 years agoFix and improve handling of address families in vroute_getcloneroute().
tobhe [Fri, 26 Feb 2021 20:22:11 +0000 (20:22 +0000)]
Fix and improve handling of address families in vroute_getcloneroute().

ok patrick@

3 years agoShip resolvd service, enable it by default
kn [Fri, 26 Feb 2021 18:29:16 +0000 (18:29 +0000)]
Ship resolvd service, enable it by default

Starting right after unwind.

OK deraadt

3 years agoIgnore SIGHUP
kn [Fri, 26 Feb 2021 18:28:07 +0000 (18:28 +0000)]
Ignore SIGHUP

It should always run and there is no reload semantic.

OK deraadt

3 years agosync; OK deraadt
florian [Fri, 26 Feb 2021 17:20:07 +0000 (17:20 +0000)]
sync; OK deraadt

3 years agoCreate /var/db/dhcpleased for lease files.
florian [Fri, 26 Feb 2021 17:19:21 +0000 (17:19 +0000)]
Create /var/db/dhcpleased for lease files.
OK deraadt@

3 years agorc(8) bits for dhcpleased(8).
florian [Fri, 26 Feb 2021 17:18:41 +0000 (17:18 +0000)]
rc(8) bits for dhcpleased(8).
OK deraadt

3 years agoHook up dhcpleased to the build.
florian [Fri, 26 Feb 2021 17:17:03 +0000 (17:17 +0000)]
Hook up dhcpleased to the build.
OK deraadt

3 years agoSort SEE ALSO and fix its punctuation.
tb [Fri, 26 Feb 2021 17:14:25 +0000 (17:14 +0000)]
Sort SEE ALSO and fix its punctuation.

3 years agoImport dhcpleased(8) - a dhcp daemon to acquire IPv4 address leases
florian [Fri, 26 Feb 2021 16:16:37 +0000 (16:16 +0000)]
Import dhcpleased(8) - a dhcp daemon to acquire IPv4 address leases
from servers.

dhcpleased(8) follows the well known three process design of all our
privsep daemons. It uses pledge(2) and unveil(2) to restrict access
further. In particular the "engine" process, responsible for parsing
of untrusted data, is pledge'd "stdio". It cannot access the outside
world nor the filesystem at all.

Like slaacd(8) for IPv6 it will be always running and acquire addresses
for all interface with the autoconf4 flag set.
The flag can be set by "ifconfig $if inet autoconf" or by adding
"inet autoconf" to /etc/hostname.if. An existing "dhcp" line should
be removed.

Various iterations tested by deraadt@
The hardest part, finding a name, was handled by jmatthew@ & otto@

"get to it :)" deraadt@

3 years agoSet is_trusted in x509_verify_ctx_add_chain()
tb [Fri, 26 Feb 2021 15:19:41 +0000 (15:19 +0000)]
Set is_trusted in x509_verify_ctx_add_chain()

If we're about to add a chain we have a trust path, so we have at least
one trusted certificate. This fixes a thinko from r1.31 and fixes the
openssl(1) cms verify test.

ok jsing (who had the same diff)

3 years agozap spades of trailing whitespace
tb [Fri, 26 Feb 2021 15:15:40 +0000 (15:15 +0000)]
zap spades of trailing whitespace

3 years agoRead and parse OTP on the BCM4378. There are quite a few firmware and
patrick [Fri, 26 Feb 2021 12:33:59 +0000 (12:33 +0000)]
Read and parse OTP on the BCM4378.  There are quite a few firmware and
nvram files used for the different Apple devices.  The device tree and
the OTP hold the information which of those we will have to use.  For
now this information will simply be printed, but depending on how we
choose to do the firmare distribution we could use it for loadfirmware().

3 years agoAttach to BCM4378.
patrick [Fri, 26 Feb 2021 12:29:36 +0000 (12:29 +0000)]
Attach to BCM4378.

3 years agoAdd support for BCM4378 as implemented on the Apple M1. This chip seems
patrick [Fri, 26 Feb 2021 12:28:45 +0000 (12:28 +0000)]
Add support for BCM4378 as implemented on the Apple M1.  This chip seems
to use a different set of PCIE2REG registers.  Accessing the "old" ones
even leads to faults.  There are two surprises though.  One is that it
seems that the interrupt status register always returns 0, and the other
one is that we receive the interrupts way too early, but both can be
worked around for now.

3 years agotouch pcidevs again to generated new rcs ids in headers
jan [Fri, 26 Feb 2021 11:41:02 +0000 (11:41 +0000)]
touch pcidevs again to generated new rcs ids in headers

advince from sthen@

3 years agoOnly support #iommu-cells = <1> for now to make sure the correct stream ID
kettenis [Fri, 26 Feb 2021 11:28:13 +0000 (11:28 +0000)]
Only support #iommu-cells = <1> for now to make sure the correct stream ID
is passed to the IOMMU device driver.

ok patrick@

3 years agoIncrease the amount of RX buffers given to the bwfm(4) chip. We haave seen
patrick [Fri, 26 Feb 2021 11:22:10 +0000 (11:22 +0000)]
Increase the amount of RX buffers given to the bwfm(4) chip.  We haave seen
this already on previous chips, which only started giving us packets when
handing over at least 128 of them.  Apparently some now require 256, which
seems to get the Apple M1's WiFi going.

3 years agoAdd aplcpie(4), a (minimal) driver for the PCIe host bridge on Apple M1 SoCs.
kettenis [Fri, 26 Feb 2021 11:09:23 +0000 (11:09 +0000)]
Add aplcpie(4), a (minimal) driver for the PCIe host bridge on Apple M1 SoCs.

ok patrick@

3 years agoAdd missing PCI product IDs for x710 10GBase-T into ixl(4)
jan [Fri, 26 Feb 2021 10:36:45 +0000 (10:36 +0000)]
Add missing PCI product IDs for x710 10GBase-T into ixl(4)

OK phessler

3 years agoonly store the current time on address table entries if it changes.
dlg [Fri, 26 Feb 2021 08:31:23 +0000 (08:31 +0000)]
only store the current time on address table entries if it changes.

this avoids unecessary writes to memory. it helps a little bit with
a single nettq, but we get a lot more of a boost in pps when running
concurrently.

thanks to hrvoje for testing.

3 years agoAdd a couple of format variables for active and last window index.
nicm [Fri, 26 Feb 2021 07:53:26 +0000 (07:53 +0000)]
Add a couple of format variables for active and last window index.

3 years agoSome more improvements from Joachim Wiberg's version of mg.
lum [Fri, 26 Feb 2021 07:21:23 +0000 (07:21 +0000)]
Some more improvements from Joachim Wiberg's version of mg.
check before using variable in list
remove unnecessary variable declaration
check value of adjustname()
add a '< 0' return value of snprintf

3 years agosync
deraadt [Fri, 26 Feb 2021 04:25:44 +0000 (04:25 +0000)]
sync

3 years agoremove this KEX fuzzer; it's awkward to use and doesn't play nice
djm [Fri, 26 Feb 2021 04:18:42 +0000 (04:18 +0000)]
remove this KEX fuzzer; it's awkward to use and doesn't play nice
with popular fuzzing drivers like libfuzzer. AFAIK nobody has used
it but me.

3 years agoremove some unused functions in slaacd
jsg [Fri, 26 Feb 2021 02:28:50 +0000 (02:28 +0000)]
remove some unused functions in slaacd

ok florian@

3 years agotpmr can use the eth64 bits too.
dlg [Fri, 26 Feb 2021 02:09:45 +0000 (02:09 +0000)]
tpmr can use the eth64 bits too.

3 years agotry do a better job of filtering 802.1 reserved group addresses.
dlg [Fri, 26 Feb 2021 01:57:20 +0000 (01:57 +0000)]
try do a better job of filtering 802.1 reserved group addresses.

if the bridge is supposed to carry vlan packets, assuming it's an
s-vlan component and should allow certain group addresses to cross
between "customer" bridges.

i should probably let some of these groups fall back through to the
calling ether_input rather than drop them.

3 years agoFix Typo, ok jca
danj [Fri, 26 Feb 2021 01:46:52 +0000 (01:46 +0000)]
Fix Typo, ok jca

3 years agouse uint64_ts for ethernet addresses in the src/dst bits of rules.
dlg [Fri, 26 Feb 2021 01:42:47 +0000 (01:42 +0000)]
use uint64_ts for ethernet addresses in the src/dst bits of rules.

3 years agouse a uint64_t for the ethernet address in the etherbridge table.
dlg [Fri, 26 Feb 2021 01:28:51 +0000 (01:28 +0000)]
use a uint64_t for the ethernet address in the etherbridge table.

testing has shown up to a 30% improvement in the veb forwarding
rate with this change.

an earlier diff was tested by hrvoje popovski
tested on amd64 and sparc64

3 years agoSome improvements from Joachim Wiberg's version of mg.
lum [Fri, 26 Feb 2021 01:17:21 +0000 (01:17 +0000)]
Some improvements from Joachim Wiberg's version of mg.
check value of adjustname()
use int for return value of snprintf

3 years agoadd some helpers for working with ethernet addresses as uint64_t
dlg [Fri, 26 Feb 2021 01:12:37 +0000 (01:12 +0000)]
add some helpers for working with ethernet addresses as uint64_t

the main bits are ether_addr_to_e64 and ether_e64_to addr for loading
an ethernet address into a uin64_t and visa versa. there's also
some macros for testing if an address in a uint64_t is multicast,
broadcast, anyaddr, or if it's an 802.1q reserved multicast group
address.

the reason for this functionality is once you have an ethernet
address as a uint64_t, operations like compares, bit tests, and
so on are fast and easy.

tested on amd64 and sparc64

3 years agoAdd my copyright since I added most of the content
danj [Fri, 26 Feb 2021 00:44:42 +0000 (00:44 +0000)]
Add my copyright since I added most of the content

3 years agoIncrease the buffer size for the ioctl response buffers to the same as
patrick [Fri, 26 Feb 2021 00:19:41 +0000 (00:19 +0000)]
Increase the buffer size for the ioctl response buffers to the same as
used in the wifi firmware to ensure responses can be received.

3 years agoa bit more debugging behind #ifdef DEBUG_SK
djm [Fri, 26 Feb 2021 00:16:58 +0000 (00:16 +0000)]
a bit more debugging behind #ifdef DEBUG_SK

3 years agogcc is more strict about union decls
deraadt [Fri, 26 Feb 2021 00:16:41 +0000 (00:16 +0000)]
gcc is more strict about union decls
ok dlg

3 years agoIndicate hostready signal to inform the firmware that the rings have been
patrick [Fri, 26 Feb 2021 00:14:28 +0000 (00:14 +0000)]
Indicate hostready signal to inform the firmware that the rings have been
initialized.

3 years agoRefactor bwfm(4) firmware loading. The PCIe backend will need to be able
patrick [Fri, 26 Feb 2021 00:07:41 +0000 (00:07 +0000)]
Refactor bwfm(4) firmware loading.  The PCIe backend will need to be able
to load the CLM blob like the SDIO backend already does.  Additionally it
is also helpful for the PCIe backend to try a file named after the device
tree compatible.  Thus refactor the SDIO code and make it available for
both SDIO and PCIe.

3 years agoFix prio2fifo mapping table.
patrick [Fri, 26 Feb 2021 00:02:07 +0000 (00:02 +0000)]
Fix prio2fifo mapping table.

3 years agoThe firmware replaces the last 32-bit on RAM with a shared DRAM address.
patrick [Thu, 25 Feb 2021 23:59:54 +0000 (23:59 +0000)]
The firmware replaces the last 32-bit on RAM with a shared DRAM address.
While the for-loop checks that thie value has changed since we wrote to
it, the timeout-condition checked for non-zero, which is wrong.  This
means that we didn't realize the firmware wasn't started.  While there,
make sure the shared DRAM address is inside the chip's address space.

3 years agoSome newer chips have two D11/802.11 cores, and we need to reset both at
patrick [Thu, 25 Feb 2021 23:55:41 +0000 (23:55 +0000)]
Some newer chips have two D11/802.11 cores, and we need to reset both at
the same time.

3 years agoSupport for version 7 of the bwfm(4) PCIe interface. The size of the items
patrick [Thu, 25 Feb 2021 23:26:05 +0000 (23:26 +0000)]
Support for version 7 of the bwfm(4) PCIe interface.  The size of the items
on the rx/tx complete rings has increased slightly to accomodate possible
new features.

3 years agoAdd some infrastructure in the PCI chipset tag for pci_probe_device_hook()
patrick [Thu, 25 Feb 2021 23:07:48 +0000 (23:07 +0000)]
Add some infrastructure in the PCI chipset tag for pci_probe_device_hook()
so that we can provide IOMMU-hooked bus DMA tags for each PCI device.

ok kettenis@

3 years agomention that FIX_CRLF_FILES is rooted in WRKDIST, pointed out by espie@.
sthen [Thu, 25 Feb 2021 23:06:52 +0000 (23:06 +0000)]
mention that FIX_CRLF_FILES is rooted in WRKDIST, pointed out by espie@.
mention that shell wildcards may be used.

3 years agowrong annotation
espie [Thu, 25 Feb 2021 22:58:27 +0000 (22:58 +0000)]
wrong annotation

3 years agomake the timing of FIX_CRLF_FILES explicit
espie [Thu, 25 Feb 2021 22:41:51 +0000 (22:41 +0000)]
make the timing of FIX_CRLF_FILES explicit

3 years agoAdd a framework for IOMMUs.
kettenis [Thu, 25 Feb 2021 22:14:54 +0000 (22:14 +0000)]
Add a framework for IOMMUs.

ok patrick@

3 years agodocument FIX_CRLF_FILES.
sthen [Thu, 25 Feb 2021 21:46:25 +0000 (21:46 +0000)]
document FIX_CRLF_FILES.

3 years agoftp: prevent double free() in error path
naddy [Thu, 25 Feb 2021 20:51:55 +0000 (20:51 +0000)]
ftp: prevent double free() in error path

Reported by bentley@; ok bentley@ jca@

3 years agoConstify cipher API.
tobhe [Thu, 25 Feb 2021 20:13:24 +0000 (20:13 +0000)]
Constify cipher API.

ok markus@

3 years agoTypofix
kn [Thu, 25 Feb 2021 20:04:38 +0000 (20:04 +0000)]
Typofix

3 years agoFix two bugs in the legacy verifier
tb [Thu, 25 Feb 2021 17:29:22 +0000 (17:29 +0000)]
Fix two bugs in the legacy verifier

To integrate the new X.509 verifier, X509_verify_cert() was refactored.
The code building chains in the legacy verifier was split into a
separate function. The first bug is that its return value was treated
as a Boolean although it wasn't. Second, the return alone is not enough
to decide whether to carry on the validation or not.

Slightly rearrange things to restore the behavior of the legacy verifier
prior to this refactoring.

Issue found and test case provided by Anton Borowka and jan.

ok jan jsing

3 years agoUpdate regress to match TLS versions change.
jsing [Thu, 25 Feb 2021 17:07:52 +0000 (17:07 +0000)]
Update regress to match TLS versions change.

3 years agoOnly use TLS versions internally (rather than both TLS and DTLS versions).
jsing [Thu, 25 Feb 2021 17:06:05 +0000 (17:06 +0000)]
Only use TLS versions internally (rather than both TLS and DTLS versions).

DTLS protocol version numbers are the 1's compliment of human readable TLS
version numbers, which means that newer versions decrease in value and
there is no direct mapping between TLS protocol version numbers and DTLS
protocol version numbers.

Rather than having to deal with this internally, only use TLS versions
internally and map between DTLS and TLS protocol versions when necessary.
Rename functions and variables to use 'tls_version' when they contain a
TLS version (and never a DTLS version).

ok tb@

3 years agoRename depth to num_untrusted so it identifies what it actually represents.
jsing [Thu, 25 Feb 2021 16:58:59 +0000 (16:58 +0000)]
Rename depth to num_untrusted so it identifies what it actually represents.

ok tb@

3 years agoAvoid passing last and depth to x509_verify_cert_error() on ENOMEM.
jsing [Thu, 25 Feb 2021 16:57:10 +0000 (16:57 +0000)]
Avoid passing last and depth to x509_verify_cert_error() on ENOMEM.

In x509_verify_ctx_set_xsc_chain(), an ENOMEM case is currently passing
the last certificate and depth (which is no longer actually depth) to
x509_verify_cert_error(). Given we've hit an ENOMEM situation, neither
of these are useful so remove both.

ok tb@

3 years ago- Make use of the fact that we know how the chunks are aligned, and
otto [Thu, 25 Feb 2021 15:20:18 +0000 (15:20 +0000)]
- Make use of the fact that we know how the chunks are aligned, and
write 8 bytes at the time by using a uint64_t pointer. For an
allocation a max of 4 such uint64_t's are written spread over the
allocation. For pages sized and larger, the first page is junked in
such a way.
- Delayed free of a small chunk checks the corresponiding way.
- Pages ending up in the cache are validated upon unmapping or re-use.
In snaps for a while

3 years agosplit off the large module documentations, so that port-modules is less of
espie [Thu, 25 Feb 2021 09:13:18 +0000 (09:13 +0000)]
split off the large module documentations, so that port-modules is less of
a monster.

okay sthen@

3 years agoPrevent zero size devices from attaching
jan [Thu, 25 Feb 2021 07:30:36 +0000 (07:30 +0000)]
Prevent zero size devices from attaching

This also fixes two NULL ptr derefs in later code path.

OK patick@, krw@

3 years agos/PubkeyAcceptedKeyTypes/PubkeyAcceptedAlgorithms/
djm [Thu, 25 Feb 2021 03:27:34 +0000 (03:27 +0000)]
s/PubkeyAcceptedKeyTypes/PubkeyAcceptedAlgorithms/

3 years agowe don't have to cast to caddr_t when calling m_copydata anymore.
dlg [Thu, 25 Feb 2021 02:48:19 +0000 (02:48 +0000)]
we don't have to cast to caddr_t when calling m_copydata anymore.

the first cut of this diff was made with coccinelle using this spatch:

@rule@
type caddr_t;
expression m, off, len, cp;
@@
-m_copydata(m, off, len, (caddr_t)cp)
+m_copydata(m, off, len, cp)

i had fix it's opinionated idea of formatting by hand though, so
i'm not sure it was worth it.

ok deraadt@ bluhm@

3 years agolet m_copydata use a void * instead of caddr_t
dlg [Thu, 25 Feb 2021 02:43:31 +0000 (02:43 +0000)]
let m_copydata use a void * instead of caddr_t

i'm not a fan of having to cast to caddr_t when we have modern
inventions like void *s we can take advantage of.

ok claudio@ mvs@ bluhm@

3 years agoenable veb(4), it's time for wider testing.
dlg [Thu, 25 Feb 2021 01:19:35 +0000 (01:19 +0000)]
enable veb(4), it's time for wider testing.

apart from the semantic differences between bridge(4) and veb(4),
the only missing bits in veb(4) is the transparent ipsec interception
support, and spanning tree.

3 years agoFix SMALL build
kn [Thu, 25 Feb 2021 00:38:59 +0000 (00:38 +0000)]
Fix SMALL build

OK deraadt

3 years agoadd support for hashing 64 and 32 bit numbers in host byte order.
dlg [Wed, 24 Feb 2021 23:44:04 +0000 (23:44 +0000)]
add support for hashing 64 and 32 bit numbers in host byte order.

3 years agosync
deraadt [Wed, 24 Feb 2021 23:33:44 +0000 (23:33 +0000)]
sync

3 years agoRename pubkeyacceptedkeytypes to pubkeyacceptedalgorithms in test to
dtucker [Wed, 24 Feb 2021 23:12:35 +0000 (23:12 +0000)]
Rename pubkeyacceptedkeytypes to pubkeyacceptedalgorithms in test to
match change to config-dump output.

3 years agoUse ASN1_STRING_get0_data() instead of the deprecated ASN1_STRING_data().
tobhe [Wed, 24 Feb 2021 22:17:48 +0000 (22:17 +0000)]
Use ASN1_STRING_get0_data() instead of the deprecated ASN1_STRING_data().

From Moritz Schmitt
ok patrick@