summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-12-19Implement interface detachingMike Belopuhov
2016-12-19Add experimental support for device hot-pluggingMike Belopuhov
We're installing watches on all nodes under "device/" and re-scan the subtree every time the watch is triggered looking for changes in the output. Tested with xnf(4) and xbf(4), helpful hints from Roger Pau Monne, thanks!
2016-12-19Generating mixed 16-bit/32-bit/64-bit code with clang's integratedMark Kettenis
assembler is a bit tricky. It supports the .code16, .code32 and .code64 directives. But it doesn't know about the data16/data32 and addr16/addr32 instruction prefixes. Instead it tries to determine those from the instruction opcode. It mostly succeeds, but there are a couple of corner cases where clang will generate the "addr32" form where gas generates the "addr16" form in .code16 segments. That should be no problem (and just waste a couple of bytes), but it makes comparing the generated code a bit difficult. Allow the trampoline code to be compiled with both. For clang #define away the addr32 prefix and avoid using the data32 prefix by using a mnemonic that explicitly encodes the size of the operand. Add a few addr32 prefixes in .code16 blocks to reduce the differences between code generated by clang and gas. ok patrick@, deraadt@, mlarkin@
2016-12-19Stop mentioning splsoftnet() in comments, it's almost history.Martin Pieuchot
2016-12-19Kill useless comment about splsoftnet() which is going away.Martin Pieuchot
2016-12-19Sending keep alive ends up in ip_output(), so it needs the NET_LOCK().Martin Pieuchot
ok bluhm@
2016-12-19Assert that IPL_SOFTNET is needed rather than calling splsoftnet()Martin Pieuchot
recursively. ok bluhm@
2016-12-19Remove redundant splsoftnet().Martin Pieuchot
ok bluhm@
2016-12-19Timer sending packets need to grab the NET_LOCK().Martin Pieuchot
ok bluhm@
2016-12-19Kill unused function.Rafael Zalamena
ok mpi@
2016-12-19Remove a recursive splsoftnet() in in_ioctl() that already asserts thatMartin Pieuchot
it is called at IPL_SOFTNET.
2016-12-19If rt_ifa_addlocal() in in_ifinit() fails, the address has beenAlexander Bluhm
added to the interface address list, but the local route is missing. This inconsistency could result in a "ifa == rt->rt_ifa" assertion panic later. So in case of a route add error, remove the interface address to get a consistent state again. OK stsp@ mpi@
2016-12-19Adjust Makefile to gain improvements that were made in other archsPatrick Wildt
already. This means for example dropping -Wno-format or adding -g by default. Prompted by jsg@
2016-12-19Fix debug printf format and arguments.Patrick Wildt
Found by and input from jsg@
2016-12-19Extend the multicast sockets and multicast hash table support to multipleRafael Zalamena
domains. This is one step towards supporting to run more than one multicast socket in different domains at the same time. ok mpi@
2016-12-19Introduce the NET_LOCK() a rwlock used to serialize accesses to the partsMartin Pieuchot
of the network stack that are not yet ready to be executed in parallel or where new sleeping points are not possible. This first pass replace all the entry points leading to ip_output(). This is done to not introduce new sleeping points when trying to acquire ART's write lock, needed when a new L2 entry is created via the RT_RESOLVE. Inputs from and ok bluhm@, ok dlg@
2016-12-19fix uninitialised variable warnings from clangJonathan Gray
ok patrick@
2016-12-19remove redundant return statementsJonathan Gray
ok patrick@
2016-12-19ansify function declaration; better whitespacePatrick Wildt
2016-12-19Fix an off by one when saving and restoring an array of registers.Jonathan Gray
ok patrick@
2016-12-18Consolidate bus space tags into generic bus space code. EspeciallyPatrick Wildt
considering we don't have a separate iobus and the a4x iobus wasn't even compiled it does not make sense to declare those in iobus. Improves code readability as well.
2016-12-18Include sys/proc.h when compiled with SYSCALL_DEBUG to get access toPatrick Wildt
struct proc. Also bump the printf of "code" to %ld and remove a few casts to long as register_t is always long. ok kettenis@
2016-12-18Use %zu/%d to print size_t/ssize_t. Cast recno_t (a.k.a. u_int32_t)Kenneth R Westerback
to (unsigned long) to match %lu formats. Makes gcc happier and quieter. ok deraadt@
2016-12-18Adjust OpenBSD/arm64 files with FreeBSD origin to show the upstreamPatrick Wildt
revision. Prompted by mikeb@.
2016-12-18Remove comparison of array which is always non-NULL. Fixes clang warning.Mark Kettenis
ok jca@ (a while back)
2016-12-18Adjust OpenBSD/arm64 files with FreeBSD origin to show the upstreamPatrick Wildt
revision. While there, update a few of those files. Prompted by mikeb@.
2016-12-18Add cast to mask and shift macros to silence warnings generated by clang.Mark Kettenis
ok millert@
2016-12-18While copying out channel flags to userspace, omit the HT channel flag ifStefan Sperling
we're not in 11n mode. This will allow tcpdump to show the mode correctly. ok mpi@
2016-12-18Set the maximum TKIP countermeasure timeout to 90 seconds instead of 120.Stefan Sperling
Waiting more time does not buy us anything and makes a denial of service a tiny bit easier. Suggested by Mathy Vanhoef.
2016-12-17Import of OpenBSD/arm64Patrick Wildt
This commit contains all the kernel files related to the OpenBSD/arm64 port. It is based on the PowerPC pmap, loongson, arm/armv7 code and FreeBSD aarch64 code. Hard work done by Dale Rahn.
2016-12-17Don't crash while sending a TKIP MIC failure report to the AP.Stefan Sperling
Client-side bug found while investigating TKIP countermeasures.
2016-12-17Complete our half-done implementation of TKIP countermeasures in hostap mode.Stefan Sperling
The previous code would disable the AP until next reboot upon MIC failure. Instead, disable the AP for 60 seconds, as required by the 802.11 standard. I randomly added a bit of time (up to 120 seconds total) just because we can. Problem reported by Mathy Vanhoef, thanks! ok deraadt@ random input reyk@
2016-12-17Insert RTF_CLONED routes at a higher priority than their partent toMartin Pieuchot
prevent a mpath conflict for /32 RTF_CLONING routes. Found the hardway by jsing@ on Google Compute Engine. ok bluhm@, jsing@
2016-12-17Fix IO clock speed and system reset on Octeon III.Visa Hankala
2016-12-17There is no RTC on Shasta, so do not attach the driver.Visa Hankala
2016-12-17Make Octeon model strings a bit more specific. While there,Visa Hankala
add CN70xx/CN71xx.
2016-12-17On some systems, the firmware advertises multiple tiny and disjointVisa Hankala
regions of free memory whose size is no more than a few page frames. Ignore them in order not to clutter uvm with fragments.
2016-12-17Add new device xp(4), preliminary support for LUNA's I/O processor.Kenji Aoyama
This is a straightforward port of NetBSD/luna68k by Izumi Tsutsui(*), and makes LUNA's I/O auxiliary processor (called XP, actually HD647180) possible to load and run programs. (*): http://mail-index.netbsd.org/source-changes/2016/12/03/msg079493.html
2016-12-16When running on Azure, the initial timesync "sync" message is not correct,Reyk Floeter
ignore it and only use the timesync "sample" messages. OK mikeb@
2016-12-16Move the if_get/if_put to the caller of igmp_sendpkt so we avoid havingRafael Zalamena
to do this lookup twice. Suggested by and ok mpi@
2016-12-16Provide the "machdep.lidsuspend" sysctl on Loongson.Frederic Cambus
OK visa@
2016-12-15Remove rasops2 (2-bit color depth) functions, they are unused.Frederic Cambus
It seems unlikely that any future new platform will ever need them. OK mpi@
2016-12-15Regen usbdevsPaul Irofti
2016-12-15Add Intel Bluetooth devices found on x250 and x260 Thinkpads.Paul Irofti
2016-12-15fix build when DIAGNOSTIC is not definedJonathan Gray
ok mikeb@
2016-12-14Make 'route add default' show a nicer error message if the providedStefan Sperling
gateway is not reachable (e.g. not on a local subnet). ok millert@ mikeb@ mpi@ (and shrugs by jca@)
2016-12-14Kill compat for old VNDIOCSET; ok deraadt@Jeremie Courreges-Anglas
2016-12-14Set the rtableid for new mbufs when sending packets in igmp_sendpkt().Rafael Zalamena
ok mikeb@, phessler@
2016-12-14Various typos and minor cleanupMike Belopuhov
2016-12-14Add the TSC timecounter and use it on Skylake machines where the HPETReyk Floeter
is too slow and the invariant TSC more accurate. The commit includes joint work by mikeb@ kettenis@ and me; tested for some time by a large group of volunteers. OK mikeb@ kettenis@