visa [Tue, 9 Mar 2021 14:13:33 +0000 (14:13 +0000)]
Add initial bits for Check Point UTM-1 EDGE N.
From Thaison Nguyen
nicm [Tue, 9 Mar 2021 13:07:50 +0000 (13:07 +0000)]
Allow cursor to be just after match if copying, GitHub issue 2602.
nicm [Tue, 9 Mar 2021 08:24:09 +0000 (08:24 +0000)]
Copy mode improvements from Anindya Mukherjee:
- Fix word and word-end for wrapped lines.
- Fix copying of selection end on wrapped lines.
- Fix wrapped word selection edge case.
- Update select-line to respect wrapped lines.
- Update window_copy_..._pos() functions to use grid_reader.
GitHub issue 2605.
otto [Tue, 9 Mar 2021 07:39:28 +0000 (07:39 +0000)]
Change the implementation of the malloc cache to keep lists of
regions of a given size. In snaps for a while, committing since
no issues were reported and a wider audience is good. ok deraadt@
deraadt [Tue, 9 Mar 2021 07:12:15 +0000 (07:12 +0000)]
dhcpleased wants /var (but contains code to handle when it isn't there).
But in the nfs diskless case, we can do better by starting it a little
later. This disrupts nfs diskless on dynamic addresses a little, if it ever
actually worked with dhclient, but anyone doing that deserves the headache.
ok florian
deraadt [Tue, 9 Mar 2021 07:03:19 +0000 (07:03 +0000)]
Do not adjust (uhm.. zero) the swap 'b' partition size if physmem is
zero (should not happen, but did), because the auto-allocate code will
put a filesystem on that partition.
ok otto kurt
deraadt [Tue, 9 Mar 2021 04:53:40 +0000 (04:53 +0000)]
ofw_read_mem_regions() can skip calculation of physmem. pmap.c
already calculates _usable_ memory and updates physmem (if it is 0),
whereas ofw_read_mem_regions() was counting usable+unuseable memory.
ie. 4G or more on some machines. powerpc's 32-bit pagetable cannot use memory
beyond 4G phys addr.
(On a 4G machine, physmem64 was calculated as 0, which caused the installer's
auto-diskabel code to place /tmp on the b partition).
ok gkoehler, works for kurt also
patrick [Mon, 8 Mar 2021 20:56:10 +0000 (20:56 +0000)]
Enable ixl(4).
lum [Mon, 8 Mar 2021 20:01:43 +0000 (20:01 +0000)]
Start looking at parsing text to find separators.
lum [Mon, 8 Mar 2021 18:27:33 +0000 (18:27 +0000)]
Put regex tests into a function.
claudio [Mon, 8 Mar 2021 18:09:15 +0000 (18:09 +0000)]
Revert commitid: AZrsCSWEYDm7XWuv;
Kill SINGLE_PTRACE and use SINGLE_SUSPEND which has almost the same semantic.
This diff did not properly kill SINGLE_PTRACE and broke RAMDISK kernels.
deraadt [Mon, 8 Mar 2021 17:39:16 +0000 (17:39 +0000)]
dhclient relationship with "inet autoconf" is incorrect, it activated
dhcpleased.
florian [Mon, 8 Mar 2021 16:49:07 +0000 (16:49 +0000)]
We no longer "accept" RAs in the kernel, delete misleading comment.
florian [Mon, 8 Mar 2021 16:12:28 +0000 (16:12 +0000)]
Note that slaacd(8) is enabled by default. Also note that if you
disabled it in the past and then note that IPv6 autoconfiguration
doesn't work for you, you will quickly note that we will point and
laugh.
jcs [Mon, 8 Mar 2021 14:39:34 +0000 (14:39 +0000)]
Add another Type Cover device
from Fredrik Engberg
jcs [Mon, 8 Mar 2021 14:37:21 +0000 (14:37 +0000)]
regen
jcs [Mon, 8 Mar 2021 14:37:08 +0000 (14:37 +0000)]
Add Surface Pro Type Cover
from Fredrik Engberg
jcs [Mon, 8 Mar 2021 14:35:57 +0000 (14:35 +0000)]
Allow uhidev child devices to claim selective report ids
There may be multiple matching devices on a single uhidev device but
the first device that responds to UHIDEV_CLAIM_ALLREPORTID will
block the others from attaching.
Change this to UHIDEV_CLAIM_MULTIPLE_REPORTID and require any
devices wanting some/all report ids to fill in the claimed array in
uhidev_attach_arg with just the reports it needs. uhidev can then
run match routines for other drivers with the available report ids.
ok anton
kettenis [Mon, 8 Mar 2021 13:48:56 +0000 (13:48 +0000)]
Add support for sdhc(4) on Raspberry Pi in ACPI mode.
ok patrick@
kurt [Mon, 8 Mar 2021 12:55:48 +0000 (12:55 +0000)]
Add RK809 to list of supported chips for this driver.
kurt [Mon, 8 Mar 2021 12:53:35 +0000 (12:53 +0000)]
Add support for rk809 as seen on the Rock Pi N10 with the rk3399pro. Add
support for multiple linear ranges for voltage regulators and use for all
rkpmic ICs.
ok kettenis@
claudio [Mon, 8 Mar 2021 12:18:46 +0000 (12:18 +0000)]
When introducing prefix_eligible() I botched up one if statement.
For nexthops it is fine if they point to NULL. This is used in local
announcements. Only if they point to a real struct the state must be
NEXTHOP_REACH.
Bug reported by and OK florian@
kettenis [Mon, 8 Mar 2021 11:16:26 +0000 (11:16 +0000)]
Revise the ASID allocation sheme to avoid a hang when running out of free
ASIDs. This should only happen on systems with 8-bit ASIDs, which are
currently unsupported in OpenBSD.
The new scheme uses "generations". Whenever we run out of ASIDs we bump
the generation and flush the complete TLB. The pmaps of processes that
are currently on the CPU are carried over into the new generation. This
implementation relies on the scheduler lock to make sure this happens
without any (known) races.
ok patrick@, mpi@
mpi [Mon, 8 Mar 2021 10:54:53 +0000 (10:54 +0000)]
Move a KERNEL_ASSERT_LOCKED() from single_thread_clear() to cursig().
Ze big lock is currently necessary to ensure that two sibling threads
are not racing against each other when processing signals. However it
is not strickly necessary to unpark sibling threads.
ok claudio@
mpi [Mon, 8 Mar 2021 10:12:05 +0000 (10:12 +0000)]
Kill SINGLE_PTRACE and use SINGLE_SUSPEND which has almost the same semantic.
single_thread_set() is modified to explicitly indicated when waiting until
sibling threads are parked is required. This is obviously not required if
a traced thread is switching away from a CPU after handling a STOP signal.
ok claudio@
ratchov [Mon, 8 Mar 2021 09:42:50 +0000 (09:42 +0000)]
sndiod: Use chronological order for {dev,port}_list
This simplifies the logic of the initialization code, makes debug
printfs nicer and could slightly ease futur development.
No behavior change.
ratchov [Mon, 8 Mar 2021 09:38:36 +0000 (09:38 +0000)]
sndiod: Initialize dev->master_enabled earlier
This is better style as since recently dev->master_enabled is used by
the ctlslot_xxx family functions which -- in the future -- could be
called with the device closed.
No behavior change.
ratchov [Mon, 8 Mar 2021 09:35:08 +0000 (09:35 +0000)]
sndiod: Style tweak: uniformize pattern to access ctlslot_array
jsg [Mon, 8 Mar 2021 06:20:50 +0000 (06:20 +0000)]
use a journal reference instead of cstr when possible
deraadt [Mon, 8 Mar 2021 05:57:34 +0000 (05:57 +0000)]
Remove the workaround which identified Go executables, and permitted them
to do syscalls directly. Go executables now use shared libc like all other
dynamic binaries. This makes the "where are syscalls done from" checker
strict for all binaries, and also opens the door to change the underlying
syscall ABI to the kernel in the future very easily (if we find cause).
ok jsing
jsg [Mon, 8 Mar 2021 03:54:48 +0000 (03:54 +0000)]
correct paper title
jsg [Mon, 8 Mar 2021 02:47:25 +0000 (02:47 +0000)]
Add some references, most of these were removed when we stopped building
and installing USD/SMM/PSD docs.
jmc@ agrees with the direction, ok millert@ on an earlier diff
mortimer [Sun, 7 Mar 2021 23:10:54 +0000 (23:10 +0000)]
Explicitly align kernel text.
lld11 no longer quietly aligns this when given an address, so we do the
alignment explicitly.
ok kettenis@
yasuoka [Sun, 7 Mar 2021 22:53:46 +0000 (22:53 +0000)]
Fix aml_store() to work properly when the lvalue is a reference of
LocalX. In that case, resolving the reference must be done before
resetting the LocalX variable. test daniel
ok kettenis
eric [Sun, 7 Mar 2021 20:56:41 +0000 (20:56 +0000)]
use the mx hostname for sni on outgoing connection, not the reverse
dns for the peer address.
spotted by krw@
ok krw@ tb@
florian [Sun, 7 Mar 2021 18:39:11 +0000 (18:39 +0000)]
Reduce debug logging by moving protocol level debug log
behind -vv or by deleting unneeded output.
While here reword some debug output to make it more useful.
(There is more to be done here.)
tb [Sun, 7 Mar 2021 17:08:49 +0000 (17:08 +0000)]
Fix intercardinal directions in hack help.
From Raf Czlonka
florian [Sun, 7 Mar 2021 16:22:01 +0000 (16:22 +0000)]
No need to cap the exponential backoff here, iface_timeout() already
handles this for us by doing a state transition if we have been stuck
in "rebooting" or "requesting" for too long.
Makes the code a bit simpler and we only have one place were we need
to special case the timeout cap.
tobhe [Sun, 7 Mar 2021 15:51:07 +0000 (15:51 +0000)]
Log ESN for child SAs if enabled.
jsg [Sun, 7 Mar 2021 15:25:15 +0000 (15:25 +0000)]
v1/v2 find is different to pwb/v5 find
patrick [Sun, 7 Mar 2021 15:17:58 +0000 (15:17 +0000)]
Pass standard DMA tag to acpi(4) table drivers.
ok kettenis@
florian [Sun, 7 Mar 2021 10:31:57 +0000 (10:31 +0000)]
Withdraw nameservers when the interface goes down.
Problem reported by deraadt some time ago.
florian [Sun, 7 Mar 2021 10:31:20 +0000 (10:31 +0000)]
Fold get_lladdr into update_iface, now the only caller.
This allows us to pass the link state over to engine here instead of
in update_addr which is not available in small.
This gets us more in line dhcpleased.
florian [Sun, 7 Mar 2021 10:30:13 +0000 (10:30 +0000)]
No need to pass the link local and hw address around, we have it
already in the interface on the engine side.
florian [Sun, 7 Mar 2021 10:29:12 +0000 (10:29 +0000)]
reshuffle to bring more in line with dhcpleased
florian [Sun, 7 Mar 2021 10:28:44 +0000 (10:28 +0000)]
Introduce engine_update_if().
This was too much code in the imsg handler.
bcook [Sun, 7 Mar 2021 08:53:10 +0000 (08:53 +0000)]
LibreSSL 3.3.2
jsg [Sun, 7 Mar 2021 06:21:38 +0000 (06:21 +0000)]
ansi
jsg [Sun, 7 Mar 2021 06:20:09 +0000 (06:20 +0000)]
ansi
jsg [Sun, 7 Mar 2021 06:18:48 +0000 (06:18 +0000)]
ansi
jsg [Sun, 7 Mar 2021 06:17:03 +0000 (06:17 +0000)]
ansi
dlg [Sun, 7 Mar 2021 06:02:32 +0000 (06:02 +0000)]
use uint64_t ethernet addresses for compares in carp.
pass the uint64_t that ether_input has already converted from a
real ethernet address into carp_input so it can use it without
having to do its own conversion.
tested by hrvoje popovski
tested by me on amd64 and sparc64
ok patrick@ jmatthew@
tobhe [Sat, 6 Mar 2021 22:27:39 +0000 (22:27 +0000)]
whitespace
millert [Sat, 6 Mar 2021 20:36:31 +0000 (20:36 +0000)]
Fix PRINT macro, the suffix param to sshlog() was missing.
Also remove redundant __func__ prefix from PRINT calls as the macro
already adds __FILE__, __func__ and __LINE__. From Christos Zoulas.
OK dtucker@
patrick [Sat, 6 Mar 2021 19:30:07 +0000 (19:30 +0000)]
Since with the current design there's one device per domain, and one
domain per pagetable, there's no need for a backpointer to the domain
in the pagetable entry descriptor. There can't be any other domain.
Also since there's no list, no list entry member is needed either.
This reduces early allocation to half of the previous size. I think
it's possible to reduce it even further and not need a pagetable entry
descriptor at all, but I need to think about that a bit more.
patrick [Sat, 6 Mar 2021 19:25:27 +0000 (19:25 +0000)]
One major issue talked about in research papers is reducing the overhead
of the IOVA allocation. As far as I can see the current "best solution"
is to cache IOVA ranges in percpu magazines. I don't think we have this
issue at all thanks to bus_dmamap_create(9). The map is created ahead
of time, and we know the maximum size of the DMA transfer. Since with
smmu(4) we have IOVA per domain, allocating IOVA 'early' is essentially
free. But pagetable mapping also incurs a performance penalty, since we
allocate pagetable entry descriptors through pools. Since we have the
IOVA early, we can allocate those early as well. This allocation is a
bit more expensive though, but can be optimized further.
All this means that there is no allocation overhead in hot code paths.
The "only" thing remaining is assigning IOVA to the segments, adjusting
the pagetable mappings, and flushing the IOTLB on unload. Maybe there's
a way to do a combined flush for NICs, because we give a list of mbufs
to the network stack and we could do the IOTLB invalidation only once
right before we hand over the mbuf list to the upper layers.
florian [Sat, 6 Mar 2021 19:02:53 +0000 (19:02 +0000)]
Implement last remaining bits to update from RFC 4941 to RFC 8981.
The desync factor is now tracked per temporary IP and the max value
has been increased to about 9 hours.
While here fix a bug where the minimum acceptable pltime in a router
advertisement should be bigger than PRIV_REGEN_ADVANCE not the desync
factor (which didn't make any sense at all).
From Fernando Gont, thanks!
OK sthen
florian [Sat, 6 Mar 2021 18:33:44 +0000 (18:33 +0000)]
Turns out there are dhcp servers that ignore DHCPREQUEST messages when
they don't like them instead of sending a DHCPNAK. Found the hard way
by benno who didn't want to wait 127 seconds.
Due to another bug dhcpleased would have exit through a fatal() in the
frontend process if he had waited long enough for a Rebooting -> Init
transition because we didn't deconfigure our IP address and thus
didn't close our UDP socket. Upon configuring a new IP address we would
open a new UDP socket send it to the frontend which would then fatal()
due to an unexpected fd passed in.
Aproporiate timings are rather underspecified in RFC 2131. Instead of
doing an exponential backoff up to 64 in the "Rebooting" and
"Requesting" state only go up to 2 for a total of 3 packets and total
timeout of 3 seconds before going into "Init" state and sending a
DHCPDISCOVER.
To prevent the fatal() in the frontend process we reshuffle the state
transition into the "Init" state and deconfigure the IP when
appropriate.
deraadt [Sat, 6 Mar 2021 16:09:50 +0000 (16:09 +0000)]
sync
jsg [Sat, 6 Mar 2021 09:20:49 +0000 (09:20 +0000)]
ansi
espie [Sat, 6 Mar 2021 08:31:42 +0000 (08:31 +0000)]
put back Lst_Destroy(paths) where it belongs
noticed by jsg@
tobhe [Fri, 5 Mar 2021 22:26:04 +0000 (22:26 +0000)]
Print PFS group for rekeyed Child SAs.
ok patrick@
tobhe [Fri, 5 Mar 2021 22:08:25 +0000 (22:08 +0000)]
Log transforms of established IKE and Child SAs.
ok patrick@
tobhe [Fri, 5 Mar 2021 22:03:51 +0000 (22:03 +0000)]
Move policy printing code from parse.y to new print.c
ok patrick@
jan [Fri, 5 Mar 2021 20:06:39 +0000 (20:06 +0000)]
Avoid print for NULL pointer
The subclass arrays have to be empty.
OK deraadt@
claudio [Fri, 5 Mar 2021 17:28:09 +0000 (17:28 +0000)]
Fix regress tests after changes to tal.c, mft.c, and cert.c.
claudio [Fri, 5 Mar 2021 17:15:19 +0000 (17:15 +0000)]
Factor out the URI check we do in various places into valid_uri().
RRDP will add a bunch more checks so this makes even more sense.
With and OK tb@
lum [Fri, 5 Mar 2021 16:16:53 +0000 (16:16 +0000)]
If there is a problem with opening a directory via M-x dired, let the
user know. EACCESS is currently accounted for, but nothing else.
claudio [Fri, 5 Mar 2021 16:00:00 +0000 (16:00 +0000)]
Factor out the SHA256 hash checks into valid_filehash() so that it can
be used by the RRDP code as well.
OK tb@
zhuk [Fri, 5 Mar 2021 15:24:37 +0000 (15:24 +0000)]
Test case for read-only array being not that read-only in ksh.
okay tb@
zhuk [Fri, 5 Mar 2021 15:22:03 +0000 (15:22 +0000)]
Fix old ksh bug: wrong variable being looked up when value is provided.
This results, e.g., in allowing the first item of a read-only array to
be overwritten, as found by Jordan Geoghegan.
okay tb@
jsg [Fri, 5 Mar 2021 13:20:19 +0000 (13:20 +0000)]
ansi
jan [Fri, 5 Mar 2021 12:57:20 +0000 (12:57 +0000)]
add missing PCI classes
OK dlg@
jsg [Fri, 5 Mar 2021 12:40:13 +0000 (12:40 +0000)]
ansi
eric [Fri, 5 Mar 2021 12:37:32 +0000 (12:37 +0000)]
Start porting smtpd to libtls.
Note that it changes the way SNI works: The certificate to use is now
selected by looking at the names found in the certificates themselves,
rather than the names of the pki entries in the configuration file.
The set of certificates for a tls listener must be defined explicitly by
using the pki listener option multiple times.
ok tb@
claudio [Fri, 5 Mar 2021 12:33:19 +0000 (12:33 +0000)]
Remove space at end of line
jsg [Fri, 5 Mar 2021 09:37:20 +0000 (09:37 +0000)]
ansi
jsg [Fri, 5 Mar 2021 09:21:08 +0000 (09:21 +0000)]
ansi
yasuoka [Fri, 5 Mar 2021 08:41:26 +0000 (08:41 +0000)]
Fix some heap over-read in logging in PPTP protocol handler.
anton [Fri, 5 Mar 2021 07:34:46 +0000 (07:34 +0000)]
Stop abusing display blocks under the authors section in order to
respect literal line breaks. This has the unwanted side effect of
rendering the authors section using a monospace font over at
man.openbsd.org. Instead use br macros to force line breaks.
With help from and ok jmc@
jsg [Fri, 5 Mar 2021 07:10:06 +0000 (07:10 +0000)]
deregister
jsg [Fri, 5 Mar 2021 07:01:36 +0000 (07:01 +0000)]
ansi
dlg [Fri, 5 Mar 2021 06:44:09 +0000 (06:44 +0000)]
pass the uint64_t dst ethernet address from ether_input to bridges.
tested on amd64 and sparc64.
jsg [Fri, 5 Mar 2021 06:01:13 +0000 (06:01 +0000)]
ansi
jsg [Fri, 5 Mar 2021 05:30:44 +0000 (05:30 +0000)]
ansi
dlg [Fri, 5 Mar 2021 03:51:41 +0000 (03:51 +0000)]
work with 64bit ethernet addresses in ether_input().
this applies the tricks with addresses from veb and etherbridge
code to the normal ethernet input processing. it basically loads
the destination address from the packet and the interface ethernet
address into uint64_ts for comparison.
tested by hrvoje popovski and chris cappuccio
tested here on amd64, arm64, and sparc64
ok claudio@ jmatthew@
patrick [Fri, 5 Mar 2021 01:16:55 +0000 (01:16 +0000)]
Improve readability of softc accesses.
patrick [Fri, 5 Mar 2021 00:55:45 +0000 (00:55 +0000)]
Introduce an IOVA allocator instead of mapping pages 1:1. Mapping pages 1:1
obviously reduces the overhead of IOVA allocation, but instead you have the
problem of doubly mapped pages, and making sure a page is only unmapped once
the last user is gone. My initial attempt, modeled after apldart(4), calls
the allocator for each segment. Unfortunately this introduces a performance
penalty which reduces performance from around 700 Mbit/s to about 20 Mbit/s,
or even less, in a simple single stream tcpbench scenario. Most mbufs from
userland seem to have at least 3 segments. Calculating the needed IOVA space
upfront reduces this penalty. IOVA allocation overhead could be reduced once
and for all if it is possible to reserve IOVA during bus_dmamap_create(9), as
it is only called upon creation and basically never for each DMA cycle. This
needs some more thought.
With this we now put the pressure on the PTED pools instead. Additionally, but
not part of this diff, percpu pools for the PTEDs seem to reduce the overhead
for that single stream tcpbench scenario to 0.3%. Right now this means we're
hitting a different bottleneck, not related to the IOMMU. The next bottleneck
will be discovered once forwarding is unlocked. Though it should be possible
to benchmark the current implementation, and different designs, using a cycles
counter.
With IOVA allocation it's not easily possible to correlate memory passed to
bus_dmamem_map(9) with memory passed to bus_dmamap_load(9). So far my code
try to use the same cachability attributes as the kenrel uses for its userland
mappings. For the devices we support, there seems to be no need so far. If
this ever gives us any trouble in the feature, I'll have a look and fix it.
While drivers should call bus_dmamap_unload(9) before bus_dmamap_destroy(9),
the API explicitly states that bus_dmamap_destroy(9) should unload the map
if it is still loaded. Hence we need to do exactly that. I actually have
found one network driver which behaves that way, and the developer intends
to change the network driver's behaviour.
patrick [Fri, 5 Mar 2021 00:18:26 +0000 (00:18 +0000)]
Extend the commented code that shows which additional mappings are needed,
or which regions need to be reserved. As it turns out, a region we should
not map is the PCIe address space. Making a PCIe device try to do DMA to
an address in PCIe address space will obviously not make its way to SMMU
and host memory. We'll probably have to add an API for that.
tobhe [Thu, 4 Mar 2021 22:27:13 +0000 (22:27 +0000)]
Remove -g from CFLAGS. This was accidentally added with the last commit.
tobhe [Thu, 4 Mar 2021 22:20:24 +0000 (22:20 +0000)]
Derive config netmask from address pool if not explicitly configured.
ok markus@
kettenis [Thu, 4 Mar 2021 18:36:52 +0000 (18:36 +0000)]
Turns out the cores on Apple's M1 SoC only support 8-bit ASIDs.
Thank you Apple (not)!
Add an initial attempt to support such systems. This isn't good enough
since the kernel will hang once you create more than 127 processes.
But it makes things work reasonably well until you reach that limit
which is good enough to build things on the machine itself.
ok patrick@
kettenis [Thu, 4 Mar 2021 18:32:52 +0000 (18:32 +0000)]
Print feature that indicates a CPU core supports 16-bit ASIDs.
ok patrick@
jmc [Thu, 4 Mar 2021 17:03:42 +0000 (17:03 +0000)]
new sentence, new line;
visa [Thu, 4 Mar 2021 16:44:07 +0000 (16:44 +0000)]
Tweak whitespace and adjust prototypes.
visa [Thu, 4 Mar 2021 16:34:47 +0000 (16:34 +0000)]
Combine octeon_pcibusvar.h into octeon_pcibus.c to reduce scatter.
tb [Thu, 4 Mar 2021 15:44:13 +0000 (15:44 +0000)]
Add two error checks for strdup for consistency.
ok claudio
tb [Thu, 4 Mar 2021 15:43:18 +0000 (15:43 +0000)]
typo in comment
visa [Thu, 4 Mar 2021 15:38:06 +0000 (15:38 +0000)]
Update clock interrupt count atomically.
This avoids errors that can arise when multiple cores update the
variable at the same time.
claudio [Thu, 4 Mar 2021 15:35:39 +0000 (15:35 +0000)]
Last commit was done from a non-clean tree. Revert one line that broke
everything. Oups.