summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2018-01-12Don't bother ucode updates in ramdisk. We don't have the files....Theo de Raadt
ok patrick
2018-01-12Use correct size in allocarray() call.Mark Kettenis
ok patrick@
2018-01-12Runtime services may (and do) use device mappings on some UEFI implementations.Mark Kettenis
Skip these mappings during the remap-pahse as they are likely to be in a different 512G bloch as memory and SetVirtualAddressMap() shouldn't need them. But do assign a new virtual address and let efi(4) create a mapping. Add a PMAP_DEVICE flag such that pmap_enter() can continue to be used to create these mappings. ok patrick@
2018-01-12Constrain alloc_pages() to the dma_constraint range. Avoids aJonathan Gray
"Non dma-reachable buffer" panic when trying to use it from ttm code on a machine with 8GB of physmem and a radeon. ok kettenis@ dlg@ visa@ deraadt@
2018-01-12Correctly iterate over all extended signatures.Patrick Wildt
Found by markus@ With sf@
2018-01-12Unify <machine/mutex.h> a bit further.Martin Pieuchot
`mtx_owner' becomes the first field of 'struct mutex' on i386/amd64/arm64. ok visa@
2018-01-12IBRS -> IBRS,IBPB in identifycpu linesMike Larkin
2018-01-12revert previous changes to enable dwiic on Dell precision as it seemsMike Larkin
to cause issues on Dell XPS 15 9560. Will investigate and recommit later if a better fix can be found.
2018-01-12Check that mpls has been enabled on the input interface, lost in rev 1.66Jeremie Courreges-Anglas
While here fix under MPLS_DEBUG. ok dlg@
2018-01-12move gif_encap from gif_output to gif_start.David Gwynne
the main win is the simplification of bpf in the ouput path. ok visa@
2018-01-12restrict carp to configuring ethernet interfaces as carpdevs.David Gwynne
previously the driver only cared that a carp interface wasnt configured as a carpdev. because the code only really works on ethernet, it makes sense to restrict it. ok visa@ mpi@
2018-01-11Improve the handling of coordinate inputs and filters.Ulf Brosziewski
Single-touch and multi-touch coordinate inputs are treated more uniformly, and the hysteresis filters have a more consistent implementation. If possible, pointer control will be assigned to touches with coordinate updates that pass the default hysteresis filter (the function has been moved to wsmouse.c). The "strong" variant of hysteresis has been improved, the new version won't double the threshold when a movement changes the orientation on an axis. There is an additional change in wstpad_configure, which ensures that a zero size disables an edge area even if the coordinate limits are misconfigured.
2018-01-11cast the result of the ternary operators in __swapXX to the right typeDavid Gwynne
ok kettenis@ let's try it deraadt@
2018-01-11Update the Intel microcode once the root filesystem has been mounted.Patrick Wildt
This depends on the intel-firmware package that contains newer Intel microcode which will be installed automatically by fw_update(1). The update should happen much earlier since updating the microcode can add or remove not only feature flags but also whole features. For now only update feature flags that are relevant to Spectre. Initial diff from sf@ Tested by bluhm@ ok deraadt@
2018-01-11Extract the control channel number from the chanspec information andPatrick Wildt
apply the channel to the node, like iwm(4) does, when supplying the scan response to the net80211 stack. Our stack uses this information for node selection so it's elementary for it to be correct. Tested by jcs@
2018-01-11Postpone secondary CPUs until after mounthook activities. This isPatrick Wildt
useful for loading CPU microcode from the disk before the CPUs are let go. Tested by visa@ on sgi, loongson and octeon "don't see immediate issues" kettenis@ ok deraadt@
2018-01-11The PCI bwfm(4) chips have no TX rings in the traditional sense, as onPatrick Wildt
the actual rings we only share messages. Sending a TX packet means putting a message on the ring which contains a pktid (which for us maps to an mbuf) and the physical address of the mbuf. On jcs@'s macbook he seems to run out of TX pktids pretty quickly during a speedtest. This would mean that there are 2048 TX packets in flight that we either want to send out or that have not been "acked" by the firmware yet. Either way, recover from that situation when we hit that arbitrary limit by restarting the queue after we free'd a packet from the TX pktid list. Tested by jcs@
2018-01-11Advance data pointer after exporting SA type to userland. OtherwiseAlexander Bluhm
ipsecctl(8) may display bundled SA incorrectly. from markus@
2018-01-11Add size for free.Visa Hankala
OK mpi@
2018-01-11syncKevin Lo
2018-01-11Add support for Huawei E3372.Kevin Lo
ok phessler@
2018-01-11carp_ourether gets passed the parent interface, not the carp interface.David Gwynne
2018-01-10get rid of struct carp_if by moving the srpl into struct ifnet if_carp.David Gwynne
currently carp uses a struct carp_if to hold an srp list head, which is accessed by both if_carp in struct ifnet, and via the if input handlers list. this gets rid of some indirection by making if_carp itself the list head, rather than a pointer to the list head via a struct carp_if. it also makes accessing the list consistent by only using if_carp to get to it. ok mpi@
2018-01-10Implement FUCKWIT for arm64; unmap the kernel almost entirely while userlandMark Kettenis
is running. This provides protection against meltown on cores that are vilnerable (just Cortex-A75 so far) but also seems to be an essential to protect against spectre-like attacks against the kernel. This implementation only exposes a single treampoline page that does not contain any kernel virtual addresses and also hides the real virtual address of the exception vectors, which helps on cores vulnerable to "variant 3a" (Cortex-A57, Cortex-A72). The implementation is inspired by the work done by Will Deacon for Linux, but there are no knobs to turn it off. The overhead is fairly limited: around 3-4% slowdown on Cortex-A57. ok patrick@, deraadt@
2018-01-10Mark sosplice task mp safe, do not grab kernel lock for tcp output.Alexander Bluhm
OK mpi@
2018-01-10Attach bwfm to the Broadcom 4350 found in the 2017 MacBook.Joshua Stein
Easily handles >150Mbps transfers through a 5Ghz AP. ok patrick (Committed via bwfm0, of course)
2018-01-10regenJoshua Stein
2018-01-10add broadcom bcm4350Joshua Stein
2018-01-10Attach nvme to additional Apple NVMe device, limit targets to 1Joshua Stein
ok dlg
2018-01-10regenJoshua Stein
2018-01-10add another Apple NVMeJoshua Stein
2018-01-10Use pf_send_icmp() consistently in pf_route(). It sets the routingAlexander Bluhm
domain and other mbuf flags. In pf_route6() the bad packet counter and dup-to check were missing. OK visa@
2018-01-10simplify the input interface type check in carp_proto_input_if.David Gwynne
carp6_proto_input_if only handles packets "received" on real carp interfaces, which the ethernet stack goes to a lot of trouble to provide. since carp assumes ethernet, carp_proto_input_if can assume the packets will come in right too. ok mpi@
2018-01-10Remove assignement of sc->round to itself that makes no sense. FromAlexandre Ratchov
Michael W. Bombardieri, thanks.
2018-01-10Make azalia_free_dmamem() void, as its return value is not used. FromAlexandre Ratchov
Michael W. Bombardieri, thanks.
2018-01-10Add firmware names for the two revisions of the Broadcom 4350 as seenPatrick Wildt
on a MacBook 12-inch (2017). Tested by and with jcs@
2018-01-10Don't reset the internal memory core on chips other than the BroadcomPatrick Wildt
43602, as it's only necessary on that specific chip. Found the hard way by jcs@ on a MacBook 12-inch (2017)
2018-01-10Move line for readability.Patrick Wildt
2018-01-10shuffle how the protocol family input is done in ether_input.David Gwynne
the main change is to defer chopping the ethernet header off until the ether_type is looked at. the main advantage of this is pppoe doesn't have to reattach the ether header anymore, which simplifies the code a lot. ok mpi@ visa@ bluhm@
2018-01-10fix some poop that snuck into the last commit.David Gwynne
noticed by bijanebrahimi at riseup dot net and confirmed by anton@
2018-01-09Stop grabing the KERNEL_LOCK() for running protocol input routines.Martin Pieuchot
The NET_LOCK() is already held in this thread and is now enough. People interested in ARP/bridge(4)/switch(4)/pipex(4)/pppoe(4) performances can now push the KERNEL_LOCK() without depending on other subsystems/drivers. Tested by Hrvoje Popovski. ok bluhm@, visa@
2018-01-09Creating a cloned interface could return ENOMEM due to temporaryAlexander Bluhm
memory shortage. As it is invoked from a system call, it should not fail and wait instead. OK visa@ mpi@
2018-01-09Change `so_state' and `so_error' to unsigned int such that they canMartin Pieuchot
be atomically read from any context. ok bluhm@, visa@
2018-01-09lock->ctx != NULL => lock->ctxJonathan Gray
requested by kettenis@
2018-01-09Work around a problem with ww_mutexes in the drm modeset lock.Jonathan Gray
Screen blanks often result in a NULL dereference in __ww_mutex_lock with lock->acquired being non zero and lock->ctx NULL. mpi@ also reported it occuring when switching from Xorg to a virtual terminal. ok mpi@
2018-01-09Do not truncate 64bit integers when pretty-printing types.Martin Pieuchot
2018-01-09Use ip{,6}_send() instead of ip{,6}_output() to prevent a recursion.Martin Pieuchot
if_start() is a boundary between the network stack and drivers. The states it modifies must be protected by the driver, so we should not require the NET_LOCK() there. ok bluhm@, visa@
2018-01-09Do not silently truncate the firmware channel number.Martin Pieuchot
Fix build with gcc, ok stsp@
2018-01-09make mpls_input take a struct ifnet *ifp argument.David Gwynne
this makes it like all our other protocol family input functions. mpls_input always looks up the interface the mbuf was received on, but it's always called by code that already has a reference to that interface anyway. the result of this is a few less if_get/if_put calls. ok mpi@ bluhm@ visa@ claudio@
2018-01-08Fix indentation.Patrick Wildt