summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2018-04-20enable ccp(4) as found on recent amd chipsDavid Gwynne
2018-04-20enable ccp(4) as found on amd seattle platforms, eg, overdrive 1000sDavid Gwynne
ok kettenis@ jmatthew@
2018-04-20add a small driver for AMDs cryptographic co processor.David Gwynne
the hardware provides crypto offload, zlib offload, and an rng. this code only supports the rng at the moment. this device is present on their amd seatlle platforms, and very present on their epyc stuff. ok kettenis@ jmatthew@
2018-04-20regenDavid Gwynne
2018-04-20add and update amd cryptographic co-processor devicesDavid Gwynne
2018-04-19when adding span ports, restrict them to ether and mplstunnel interfaces.David Gwynne
this is the same check that's done when adding normal members to the bridge. it prevents things like gif(4) being added to the bridge, which in turn prevents panics when shoving ethernet packets down a layer 3 interface. reported and tested by jasper@
2018-04-18crank versionTheo de Raadt
2018-04-18re-enable ucode loading. The problem is the standard memory allocatorTheo de Raadt
cannot handle the larger firmwares, so we must place them somewhere else where the kernel can read them. Let's use 1MB. And pay attention if someone gets burned by this decision. Other solutions get a lot more hairy ok mlarkin jsing
2018-04-18Some programs create a PROT_NONE guard page at the far-end of the providedTheo de Raadt
stack buffer. With a page-aligned buffer, creating a MAP_STACK sub-region would undo the PROT_NONE guard. Ignore that last page. (We could check if the last page is non-RW before choosing to skip it. But we've already elected to grow STK sizes to compensate. Always ignoring the last page makes it a non-MAP_STACK guard page which can be opportunistically discovered) ok semarie stefan kettenis
2018-04-18If m_pullup() changes the mbuf in gif_input(), also adjust the mbufAlexander Bluhm
pointer in the IP protocol loop. Reset the loop's mbuf when the mbuf is freed. The latter is not necessary, but clearing a pointer to freed data is safer. OK dlg@
2018-04-18handle failure better in release_firmware()/request_firmware()Jonathan Gray
Alloc the containing struct with M_ZERO so if loadfirmware() fails and doesn't set the pointer we won't try to free an address based on uninitialised memory. Use M_DEVBUF not M_DRM when freeing the buffer allocated by loadfirmware().
2018-04-18Stop modifying vm page flags using mixed atomic and non-atomicPatrick Wildt
operations. This resolves one of the failures frequently seen on QEMU where spawning processes while another process is working can lead to crashes. Committing on behalf of drahn@ ok kettenis@ jsg@
2018-04-18Introduce a pmap lock on pmap_fault_fixup(). Heavily threadedPatrick Wildt
applications will crash without this lock as other threads attempt to walk the tree while another thread is adding/removing mappings. Committing on behalf of drahn@ ok kettenis@
2018-04-18Try to get the layout from the default mux when attaching a consoleMartin Pieuchot
keyboard late. This makes keyboard re-attaching due to the machdep.forceukbd sysctl(2) respect /etc/kbdtype. Issue reported by Artturi Alm, jmc@ and landry@. ok kettenis@
2018-04-18Do a FREF()/FRELE() dance after fd_getfile() in sys_fcntl().Martin Pieuchot
ok visa@
2018-04-18Call FREF(9) earlier instead of incrementing `f_count' by hand.Martin Pieuchot
ok millert@, visa@
2018-04-18vmm: Fix interrupt window exiting for AMD / SVMpd
* define V_IGN_TPR (ignore virtual TPR) * set V_IGN_TPR while configuring window exiting (was missed in one location along with setting of the intr vector) This should fix unresponsive network / console issues with guests on SVM.
2018-04-17- Make rnd hints avoid the brk area. The rnd allocator refuses to allocate inOtto Moerbeek
the brk area anyway. - Use a larger hint bound to spread the allocations more for the 32-bit case - Simplified the overy abstracted brs/stack allocator and switch of guard pages for the brk case. This allows i386 some extra space, depending on memory usage patterns. - Reduce brk area on i386 to give the rnd space more room ok stefan@ sthen@
2018-04-17Remove protection checks from uvm_map_is_stack_remappableStefan Kempf
Other parts of uvm/pmap check for proper prot flags already. This fixes the qemu startup problems that semarie@ reported on tech@.
2018-04-17Prepare vnops to be locked.Martin Pieuchot
- Use vput(9) instead of vrele(9) when a "locked" node is returned by nfs_nget(). - Make sure VN_KNOTE() is always called with a valid reference. - Add a missing PDIRUNLOCK in nfs_lookup() These changes are mostly noops as long as nfs_lock()/unlock() do nothing. Tested by bluhm@, visa@ and myself. ok visa@
2018-04-17Better way of allocating EPT entries.Mike Larkin
Don't use the standard pmap PTE functions to manipulate EPT PTEs. This occasionally caused VMs to fail after random amounts of time due to loading the pmap on the CPU and the processor updating A/D bits (which are reserved bits in EPT). This ultimately manifested itself as errors from vmd ("vcpu X run ioctl failed".) tested by many, on different types of HW, no regressions noted
2018-04-15Disable microcode loading added in r1.20 of exec_i386.c.Joel Sing
The implementation tries to allocate sufficient memory to match the size of the microcode file and will blow the boot loader heap when loading a larger microcode file. This has been causing "heap full" errors at boot on some machines. Diagnosed with deraadt@
2018-04-15The Exar XR17V354 has 4 com ports that have a 256-byte FIFO, use aJoshua Stein
frequency of 125Mhz, and have a unique sleep register. A custom interrupt handler is setup in puc for these ports so it can check a register which reports which ports triggered the interrupt, rather than having to run comintr for every port every time. ok mlarkin deraadt
2018-04-15pucdata: convert port types and frequencies to a lookup table toJoshua Stein
allow for custom frequencies not a multiple of COM_FREQ ok deraadt
2018-04-14regenJoshua Stein
2018-04-14add another lite-on vendor id and cb1 nvmeJoshua Stein
2018-04-14account for the meltdown pdir page in pmap statsMike Larkin
ok deraadt, kettenis
2018-04-13Remove compatibility with pfctl from 6.1 and plug a few leaksMike Belopuhov
No objections from henning, OK visa
2018-04-13Don't panic if ipmi_sendcmd() failsYASUOKA Masahiko
diff from fukaumi at soum.co.jp. ok deraadt mpi
2018-04-12Implement MAP_STACK option for mmap(). Synchronous faults (pagefault andTheo de Raadt
syscall) confirm the stack register points at MAP_STACK memory, otherwise SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified to create a MAP_STACK sub-region which satisfies alignment requirements. Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the contents of the region -- there is no mprotect() equivalent operation, so there is no MAP_STACK-adding gadget. This opportunistic software-emulation of a stack protection bit makes stack-pivot operations during ROPchain fragile (kind of like removing a tool from the toolbox). original discussion with tedu, uvm work by stefan, testing by mortimer ok kettenis
2018-04-12Restore the original BSDI $Id$ strings. Those were mangled by CVSVisa Hankala
by my mistake. Pointed out by Christian Ludwig. Thank you!
2018-04-12Use the current reference instead of incrementing `f_count' manually andMartin Pieuchot
calling FRELE(9) in finishdup(). Update comments accordingly. ok bluhm@, visa@
2018-04-12Call FREF(9) earlier instead of incrementing `f_count' directly inMartin Pieuchot
dupfdopen(). ok bluhm@, visa@
2018-04-11The pledge flag for file descriptors opened from /dev/fd was alwaysAlexander Bluhm
set for pledged processes. dup(2) uses the flag from the old file descriptor. Make open /dev/fd consistent to duplicate and inherit the flag. OK deraadt@
2018-04-11More steps for i386 Meltdown fix:Alexander Bluhm
- provide struct cpu_info_full - prepare K-U sections - reorganize interrupt, trap, syscall entry to use K-U trampoline - prepare pmap for entering special mappings, the mappings are not setup yet This code will already trigger performance issues. We do more tlb flushes, but we do not unmap the kernel yet. The latter will be needed to prevent Meltdown. from hshoexer@; input guenther@; OK mlarkin@ deraadt@
2018-04-11Some (probably newer) re(4) cards don't have the 32-bit memory BAR thatPatrick Wildt
we try to map first. Instead there's a 64-bit memory BAR in the follow- ing BAR. Since on the MACCHIATObin we currently do not support the IO space, we have to use the 64-bit memory BAR. Thus, try to map the 64- bit BAR before falling back to the 32-bit BAR and the IO bar. ok deraadt@ kettenis@
2018-04-11Add mixer save/restore capability to the audio(4) driver andAlexandre Ratchov
use it during suspend/resume. Remove driver-specific mixer save/restore bits that don't need to be duplicated in every low-lever driver. ok mpi
2018-04-11Fix confusion between NMIDI > 0 and NMPU > 0. From jsg@.Alexandre Ratchov
2018-04-11Add support for Huawei k3772.bket
OK jca@, sthen@, deraadt@
2018-04-11syncbket
2018-04-11Add ids for Huawei k3772.bket
OK jca@, sthen@, deraadt@
2018-04-10Fix stop condition for linear search by taking into account the searchOtto Moerbeek
direction, otherwise we might break the loop prematurely; ok stefan@
2018-04-10Do not call logwakeup(), ending in wakeup_n(), while holding a mutex.Martin Pieuchot
Prevents a lock ordering issue between SCHED_LOCK() and printf(9)'s mutex. While here protect all kprintf() calls ending on the console with the mutex. ok kettenis@, visa@
2018-04-10Convert 'struct fileops' definitions to C99.Martin Pieuchot
ok millert@, deraadt@, florian@
2018-04-09Set trapframe pointer early on in do_el0_sync. This allows the use ofMark Kettenis
PROC_STACK() in the upcoming stack pointer checking diff and probably fixes bugs where ptrace(2) and core dumps would report the wrong register state. ok deraadt@
2018-04-09Get rid of some FreeBSD leftovers (that are mostly commented out already).Mark Kettenis
2018-04-09Implement support for INTx interrupts on Marvell ARMADA 7K & 8K.Mark Kettenis
2018-04-09regenMark Kettenis
2018-04-09Add Marvell 88E1512.Mark Kettenis
2018-04-09Add two more dwc3 quirks.Mark Kettenis
ok visa@, patrick@