summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-12-20A NET_LOCK() was is missing in tcp_sysctl() which shows up as splAlexander Bluhm
softnet assert failures. It is better to place the lock into net_sysctl() where all the protocol sysctls are called via pr_sysctl. As calling sysctl(2) is in the slow path, doing fine grained locking has no benefit. Many sysctl cases copy out a struct. Having a lock around that keeps the struct consistent. Put assertions in the protocol sysctls that need it. OK mpi@
2016-12-20In midiread() and midiwrite(), add a second goto label toAlexandre Ratchov
factor calls to mtx_leave() before returning. From Michael W. Bombardieri <mb at ii.net>. Thanks!
2016-12-20Fix many typos. From Michael W. Bombardieri <mb at ii.net>. ThanksAlexandre Ratchov
2016-12-20Simplify the activate() functions of auglx(4), autri(4), andAlexandre Ratchov
auvia(4). From Michael W. Bombardieri <mb at ii.net>. Thanks.
2016-12-20Group identical close_in_jack() and close_out_jack() into a singleAlexandre Ratchov
routine. From Michael W. Bombardieri <mb at ii.net>. Thanks!
2016-12-20Set free(9) size argument. From Michael W. Bombardieri <mb at ii.net>.Alexandre Ratchov
Thanks.
2016-12-20Release the NET_LOCK() before calling any socket function since it isMartin Pieuchot
not recursive. This is temporary until all recursions are found and can be addressed in a correct way. With inputs from bluhm@
2016-12-20Prevent grabing the NET_LOCK() twice in the ioctl(2) and input path.Martin Pieuchot
While here remove two redundant splsoftnet()/splx() dances. inputs and ok bluhm@
2016-12-20Kill recursive splsoftnet()/splx() in tcp_ctloutput().Martin Pieuchot
ok mikeb@, bluhm@
2016-12-20fix use of uninitialised variablesJonathan Gray
ok kettenis@
2016-12-20no need to test if an array is non-NULLJonathan Gray
ok kettenis@
2016-12-20Disable TKIP (WPA1) by default.Stefan Sperling
It is time for this legacy of WEP to die (remember WEP?). The 802.11-2012 standard says: The use of TKIP is deprecated. The TKIP algorithm is unsuitable for the purposes of this standard. TKIP has numerous problems. One of which is that TKIP allows a denial of service attack which can be triggered by any client. Report 2 Michael MIC failures to a TKIP AP to trigger "TKIP countermeasures". The AP is now required by the 802.11 standard to lock everyone out for at least 60 seconds. The network will remain unusable for as long as such MIC failure reports are sent twice per minute. TKIP remains available for interoperability purposes, for now. It must be enabled manually with ifconfig(8). Prompted by discussion with Mathy Vanhoef. ok deraadt@ sthen@ reyk@
2016-12-20Remove duplicate in_ioctl() prototype, it is in in_var.h now.Alexander Bluhm
2016-12-20Kill recursive splsoftnet()/splx() dances in ioctl(2) path.Martin Pieuchot
ok rzalamena@
2016-12-20fix an uninitialised variable on altivec assist trapJonathan Gray
ok krw@ kettenis@
2016-12-20Put a write memory barrier into counters_enter(). This ensuresAlexander Bluhm
that the generation number increment is written before the function returns and anything else is written. OK patrick@ mpi@ dlg@
2016-12-20Call the multicast timer callback per domain instead of for all domainsRafael Zalamena
this way we save doing big tables walk and iterating tables that we don't need to. ok mpi@
2016-12-20No need for splsoftnet()/splx() dance around a pool_put() if the poolMartin Pieuchot
has IPL_SOFTNET as ipl. ok mikeb@, kettenis@
2016-12-20Remove unused timeout that was never being set.Rafael Zalamena
ok reyk@
2016-12-20Fix operand of pushq instruction; clang's integrated assembler is lessMark Kettenis
forgiving than gas and insists that we use a 64-bit integer. No binary change. ok mlarkin@
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.