summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2021-11-26The IORT table usually only contains single mappings. While on the LX2K therePatrick Wildt
is a non-single mapping for the networking subsystem, we don't yet have support for it and apparently Linux has trouble with it as well. So for now we can remove the code, because it uses an uninitialized variable and there's no easy way to fix it without re-thinking the concept. The code got there in the first place because it's a copy of the same pattern in our other IOMMU code. ok jsg@
2021-11-26avoid clang -Wsometimes-uninitialized warning when DDB is not definedJonathan Gray
ok kettenis@ visa@
2021-11-26avoid clang -Wsometimes-uninitialized warning when MULTIPROCESSOR is notJonathan Gray
defined feedback from millert@, ok kettenis@, mips64 diff from and ok visa@
2021-11-26Add interfaces to enable all power domains for a node.Mark Kettenis
ok patrick@, visa@
2021-11-26Mark exit1() and sigexit() as non-returningVisa Hankala
The late 1990s reasons for avoiding __dead with exit1() should not apply with the current compilers. This fixes compiler warnings about uninitialized variables in trap.c on mips64. Discussed with guenther@ and miod@
2021-11-25move label to fix RAMDISKTheo de Raadt
2021-11-25revert recent change, breakage reported by dv@Anton Lindqvist
2021-11-25Prepare iwx(4) for using new firmware (API version -67) in the future.Stefan Sperling
Bump command versions array size as required for -67 firmware. Ignore new TLVs found in -67 images. Add room for another ucode section needed for -67 on AX201 devices.
2021-11-25Implement reference counting for IPsec tdbs. Not all cases areAlexander Bluhm
covered yet, more ref counts to come. The timeouts are protected, so the racy tdb_reaper() gets retired. The tdb_policy_head, onext and inext lists are protected. All gettdb...() functions return a tdb that is ref counted and has to be unrefed later. A flag ensures that tdb_delete() is called only once. Tested by Hrvoje Popovski; OK sthen@ mvs@ tobhe@
2021-11-25Assert that at least one report id is claimed during multiple report idsAnton Lindqvist
attachment. Should prevent uhidev drivers from doing the wrong thing in their corresponding match routine.
2021-11-24Spacing and remove an unused macro.Marcus Glocker
2021-11-24SpacingMarcus Glocker
2021-11-24Fix panic when running utvfu(4) on xhci(4).Marcus Glocker
tested and ok ian@
2021-11-24When sending ICMP packets for IPsec path MTU discovery, the firstAlexander Bluhm
ICMP packet could be wrong. The mtu was taken from the loopback interface as the tdb mtu was copied to the route too late. Without crypto task, ipsp_process_packet() returns the EMSGSIZE error earlier. Immediately update tdb and route mtu. IPv4 part from markus@; OK tobhe@
2021-11-24Fix type of count.Visa Hankala
2021-11-24Simplify arithmetics on the main path.Visa Hankala
2021-11-24Remove unneeded <sys/stdarg.h>.Visa Hankala
OK guenther@
2021-11-24Refactor postsig_done(). Pass the catchmask and signal reset flag to theClaudio Jeker
function. This will make unlocking cursig() & postsig() a bit easier. OK mpi@
2021-11-24Minor code cleanup. Move a comment to the right place, move a functionClaudio Jeker
to get a better order of functions. Also reduce the size of sigprop to NSIG from NSIG+1. NSIG is defined as 33 and so includes the extra element for this array. OK mpi@
2021-11-24Add a few dt(4) TRACEPOINTS to SMR. Should help to better understand whatClaudio Jeker
goes on in SMR. OK mpi@
2021-11-23Use system uptime not UTC time to calculate PPPoE session durationKlemens Nanni
Systems without RTC are likely to boot with wrong time, but pppoe(4) used microtime(9) anyway to remember when a new session began. (In)adequately, ifconfig(8) used gettimeofday(2) and calculated the difference between two absoloute dates to infer the PPPoE session duration. This goes off the rails if the wall clock jumps in between, e.g. due to NTP kicking in. Use getmicrouptime(9) and clock_gettime(2)/CLOCK_BOOTTIME instead to rely on the monotonically increasing system uptime instead to fix this. Reported and tested by Peter J. Philipp <pjp AT delphinusdns DOT org> on some octeon box without RTC. I've seen this on a Edgerouter 4 as well (2m uptime, 19d session). OK claudio
2021-11-23Fix mbuf leaks after reception error in rge_rxeof().Kevin Lo
Being that rge(4) is derived from re(4) it looks like it has the same issues as fixed in re(4) rev 1.211. From Brad ok gnezdo@
2021-11-23limit a variable to the scope inside #ifdef where it is usedTheo de Raadt
2021-11-23avoid clang -Wsometimes-uninitialized warnings in fms(4)Jonathan Gray
feedback and ok millert@
2021-11-22use ISC license for ubcmtpJoshua Stein
2021-11-22Enable iicmux(4) and pcyrtc(4).Mark Kettenis
2021-11-22Add pcyrtc(4), a driver for the NXP PCF85063A/TP RTC chips.Mark Kettenis
ok patrick@
2021-11-22Remove unused header files and make some cosmetic changes.Mark Kettenis
ok patrick@
2021-11-22Hack alert! Apple M1 systems still don't work with an MP kernel.Mark Kettenis
In order to make progress (and protect myself from things dumping cores left and right when I run sysupgrade) abuse the hw.smt mechanism to only schedule processes on the primary CPU. ok deraadt@, patrick@
2021-11-22Revert poll(2) back to the original implementationVisa Hankala
The translation to and from kqueue still has major shortcomings. Discussed with deraadt@
2021-11-22Translate POLLNVAL in ppollcollect()Visa Hankala
This makes the kqueue-based poll(2) behave more similarly to the old code when a monitored file descriptor is closed by another thread. OK mpi@
2021-11-22Let futex_wait() run without kernel lockVisa Hankala
The KERNEL_LOCK() is no longer necessary with rwsleep() and PCATCH because the sleep machinery now does the locking internally. OK mpi@
2021-11-22avoid uninitialised variable use in igc(4)Jonathan Gray
read icr reg before testing bit in result add missing block in rxeof from ix ok kevlo@ patrick@
2021-11-22Copy code from ip_forward() to ip6_forward() to fix Path MTU discoveryAlexander Bluhm
in IPsec IPv6 tunnel. Implement sending ICMP6 packet too big messages. Also implement the pf error case in ip6_forward(). While there, do some cleanup and make the IPv4 and IPv6 code look similar. OK tobhe@
2021-11-22move PFR_TFLAG_CONST test, missed in rev 1.138Jonathan Gray
prompted by uninitialised var found by bluhm@ running regress on sparc64 ok sashan@
2021-11-22vmm(4): copyout guest state on VM_EXIT_NONEDave Voutila
Partly related to a bug reported by kn@. We should be copying out the guest exit state (including registers) when we succesfully return from the vcpu run loop even if we don't require an emulation assist from userland/vmd(8). This condition was introduced when I removed the use of yield() and instead exit the kernel if the scheduler says we've hogged the cpu. ok mlarkin@
2021-11-22M_USB -> M_USBHCMarcus Glocker
2021-11-22Drop the old problematic claim multiple report ids logic now that allAnton Lindqvist
uhidev drivers have been fixed.
2021-11-22Add missing claim multiple report ids conditionals to uhidev drivers.Anton Lindqvist
2021-11-22Make iwx(4) update an Rx BA session's last_rx timestamp when a frameStefan Sperling
is received which matches the session. Same change as just made in iwm(4).
2021-11-22Make iwm(4) update an Rx BA session's last_rx timestamp when a frameStefan Sperling
is received which matches the session. Tested by myself and bket@
2021-11-22Let iwx(4) use per-Tx-queue interface timers to ensure that the interfaceStefan Sperling
watchdog will trigger a device timeout if a particular Tx queue gets stuck while other Tx queues keep working. The Linux driver is using a similar workaround for "stuck queues". Tested by myself and jmc@
2021-11-22In iwx(4), fix off-by-one errors during TID value bounds checks.Stefan Sperling
The TID is used as an array index and, according to the Linux driver, must be smaller than IWX_MAX_TID_COUNT (8). The AP might request an Rx aggregation session using TID 8. Our driver uses the TID as an index into an array of IEEE80211_NUM_TID (16) elements, and hence would not crash. However, the index is exposed to firmware which could potentially crash or raise an assertion failure for values >= 8. ok kettenis@
2021-11-22Fix iwx(4) Tx ring array size which was one entry too short.Stefan Sperling
Fortunately, this bug was harmless. The last Tx agg queue is never used because ieee80211_classify() only returns TID values in the range 0 - 3. And iterations over the txq array use nitems() to find the upper bound. The possiblity of shrinking the txq array by 4 elements to get rid of unused Tx agg queues could be investigated later. For now, just fix the off-by-one error. ok kettenis@
2021-11-22Let iwm(4) resume directly in DVACT_WAKEUP instead of running the init task.Stefan Sperling
Same change as made for iwx(4) some time ago. tested by myself and bket@
2021-11-22Align memory allocation for USB device drivers and USB HC drivers:Marcus Glocker
* USB device drivers use M_USBDEV instead of M_DEVBUF. * USB HC drivers use M_USBHC instead of M_DEVBUF. In a vanilla setup, this enlarges the USB memory pool. ok anton@
2021-11-22avoid clang -Wsometimes-uninitialized warning with SMALL_KERNELJonathan Gray
2021-11-21correct the vnd-on-vnd dev_t test, and avoid leaking a cred in anTheo de Raadt
obscure condition ok tb
2021-11-21Add the new `ipsec_exctdb' ipsec(4) counter to count and expose to theVitaliy Makkoveev
userland the TDBs which exceeded hard limit. Also the `ipsec_notdb' counter description in header doesn't math to netstat(1) description. We never count `ipsec_notdb' and the netstat(1) description looks more appropriate so it's used to avoid confusion with the new counter. ok bluhm@
2021-11-21Add iicmux(4), a driver that switches between I2C busses connected toMark Kettenis
a single I2C controller by using the pin muxing facilities of an SoC. ok visa@