summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2017-06-25lld's linker-script parser has to be fixed to accept ; after LONG()Theo de Raadt
directives. binutils requires it, and binutils is the authoritative parser in this regard. This means arm64 +lld remains broken (but all the other architectures work)
2017-06-25dull dependency for copying makegap.sh to obj, so that installsTheo de Raadt
without src and comp work. That is what we've designed for, but since we always have src and comp on our systems it is so easy to slide... problem first noted by rpe.
2017-06-25ldd is more strict wrt semicolons, they can only appear after anOtto Moerbeek
expression line. Removing the extra semicolons makes both ld and ldd accept the link script generated, although ldd produces a wrong object file on arm64; ok kettenis@ deraadt@
2017-06-24To avoid packet loss due to reuse of the 16 bit IPv4 fragment id,Alexander Bluhm
we need suitable data structures. Organize the pf fragments with two red-black trees. One is holding the address and protocol information and the other has only the fragment id. This will allow to drop fragemts for specific connections more aggressively. ` from markus@; OK sashan@
2017-06-23Event interrupt handler should call hv_channel_schedule nowMike Belopuhov
2017-06-23Request deferred interrupt processingMike Belopuhov
2017-06-23Introduce deferred interrupt processing capabilityMike Belopuhov
Hyper-V interrupts seem to be sometimes delivered before the message becomes available on the channel ring. This is reproducible on hvs(4) under load. This change is modelled on the workaround found in the Linux driver.
2017-06-23s/membar_sync/virtio_membar_sync/Mike Belopuhov
2017-06-23Finish up minor changes in the output and clear the BATCHED channel flagMike Belopuhov
2017-06-23- Fix Tx queues to USB endpoints mapping and merge urtwn_r92c_dma_init()Kevin Lo
and urtwn_r88e_dma_init() into one; from FreeBSD r291902. - Change the way the number of pages for public queue is calculated; Based on the vendor driver's _InitQueueReservedPage(), the formula for calculation of the number of pages for public priority queue is as follows: if the device has 3 endpoints: PUBQ = total number of Tx pages - HQ - LQ - NQ if the device has 2 endpoints (i.e. has high and normal priority queues): PUBQ = total number of Tx pages - HQ - NQ - Don't write MCS8..MCS15 Tx power if the WNIC is a 1-stream Tx; - Set R88E_TX_PAGE_COUNT to a correct value; - Minimal enhancement in urtwn_open_pipes() for upcoming rtl8192eu chipset support; Tested with USB-N10 Nano (rtl8188cu), DWA-131 rev B (rtl8192cu), and TL-WN725N v2 (rtl8188eu) on amd64. ok stsp@
2017-06-23Resetting the mbuf header in if_input_local() was stripping off theAlexander Bluhm
M_LOOP flag. This broke IPv6 multicast. Always set M_LOOP when going through if_input_local() and adjust the flag's comment. report rzalamena@; OK mpi@
2017-06-23Unbreak profiling assembly functions in userland by defining theMartin Pieuchot
correct prologue if compiled with -DPROF. ok deraadt@
2017-06-23set the alignment of the per cpu cache structures to CACHELINESIZE.David Gwynne
hardcoding 64 is too optimistic.
2017-06-23change the semantic for calculating when to grow the size of a cache list.David Gwynne
previously it would figure out if there's enough items overall for all the cpus to have full active an inactive free lists. this included currently allocated items, which pools wont actually hold on a free list and cannot predict when they will come back. instead, see if there's enough items in the idle lists in the depot that could instead go on all the free lists on the cpus. if there's enough idle items, then we can grow. tested by hrvoje popovski and amit kulkarni ok visa@
2017-06-22Generate a gap.link script, and use that to generate gap.o. On multi-ABITheo de Raadt
architectures we must also link against a gapdummy.o to repair the ABI of the resulting .o file. Woe is me. Also repair install: target to update the linkkit & hash when a kernel is installed. ok rpe tb mlarkin and tested by others also
2017-06-22calculate a "sum" based upon pointers to functions all over the kernel,Theo de Raadt
so that an unhibernate kernel can detect if it is running with the kernel it booted. ok mlarkin
2017-06-22Improve the coalescing of instruction cache flushes on R8000 in orderVisa Hankala
not to perform redundant work. There is no direct way to flush the cache; rather, the kernel evicts unwanted bits from the cache by executing a block of instructions, which is expensive. With this diff, make build time decreases about 0.4%. Diff from miod@
2017-06-22Tidy up comment about double load opcodes in m88k/eh_common.S (and fix ;; -> ||)Tom Cosgrove
ok miod@
2017-06-22Fix the remaining ';;'s in sys/Tom Cosgrove
2017-06-22Add a hypervisor-specific function pointer in pvbus(4) that gets called duringJonathan Matthew
cpu_hatch() on each cpu, allowing initialization of per-cpu features on each cpu as it starts up. input from reyk@ and mikeb@ ok mikeb@
2017-06-22Fix another ;; in sys/devTom Cosgrove
2017-06-22double ;;. xhci one found by geoffhillTheo de Raadt
2017-06-22Only print the magic '&' letter on a disk if the hibernate partition isTheo de Raadt
valid. This is an undocumented little debugging diagnostic, much like the '*'.
2017-06-21Better off padding with 0x0. 0x0 = "break 0,0".Theo de Raadt
(BTW, the binutils disasm cannot handle that instruction with those parameters, because the decoder logic is wrong..)
2017-06-21Fill space between sections with traps, rather than nops.Theo de Raadt
2017-06-21Don't confuse SCSI command status and transfer error code.Mike Belopuhov
While here, make SCSI command completion routine more robust.
2017-06-21Permit TIOCSTAT on a tty.Theo de Raadt
2017-06-21Return early from NVS command submission if no response is requiredMike Belopuhov
2017-06-21Fix kernel diagnostic assertion "(sk->inp == NULL) || (sk->inp->inp_pf_skAlexander Bluhm
== NULL)". The problem was that setting the inp pointer in the statekey to NULL was delayed until the statekey refcounter reached 0. So the inp could get linked to another statekey while an mbuf in the socket buffer was keeping the refcounter at 1. Set the statekey inp pointer to NULL in pf_state_key_detach() immediately, then the kassert can be even stricter. OK sashan@
2017-06-21Include the request id in the I/O debug outputMike Belopuhov
2017-06-20use [] instead of * for reaching regions to unmap, making this moreTheo de Raadt
similar to smashing versions written by visa
2017-06-20In ddb print socket bit field so_state in hex to match SS_ defines.Alexander Bluhm
2017-06-20Check the validity of the `qtd' pointer after each interrupt caseVisa Hankala
and bail out if the pointer has become invalid. This prevents use-after-free memory accesses that corrupted the dwc2qtd pool. This fix improves stability on the Raspberry Pi 3. From Linux commit dc8730846948e517169f630826cd2c97615f5ee8 OK kettenis@
2017-06-20Do not touch file pointers for which FILE_IS_USABLE() is false.Gerhard Roth
They're might not be fully constructed. ok mpi@ deraadt@ bluhm@
2017-06-20Remove the IWM_FLAG_HW_INITED flag from iwm(4). This flag was redundant.Stefan Sperling
The IFF_RUNNING flag in struct ifnet serves the same purpose. ok mpi@ kettenis@ deraadt@
2017-06-20Initialize the link state of a wireless interface to DOWN when theStefan Sperling
interface is attached to the net80211 layer. Prevents confusion in cases where drivers forget to initialize the link state. ok mpi@ kettenis@
2017-06-20Fix a couple of comment typos in amd64 and i386 biosvar.hTom Cosgrove
2017-06-20Do not use the interface pointer after if_put(). Rename ipip_input_gif()Alexander Bluhm
to ipip_input_if() and always pass the ifp. Only dump the packet to bpf if we are called with a gif(4) interface. OK mpi@
2017-06-20Convert sodidle() to timeout_set_proc(9), it needs a process contextMartin Pieuchot
to grab the rwlock. Problem reported by Rivo Nurges. ok bluhm@
2017-06-20Remove KERNEL_LOCK() asserts.Martin Pieuchot
pf table code iterates on a radix tree and currently relies on the NET_LOCK() to do the serialization. Found the hardway by jasper@
2017-06-20remove some magic numbers in the flush-by-asid code and check if the CPUMike Larkin
supports that feature before we try to use it. discussed with deraadt
2017-06-20SVM: better cleanbits handling. Fixes an issue on Bulldozer CPUs causingMike Larkin
#TF exceptions during guest VM boot ok brynet
2017-06-19dynamically scale the size of the per cpu cache lists.David Gwynne
if the lock around the global depot of extra cache lists is contented a lot in between the gc task runs, consider growing the number of entries a free list can hold. the size of the list is bounded by the number of pool items the current set of pages can represent to avoid having cpus starve each other. im not sure this semantic is right (or the least worst) but we're putting it in now to see what happens. this also means reality matches the documentation i just committed in pool_cache_init.9. tested by hrvoje popovski and amit kulkarni ok visa@
2017-06-19As early as possible, create a link /bsd.booted to the /bsd kernel weTheo de Raadt
presume we booted from. If you boot from another kernel, we cannot help you later with hibernate, sorry -- The kernel does not get a useable filename from the bootblocks. In the bootblocks, detect a live hibernate signature and boot from /bsd.booted instead. with yasuoka, lots of discussion with mlarkin, ok tom
2017-06-19Terminate pledge log(9) with newline. This fixes dmesg(8) output.Alexander Bluhm
found by regress/sys/kern/pledge/generic; OK deraadt@
2017-06-19When dealing with mbuf pointers passed down as function parameters,Alexander Bluhm
bugs could easily result in use-after-free or double free. Introduce m_freemp() which automatically resets the pointer before freeing it. So we have less dangling pointers in the kernel. OK krw@ mpi@ claudio@
2017-06-19The IP multicast forward functions return an errno, call the variableAlexander Bluhm
error. Make the ip_mforward() return value consistent. Simplify the caller logic in ipv6_input() like in IPv4. OK mpi@
2017-06-19Fix the timecounter register on CN72xx/CN73xx.Visa Hankala
2017-06-19Use octeon_model_family() for SoC identification as in the restVisa Hankala
of the code.
2017-06-19Use type register_t instead of __register_t. Drop unneeded __unused.Visa Hankala