summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2017-06-03Avoid printing garbage when aborting a program that tries to use aTheo Buehler
prohibited sysctl. ok deraadt
2017-06-02Perform grant table page allocation outside of the table mutexMike Belopuhov
witness(4) has found that km_alloc will trigger an rw_enter via uvm_map and vm_map_lock. While rw_enter is called with RW_SLEEPFAIL, there's also an msleep in there, so it's easier to avoid getting in the middle of that.
2017-06-02regenMark Kettenis
2017-06-02Intel HD Graphics 510.Mark Kettenis
2017-06-02Scale the missed beacon counter threshold to the AP's beacon interval.Stefan Sperling
This should make fading APs time out consistently regardless of what the beacon interval is set to (range is 1 to 2^16 TU, though in practice 100 TU seems to be a common value). Print the beacon interval and missed beacon counter threshold to dmesg if the DEBUG flag was set on the wireless interface with ifconfig(8). This should help with diagnosing any issues that pop up. Requested and diff eye-balled by kettenis@ help & ok tb@ phessler@
2017-06-02Remove a bogus run_read() call about getting MAC version.Kevin Lo
ok stsp@
2017-06-02typo; meant to say locore0.STheo de Raadt
2017-06-02When iwm(4) firmware reports missed beacons, send a probe request onlyStefan Sperling
if ic_mgt_timer indicates that we're not already waiting for a response. Fixes a flood of probe requests sent out while the interrupt kept firing. Also, byteswap the missed beacon counter value when reading it. ok mpi@
2017-06-02When iwn(4) firmware reports missed beacons, send a probe request onlyStefan Sperling
if ic_mgt_timer indicates that we're not already waiting for a response. Fixes a flood of probe requests sent out while the interrupt kept firing. Also, read the missed beacon counter value after DMA sync. ok mpi@
2017-06-02Attach the xhci(4) FDT driver to the generic-xhci compatible as well.Patrick Wildt
2017-06-02handle 64bit dva in the tx path as well as the rx path.David Gwynne
2017-06-02only update the tx descriptors high address if it changes.David Gwynne
this should effectively double (or restore?) the number of packets that can be fit on the tx ring. tested on an od1000.
2017-06-02be less tricky about when ifq_free is handled.David Gwynne
instead of assuming start routines only run inside the ifq serialiser, only rely on the serialisation provided by the ifq mtx which is explicitly used during ifq_deq ops. ie, free the mbufs in ifq_free at the end of ifq_deq ops instead of in the ifq_serialiser loop. ifq deq ops arent necessarily called within the serialiser. this should fix panics caused by fq codel on top of bce (which calls bce_start from it's tx completion path instead of ifq_restart). ok mikeb@
2017-06-01reorder ops in sk_start to avoid possibly rolling back ifq_deq.David Gwynne
instead of checking for space after beggining to deq a packet, check for space before committing to handling a packet. this means we can use ifq_dequeue instead of ifq_deq_begin/commit/rollback. this is a port of src/sys/dev/pci/if_sk.c r1.187, but tweaked to account for msk using twice the tx ring descriptors thanks to its annoying support for 64bit addresses. tested on an od1000 ok jmatthew@ sthen@
2017-06-01reorder ops in sk_start to avoid possibly rolling back ifq_deq.David Gwynne
instead of checking for space after beggining to deq a packet, check for space before committing to handling a packet. this means we can use ifq_dequeue instead of ifq_deq_begin/commit/rollback. ok mikeb@
2017-06-01Pass the correct dma tag to the load buffer function. Passing t onlyPatrick Wildt
passes the tag where the pointer to the simplebus_dmamap_load_buffer() wrapper is stored in. We want to call the load buffer function that was passed from our parent device, so we have to pass the parent's tag. Otherwise we end up in a recursive and neverending loop. This only occurs when a simplebus attaches to a simplebus, which we apparently didn't have so far.
2017-06-01Return time_uptime as value for when pf was enabled instead ofPatrick Wildt
time_second. Since time_second changes depending on the wall- clock time, time_second is not a reliable source for the status. We can even end up with a negative time delta. Thus, use the monotonically growing time_uptime and export it to userland. ok bluhm@ mikeb@
2017-06-01Don't panic when we cannot locate a handle for the Serial IO protocol.Patrick Wildt
Fixes reports on tech and in private. ok yasuoka@ stsp@
2017-06-01Sync with amd64 and allow building the i386 bootstrap with clang:Christian Weisgerber
* build with -ffreestanding * skip the integrated assembler for assym.h * use as(1) to build biosboot.S and the various versions of srt0.S ok kettenis@
2017-06-01Defering some processing to the soft-interrupt handler introduced aMartin Pieuchot
race. Revert for now. Issue found by claudio@.
2017-05-31Split early startup code out of locore.S into locore0.S. Adjust linkTheo de Raadt
run so that this locore0.o is always at the start of the executable. But randomize the link order of all other .o files in the kernel, so that their exec/rodata/data/bss segments land all over the place. Late during kernel boot, unmap the early startup code. As a result, the internal layout of every newly build bsd kernel is different from past kernels. Internal relative offsets are not known to an outside attacker. The only known offsets are in the startup code, which has been unmapped. Ramdisk kernels cannot be compiled like this, because they are gzip'd. When the internal pointer references change, the compression dictionary bloats and results in poorer compression. ok kettenis mlarkin visa, also thanks to tedu for getting me back to this
2017-05-31Implement support for missed beacon notifications in iwn(4).Stefan Sperling
Works with WIFIonICE. ok phessler@
2017-05-31Add support for EV_RECEIPT and EV_DISPATCH flagsMike Belopuhov
From FreeBSD via Jan Schreiber <jes at posteo ! de>, thanks! OK tedu, bluhm
2017-05-31another place to use ieee80211_min_basic_rate() to select the minimum tx ratePeter Hessler
OK stsp@
2017-05-31Use mbuf_queue to properly serialize access to pflow output queue.Visa Hankala
Input from mpi@, jmatthew@; OK mpi@, henning@, benno@
2017-05-31add ieee80211_min_basic_rate() to iwm(4), to select the lowest availablePeter Hessler
datarate for management frames based on revs 1.187 and r 1.188 from iwn(4) OK stsp@
2017-05-31Block IPv6 packets in pf(4) that have hop-by-hop options header orAlexander Bluhm
destination options header. Such packets can be passed by adding "allow-opts" to the rule. So IPv6 options are handled like their counterpart in IPv4 now. tested by benno@; OK henning@
2017-05-31The net80211 stack was providing a 'beacon miss timeout' value (in ms)Stefan Sperling
which specified how much time may elapse without beacons before drivers begin searching for a new AP. Drivers convert this timeout value into the amount of beacons they're allowed to miss. Having the stack provide this number upfront simplifies things. ok mpi@
2017-05-31virtio_pci: Support IPL_MPSAFE interrupt handlersStefan Fritsch
2017-05-31new socketoption SO_ZEROIZE: zero out all mbufs sent over socketMarkus Friedl
ok deraadt bluhm
2017-05-31Add serial console support for efiboot.YASUOKA Masahiko
2017-05-31Add missing function prototype for iwm_rx_bmiss().Stefan Sperling
2017-05-31Disable "machine boot" and "machine comaddr" from efiboot.YASUOKA Masahiko
2017-05-31Implement support for iwm(4) firmware's missed beacon notification.Stefan Sperling
Requested by deraadt@ ok mpi@
2017-05-31Optimize virtio_enqueue_trim() a bit by nuking unneededKenneth R Westerback
re-initializations of statically set fields. Move a common chunk out of both clauses of if/else. No intentional functional change. ok sf@
2017-05-31make a copy of the first EV_SET argument to prevent multiple evaluation.Ted Unangst
matches freebsd, fixes lldb. from Kamil Rytarowski at NetBSD. while here, make the same change to KNOTE. ok deraadt
2017-05-31Move IPv4 & IPv6 incoming/forwarding path, PIPEX ppp processing andMartin Pieuchot
IPv4 & IPv6 dispatch functions outside the KERNEL_LOCK(). We currently rely on the NET_LOCK() serializing access to most global data structures for that. IP input queues are no longer used in the forwarding case. They still exist as boundary between the network and transport layers because TCP/UDP & friends still need the KERNEL_LOCK(). Since we do not want to grab the NET_LOCK() for every packet, the softnet thread will do it once before processing a batch. That means the L2 processing path, which is currently running without lock, will now run with the NET_LOCK(). IPsec isn't ready to run without KERNEL_LOCK(), so the softnet thread will grab the KERNEL_LOCK() as soon as ``ipsec_in_use'' is set. Tested by Hrvoje Popovski. ok visa@, bluhm@, henning@
2017-05-31add some details relating to SATA device power managementJonathan Matthew
part of a diff from Imre Vadasz via sf@
2017-05-31fix SATA_SStatus_DET_OFFLINE value and add newer SStatus bitsJonathan Matthew
from Imre Vadasz via sf@
2017-05-31make vlan use their parents lladdr all the time, not just when theyre up.David Gwynne
krw@ has been having issues with dhclient on vlan interfaces because i made them only configure the lladdr when they were brought up. dhclient likes to read the mac address and then bring them up. this makes vlan copy the parents lladdr onto the vlan interface when the parent is configured. this probably helps with v6 addresses on vlan interfaces too. the new code still supports configuring a custom lladdr on a vlan interface. this can be done both before and after a parent is configured, and if a parent is removed. while here, if the parent is reconfigured while the vlan is up, dont error if the new parent is the same as the current one. this should make running netstart again less noisy. ok krw@
2017-05-31avoid going outside array boundsJonathan Gray
ok krw@ deraadt@
2017-05-31Add support for Ralink RT5360. From Kevin Lo who tested with aJonathan Gray
D-Link DWA-525 rev A2.
2017-05-31regenJonathan Gray
2017-05-31Add Ralink RT5360. From Kevin Lo.Jonathan Gray
2017-05-31make the AES-XTS mode a little more constant-time, though the AESDamien Miller
implementation that it depends on currently isn't. ok mikeb tom
2017-05-30Allow building the bootstrap with clang:Christian Weisgerber
* skip the integrated assembler for assym.h * use as(1) to build biosboot.S and the various versions of srt0.S ok deraadt@
2017-05-30remove no longer needed splnet/splx.Sebastian Benoit
ok florian@
2017-05-30Use the CD bit (Cursor Disable) in the cursor start register to properlyFrederic Cambus
disable hardware cursor. From NetBSD. OK deraadt@
2017-05-30event injection framework, will be used for other features coming shortlyMike Larkin
ok deraadt
2017-05-30sizes for free()Theo de Raadt
ok henning