summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-18special is SMALLFlorian Obser
2021-06-18fix SMALL buildFlorian Obser
2021-06-18special is SMALLFlorian Obser
2021-06-18Mention %1 under choose-tree also.Nicholas Marriott
2021-06-18recognise BCM5762 B0Jonathan Gray
from Brad
2021-06-18The pmap needs to know which CPUs to send IPIs when TLB entriesPhilip Guenther
need to be invalidated. Instead of keeping a bitset of CPUs in each pmap, have each cpu_info track which pmap it has loaded: replace pmap->pm_cpus with cpu_info->ci_proc_pmap. This reduces the atomic operations (and cache thrashing) and simplifies cpu_switchto() Also, fix a defect in cpu_switchto()'s "am I loading the same cr3?" test: ignore the CR3_REUSE_PCID bit when checking that. This makes switching between kernel threads slightly less costly. over a week in snaps with no complaints looks ok to mlarkin@ kettenis@ mpi@
2021-06-18initial plic(4) sfcc(4) sfclock(4)Jonathan Gray
2021-06-17vmd(8): handle VIRTIO_BLK_T_GET_ID, check descriptor r/w flagsdv
Linux guests like to issue VIRTIO_BLK_T_GET_ID commands in attempts to read the device serial number. It's not part of the virtio spec, but has been part of QEMU and Bhyve for multiple years. It will be landing in the next version of virtio (1.2), so this stubs out handling for the request type. The added benefit is it helps squelch log noise from Linux guests. For now, no serial number is set and the request status is set to VIRTIO_BLK_S_UNSUPP to tell the driver we don't support it. While here, swap the response to VIRTIO_BLK_T_FLUSH{,_OUT} to be also returning VIRTIO_BLK_S_UNSUPP. It's not negotiated nor implemented. Lastly, add checks for validating the vioblk device is only reading/writing descriptors with approrpriate read/write-only flags per the virtio spec. With input from claudio@, OK mlarkin@
2021-06-17syncStuart Henderson
2021-06-17compar is a function arg (Fa) not function name (Fn);Jason McIntyre
2021-06-17Add sfclock(4), a driver for the PRCI (Power Reset Clocking Interrupt) blockMark Kettenis
of the SiFive FU740 SoC. ok deraadt@
2021-06-17Revert previous: unref of amap outside of the KERNEL_LOCK().Martin Pieuchot
This change introduced or exposed a leak of anons which result in system freezes. anton@ observed a high number of INUSE for anonpl and semarie@ saw multiple processes waiting in the fault handler on "flt_noramX" probably the one related to allocating an anon.
2021-06-17On OpenBSD _JBLEN is the number of slots (of type long) in jmp_buf.Mark Kettenis
We don't need 256 slots, so change it to 32 which leaves us with a few spare slots and is probably what was intended. This fixes building emacs which does some insane setjmp(3)/longjmp(3) stuff and gets upset when jmp_buf is 2048 bytes. ok deraadt@
2021-06-17Implement RFC 7313 enhanced route refresh. It is off by default andClaudio Jeker
can be enabled with 'announce enhanced refresh yes' Similar to graceful restart this allows to mark routes as stale, refresh them and the flush out routes that are still stale. Enhanced route refresh uses a begin of rr and a end of rr message to signal the various stages. A future enhancement would be the addition of a timeout in case the EoRR message is not sent in reasonable time. OK denis@ job@
2021-06-17Add simple BGP Enhanced Route Refresh Message decodingjob
seems OK claudio@
2021-06-17Skip flows in ikev2_cp_addr() if they don't contain a dynamic (0.0.0.0)tobhe
address before checking sa_addrpool. Fixes a bug where no flows are added if a single address instead of a pool is configured in config address. Reported by Sebastien Leclerc ok patrick@
2021-06-17Like ARM, RISC-V does not implement floating point exceptions.Mark Kettenis
2021-06-17Refactor common code for peer filtering out into rde_skip_peer()Claudio Jeker
and use it in the two places that need to keep in sync. OK sthen@
2021-06-17Add BCM5725 support. Based on a diff from Brad Smith.Mark Kettenis
ok jsg@
2021-06-17regenMark Kettenis
2021-06-17Add Broadcom BCM5725. Based on a diff from Brad Smith.Mark Kettenis
ok jsg@
2021-06-17Add a bit of extra paranoia befor the up_generate_updates() call inClaudio Jeker
rde_up_dump_upcall(). This is the 4th place up_generate_updates() is called.
2021-06-17In Rev 1.511 I moved peer related checks from inside up_generate_updates()Claudio Jeker
to rde_generate_updates() but forgot to add the same checks to rde_softreconfig_out(). As a result a config reload could result in prefixes for a not-negotiated address family to leak into the Adj-RIB-Out. Adjust both rde_generate_updates() and rde_softreconfig_out() to use the same filter logic. Also adjust rde_up_flush_upcall() to pass the peer as argument instead of using prefix_peer(). The up_generate_updates() call there does not need any filtering since the walker runs on the Adj-RIB-Out and just withdraws everything. OK job@ on a previous diff
2021-06-17Better error message when a bad nexthop is passed to nexthop_hash().Claudio Jeker
OK job@
2021-06-17Before adding a prefix to the Adj-RIB-Out modify the attributes to theClaudio Jeker
ones being sent out. Mainly prepend the ASPATH if needed and also change the nexthop to the one being sent. This should make the `bgpctl show rib out` output show the values the peer receives. OK job@
2021-06-17more consistently use pfsync_free_deferral to free the mbuf.David Gwynne
pfsync_free_deferral doesnt need to check pd_m for NULL before calling m_freem because m_freem does that anyway. if pf_setup_pdesc in pfsync_undefer_notify failed, the mbuf was freed but the pd_m pointer was not cleared, which would have led to a double free when pfsync_free_deferral tried to do the same thing for it. if pfsync_undefer is supposed to drop the mbuf, let pfsync_free_deferral do it for us. ok jmatthew@
2021-06-16cleanup vmd(8) includes and header filesdv
Lots of organic growth other the years lead to unnecessary includes (proc.h everywhere) and odd dependencies between header files. This cleans things up a bit to help with upcoming cleanup around dhcp code. No functional change. "go for it" mlarkin@
2021-06-16ociic(4) and dapmic(4)Mark Kettenis
2021-06-16add entries for dapmic and ociic; ok kettenisJason McIntyre
2021-06-16Add command line option to show the versionjob
OK claudio@
2021-06-16Ensure that the '-i' command line option and the 'reinit [mbr]'Kenneth R Westerback
editing commnd completely remove any existing on-disk GPT header when writing the MBR. '-ig'/'reinit gpt' must be used to create GPT format. Previous interactions between '-i', '-b' and overly clever 'reinit' produced surprising, inconsistent and incorrect behaviour. ok deraadt@ kettenis@
2021-06-16kqueue: kq_lock is needed when updating kn_statusVisa Hankala
The kn_status field of struct knote is part of kqueue's internal state. When kn_status is being updated, kq_lock has to be locked. This is true even with MP-unsafe event filters. OK mpi@
2021-06-16Actually request classless static routes from the dhcp server; missedFlorian Obser
in previous.
2021-06-16Implement classless static routes dhcp option.Florian Obser
For this we need to be able to handle multiple routes being sent from the engine to the main process as well as to the control tool. The configuration of the various cases (default route, directly connected routes, non-default route via a gateway) was inspired by dhclient's set_routes() and should behave the same way. Tested by Uwe Werler
2021-06-16ociic(4) and dapmic(4)Mark Kettenis
2021-06-16Add ociic(4) and dapmic(4). The first is a driver for the OpenCores I2CMark Kettenis
controller and the latter is a driver for the Dialog DA9063 PMIC. The dapmic(4) driver currently supports the integrated RTC and also provides support for resetting and powering down an application processor. This functionality is used to support rebooting the SiFive Unmatched board. ok deraadt@
2021-06-16don't define __HAVE_ACPI to unbreak radeondrm buildJonathan Gray
found the hard way by matthieu@ ok kettenis@
2021-06-16Minor fixes to option descriptions.Nicholas Marriott
2021-06-16Change the prefix of UVM object functions to match NetBSD's.Martin Pieuchot
For example uvm_objinit() becomes uvm_obj_init(). Reduce differences between the trees and help porting new functions needed for UVM object locking. No functionnal change.
2021-06-16Pass Ctrl keys through as is when given as hex, GitHub issue 2724.Nicholas Marriott
2021-06-15Mop up part of dtls1_dispatch_alert().Joel Sing
The original DTLS code had some strange alert handling code (basically one type of alert included extra data) - a few years later this was "fixed", however the rest of the code was left as is. This means that rather than sending the alert data from send_alert (like ssl3_dispatch_alert() does), we have a local buffer on the stack, which we memset, copy the send_alert bytes into, then send from. ok inoguchi@ tb@
2021-06-15Remove the uvshrink logic and keep the unveil list in the order of insertion.Claudio Jeker
unveil_lookup() is now doing a dumb linear search. The problem with the uvshrink logic was that ps_uvpcwd was a pointer into this array and after compation it pointed to the wrong element. Also future unveil caches would suffer from the same issue. OK semarie@
2021-06-15Use a macro to assert that given uobjs correspond to anonymous objects.Martin Pieuchot
Reduce the difference with NetBSD. ok kettenis@
2021-06-15Unref/free amaps before grabbing the KERNEL_LOCK().Martin Pieuchot
This is possible now that amaps & anons are protected by a per-map rwlock. ok kettenis@, jmatthew@
2021-06-15Filter out packets that are not IPv4. This code came from dhcp programsClaudio Jeker
where this filtering was done in bpf but here vmd needs to make sure to not look at non IPv4 packets. OK florian@ and dv@
2021-06-15use getnsecuptime instead of getmicrouptime.David Gwynne
working on a uint64_t is easier than remembering how timercmp and timersub works. ok jmatthew@
2021-06-15Increase MAXDSIZ to 16GB. ok kettenis@Matthieu Herrb
2021-06-15get the uptime before comparing to it.David Gwynne
"that seems kind of important" jmatthew@
2021-06-15factor out nsecuptime and getnsecuptime.David Gwynne
these functions were implemented in a bunch of places with comments saying it should be moved to kern_tc.c when more pop up, and i was about to add another one. i think it's time to move them to kern_tc.c. ok cheloa@ jmatthew@
2021-06-15rework pfsync deferal timeout handling.David Gwynne
instead of having a timeout per deferred packet structure, use a single timeout in pfsync that pulls items off the list of deferred packets. this avoids confusion about whether a timeout is handling the defer or another context owns it. this way round, the context that removes a defer from the list owns it and is responsible for completing it. this should fix a panic we hit on the firewalls at work. there's still another one that needs a fix, but sashan@ has been looking at it. this might make it simpler to deal with though. ok sashan@ jmatthew@