summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2018-07-26Add imxspi(4), a driver for the i.MX SPI controller. This is the firstPatrick Wildt
SPI controller in our tree. Add a basic generic SPI infrastructure as well. ok kettenis@
2018-07-26Implement calculating the SPI controller frequency in imxccm(4).Patrick Wildt
ok kettenis@
2018-07-26Remove CPUID insn_length checkjob
Don't allow unprivileged users to crash things from ring 3 Thanks to William McCall for the patch! OK mlarkin@
2018-07-26don't dump status iocbs twiceJonathan Matthew
2018-07-26remove "bad startup mboxes" printf - it never indicates a real problem,Jonathan Matthew
and it always happens on 25xx controllers.
2018-07-25Implement a MSGBUF control packet mechanism based on the commandPatrick Wildt
request ids. So far we were only able to have one command in flight at a time and race conditions could easily lead to unexpected behaviour. With this rework we send and enqueue a control packet command and wait for replies to happen. Thus we can have multiple control packets in flight and a reply with the correct id will wake us up.
2018-07-25On authentication we don't need to create the node before callingPatrick Wildt
the network stack since the stack will create the node for us if we pass the ibss stack. On assocation request the node already has to exist, so we error out if we don't have a record of the node. Fixes hostap on 5 GHz channels, since now the node's channel is recorded correctly.
2018-07-24Add support for the i2c controller on the Marvell ARMADA 7K/8K SoC as well.Mark Kettenis
ok patrick@
2018-07-24Add clock needed to support the i2c controllers on the Marvell ARMADA 7K/8K.Mark Kettenis
ok patrick@
2018-07-24regenMark Kettenis
2018-07-24Add SanDisk/WD Black NVMe devices.Mark Kettenis
From Bryan Vyhmeister
2018-07-24Do the same for i386 as amd64:Bryan Steele
Add "Mitigation G-2" per AMD's Whitepaper "Software Techniques for Managing Speculation on AMD Processors" By setting MSR C001_1029[1]=1, LFENCE becomes a dispatch serializing instruction. ok deraadt@
2018-07-24The I2C controller on the Allwinner hardware is actually a modifiedPatrick Wildt
Marvell controller. The difference is essentially register offsets and a clock divider calculation based on a power of two. Also this particular hardware needs a delay after sending a stop and before reading the status register since apparently the data doesn't propagate fast enough. This makes sxitwi(4) work on the Marvell Armada 38x. ok kettenis@
2018-07-24Add support fotr the BCM4335/4339 SDIO chip to bwfm(4). This one is a bitMark Kettenis
slow booting up, so give it a bit longer to enable the clock. ok patrick@
2018-07-24Fix previous commit: the RSB refill bits change %rcx so it needed to bePhilip Guenther
given an input/output ASM constraint...but I made it output-only, so the compiler deleted the initialization. reported by many, starting with Edd Barrett (edd(at)theunixzoo.co.uk)
2018-07-24When a GRE packet goes to "decline", the mbuf pointer was not updatedYASUOKA Masahiko
properly. This had caused an panic when the mbuf pointer is updated. Found by IIJ. ok dlg
2018-07-24Also do RSB refilling when context switching, after vmexits, andPhilip Guenther
when vmlaunch or vmresume fails. Follow the lead of clang and the intel recommendation and do an lfence after the pause in the speculation-stop path for retpoline, RSB refill, and meltover ASM bits. ok kettenis@ deraadt@
2018-07-23Add "Mitigation G-2" per AMD's Whitepaper "Software Techniques forBryan Steele
Managing Speculation on AMD Processors" By setting MSR C001_1029[1]=1, LFENCE becomes a dispatch serializing instruction. Tested on AMD FX-4100 "Bulldozer", and Linux guest in SVM vmd(8) ok deraadt@ mlarkin@
2018-07-23Coverity CID 1470233 complainst that the m != NULL check inAlexander Bluhm
syn_cache_get() is not neccessary. Also make the abort label consistent to resetandabort and free the mbuf there. OK mpi@
2018-07-23The imxiomuxc(4) node itself can also contain a set of pins toPatrick Wildt
configure. These are pins that should be configured to a sane state and are not necessarily referenced by another node. ok kettenis@
2018-07-23Do "Return stack refilling", based on the "Return stack underflow" discussionPhilip Guenther
and its associated appendix at https://support.google.com/faqs/answer/7625886 This should address at least some cases of "SpectreRSB" and earlier Spectre variants; more commits to follow. The refilling is done in the enter-kernel-from-userspace and return-to-userspace-from-kernel paths, making sure to do it before unblocking interrupts so that a successive interrupt can't get the CPU to C code without doing this refill. Per the link above, it also does it immediately after mwait, apparently in case the low-power CPU states of idle-via-mwait flush the RSB. ok mlarkin@ deraadt@
2018-07-22In uvm_map_protect(), make sure we select a first map entry that ends afterMark Kettenis
the start of the range of pages that we're changing. Prevents a panic from a somewhat convoluted test case that anton@ came up with. ok guenther@, anton@
2018-07-22Fix arguments of pf_purge_expired_{src_nodes,rules}()Stefan Fritsch
Due to the missing "void", this extern void pf_purge_expired_src_nodes(); is no prototype but a declaration. It is enough to suppress the 'implicit declaration' warning but it does not allow the compiler to check the arguments passed to the calls of the function. Fix the prototypes and don't pass the waslocked argument anymore. It has been removed a year ago. ok sashan henning
2018-07-22Avoid a NULL pointer deref when calling fchown() on a file descriptor belonginganton
to a cloned device. ok kettenis@
2018-07-21Include the vnode type in the panic message in ffs_write(), just like ffs_read()anton
does. ok deraadt@ kettenis@
2018-07-21Remove the "got meltdown?" conditional from INTRENTRY by doing itPhilip Guenther
unconditionally and codepatching it out on CPUs that don't need/do the mitigation. Align the from-{kernel,userspace} targets in INTRENTRY with _ALIGN_TRAPS Align x2apic_eoi using KUENTRY() instead of the artisinal segment+label+.globl bits it uses currently s/testq/testb/ for SEL_RPL checks ok kettenis@ mlarkin@
2018-07-20Remove a few leftovers from the days of emulation, which could result inTheo de Raadt
a bad/corrupt binary not returning ENOEXEC but some other error. ok guenther kettenis bluhm
2018-07-20Fail if a PT_LOAD segment has a memory size of 0. This prevents a panicMark Kettenis
later on, and it makes no sense for a binary to have such a segment. ok bluhm@, guenther@
2018-07-20Correctly copy across unveil's from parent to child process on fork().Bob Beck
2018-07-20match on marvell,armada-38x-uart linux >= 4.18-rc1 changed the compatJonathan Gray
string from snps,dw-apb-uart in b7639b0b15ddd1a4686b0142e70dfb122eefc88f ok patrick@
2018-07-20Missed a 'ksi' -> '*ksip' change in previous commitPhilip Guenther
2018-07-19Enable kernel profiling on arm64Dale Rahn
sigcode() runs in user land context, so should not call mcount. Without the symbol type on the exception entry functions, gprof doesn't correctly identify the caller for exception entry symbols. ok kettenis@
2018-07-19attach RTL8188EU under AboCom's vendor id. From FreeBSD via Mikhail <mp39590 ↵Stuart Henderson
at gmail>
2018-07-19syncStuart Henderson
2018-07-19Add RTL8188EU under AboCom's vendor id. From FreeBSD via Mikhail <mp39590 at ↵Stuart Henderson
gmail>
2018-07-19Reuse implicit padding to export the port number of a USB device inMartin Pieuchot
USB_DEVICEINFO. devel/libusb1 requires this piece of information. ok jcs@, mikeb@, jasper@, sthen@
2018-07-19ieee80211_ess_is_better() returns 0 or 1, comparing > 1 is alwaysFlorian Obser
false so we always selected the first wifi available, not the best one. While here shuffle some deck chairs to make it clearer that anything is better than nothing. tweak & OK phessler
2018-07-18Revert the change that delivers process signals to any threads. AsAlexander Bluhm
side effect pending signals specifically sent to the main thread were handled by other threads. This made gcj in textproc/pdftk port build stall. Noticed and tested by espie@.
2018-07-18Replace VATTR_NULL() with memset(3) in fusefs_getattr(). VATTR_NULL()helg
sets all members of struct vattr to VNOVAL (-1) instead of 0, which is what is appropriate here. The VATTR_NULL() macro is intended for initialising struct vattr when setting attributes. ok mpi@
2018-07-17TX packets, which can be either Ethernet or control packets, must bePatrick Wildt
sent in order. Otherwise it is possible that the key is set before we send out the EAPOL packet, or that packets are sent out before the key is set. Thus modify the SDIO backend to put both types into the same internal TX queue, which will be sent asynchronously. Discussed with bluhm@
2018-07-17Don't send FBT_DESTROY if the FUSE connection is still PENDING. Alsohelg
don't attempt to determine the size of the root inode. This is because we don't need to know the size of directories and FBT_GETATTR will also cause a deadlock if fuse_unmount(3) is called before the file system has a chance to process fbufs. Add corresponding regression test. ok mpi@
2018-07-17unvname_new() is passed something that is always 64-bits so theKenneth R Westerback
parameter should be declared uint64_t and not int. From & for semarie@ who isn't committing at the moment and ok beck@ who is on the road.
2018-07-17we have splraise() nowDavid Gwynne
previously the code would do a series of comparisons to IPL_FOO and IPL_BAR, and use splfoo() and splbar() as needed, but for like a dozen different IPl levels (i may be exaggerating). splraise() rolls all of that up. ok deraadt@ mpi@
2018-07-16use 'switch' rathan than an if-else construct to match on the netflow ↵Jasper Lievisse Adriaanse
version to in pflow_get_mbuf(), to match the rest of the file ok benno@ florian@
2018-07-16Insert the appropriate uvm_vnp_uncache(9) and uvm_vnp_setsize(9)helg
kernel calls to ensure that the UVM cache for memory mapped files is up to date. ok mpi@
2018-07-16Add support for the BCM43455 SDIO chip to bwfm(4).Patrick Wildt
2018-07-16In certain modes SDIO-connected bwfm(4) chips might expect us to readPatrick Wildt
another packet (even though nextlen is set to none) to issue more RX interrupts.
2018-07-16Implement FBT_FSYNC, which is called on fsync(2) and fdatasync(2).helg
Currently ignores the a_waitfor argument and always invokes the file system's fsync implementation synchronously. ok mpi@
2018-07-16the AP sends their crypto parameters as a mask, so let us still select itPeter Hessler
in case we want WPA2 and they have WPA1 still enabled
2018-07-16don't save or use auto-join when the card is not in station (aka client) modePeter Hessler
OK stsp@