summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2019-01-11Add support for changing the parent of the PCIe clocks. We willPatrick Wildt
use this for setting the PCIe clocks to the correct frequency. ok kettenis@
2019-01-11Move the placement of pmap_kernel's toplevel PML4 pageMike Larkin
This change moves the PML4 for pmap_kernel elsewhere during early boot. Lower levels of pmap_kernel will be moved in subsequent changes, but there are other pmap changes coming that need to be integrated first. In snaps for 3 days, no fallout seen. ok deraadt and substantial input and help from guenther@ cvs: ----------------------------------------------------------------------
2019-01-10Make mincore lie. The nature of shared memory means it can spy on whatTed Unangst
another process is doing. We don't want that, so instead have it always return that memory is in core. ok deraadt kettenis
2019-01-10Hold a read lock on the map while doing the actual device I/O during inMark Kettenis
physio(9) to prevent another thread from unmapping the memory and triggering an assertion or even corruption random physical memory pages. ok deraadt@ Should fix: Reported-by: syzbot+b8e7faf688f8c9d341b1@syzkaller.appspotmail.com Reported-by: syzbot+b6a9255faa0605669432@syzkaller.appspotmail.com
2019-01-10Properly implement (as far as we can) Event()/Signal()/Wait() AML operations.Mark Kettenis
ok mpi@, tedu@, deraadt@
2019-01-10regen pcidevs*.hStefan Fritsch
2019-01-10Add virtio 1.x PCI IDsStefan Fritsch
Everything above 0x1040 is 1.x only. Also tweak descriptoin of memory balloon device. There will be a memory device, too ok mlarkin@
2019-01-10Fix previousStefan Fritsch
It accidentally contained a part of a different diff.
2019-01-10Move some PCI-specific defines to a new virtio_pcireg.h fileStefan Fritsch
Also add some virtio 1.0 status and feature bits
2019-01-10Remove some more code if VIRTIO_DEBUG is 0Stefan Fritsch
2019-01-10Move some common defines to virtiovar.hStefan Fritsch
And fix some comments
2019-01-10settime: Don't cancel ongoing adjtime(2) until after full permission checkscheloha
ok jca@ visa@ guenther@ deraadt@
2019-01-10Use efifb_stolen() to prevent radeondrm from using aperture memoryJonathan Gray
overlapping the framebuffer. Prompted by ring tests failing. Diagnosed, fix suggested by and ok kettenis@
2019-01-10add efifb_stolen() to get the size of the efifb framebufferJonathan Gray
suggested by and ok kettenis@
2019-01-09Printing hex values with right adjustment makes it easier to compareAlexander Bluhm
corresponding digits. So the change the ddb x/x output. OK sashan@ deraadt@ visa@ mpi@
2019-01-09Eliminate an else branch from m_extunref().Visa Hankala
OK millert@ bluhm@
2019-01-09Make arm64 efiboot can boot from partitions other than "a".YASUOKA Masahiko
ok kettenis
2019-01-09free(9) sizes.Martin Pieuchot
ok visa@
2019-01-09No need to call usbd_fill_deviceinfo() from a task, it doesn't generate I/O.Martin Pieuchot
ok visa@
2019-01-09Enable Spleen in wsfont and modify the font selection logic at runtimeFrederic Cambus
in rasops(9) to allow selecting larger fonts when available. Summary of the changes: - Enable spleen8x16 for all architectures, replacing bold8x16_iso1. - Enable spleen12x24 on all arches but sparc64, replacing gallant12x22. - Enable spleen16x32 and spleen32x64 on amd64, i386, and arm64 for GENERIC kernels. - Modify the font selection logic in rasops(9) so the 16x32 and 32x64 fonts are selected if at least 120 columns can be displayed. Screens with widths equal or larger than 1920px will use the 16x32 font, and screens with widths equal or larger than 3840px the 32x64 one. OK kettenis@, ratchov@, deraadt@
2019-01-09implement an if_enqueue handler for vlan(4)David Gwynne
this allows vlan packets to bypass the ifq handling, which allows packets to be encapsulated concurrently by any context. the code falls back to ifqs if hfsc is enabled on the vlan interface, otherwise it encaps the packet immedate and enqueues it on the parent interface. hrove popovski has seen a performance bump in certain configurations from this change. ok mpi@ no objections claudio@
2019-01-09split if_enqueue up so drivers can replace ifq handling if neededDavid Gwynne
if_enqueue() still makes sure packets get handled by pf on the way out, and seen by bridge if needed. however instead of falling through to ifq mapping and output, it now calls a function pointer in the ifnet struct. that pointer defaults to the ifq handling, but drivers can override it to bypass ifq processing. the most obvious users of the function pointer will be virtual interfaces, eg, vlan(4). ifqs are good if you need to serialise access to the thing that transmits packets (like hardware rings on nics), or mitigate the number of times you do ring processing, but neither of those things are desirable on vlan interfaces. ideally vlan could transmit on any cpu without having packets serialised by it's own ifq before being pushed down to an arbitrary number of rings on the parent interface. bypassing ifqs means the driver can push the vlan tag on concurrently and push down to the parent frmo any cpu. ok mpi@ no objection from claudio@
2019-01-08viocon: Remove obsolete handling of sc_intrhandStefan Fritsch
2019-01-08virtio: Don't include feature strings without VIRTIO_DEBUGStefan Fritsch
They are only used if VIRTIO_DEBUG is enabled. This should make the kernel slightly smaller.
2019-01-08RL (NAK count reload) field in QH should be zero when using periodicSASANO Takayoshi
(interrupt) transfer. When RL is not zero, interrupt transfer cannot work correctly. It causes USB2.0 hub cannot detect device attach/detach. ok by mpi@
2019-01-08If the mbuf cluster in m_zero() is read only, propagate the M_ZEROIZEAlexander Bluhm
flag to the other references. Then the final m_free() will clear the memory. OK claudio@
2019-01-08Botched up an if conditional in the last commit. The IP length needs toClaudio Jeker
bigger than the IP header len to be valid. With this I can traceroute again.
2019-01-07Extents code has its own set of flags and does not use malloc's.Alexander Bluhm
The code in pci_init_extents() accidently passed M_NOWAIT which is EX_FAST and does no harm. Replace it with EX_NOWAIT. from Christian Ludwig; OK kettenis@
2019-01-07Enabling both kcov and retguard is now possible due to the recent bump ofanton
NKL2_KIMG_ENTRIES on amd64, allowing larger kernels. ok mpi@; "that's great!" deraadt@
2019-01-07Use the `iface' argument from the *attach() function instead of callingMartin Pieuchot
usbd_device2interface_handle(). ok visa@
2019-01-07Validate the version, and all length fields of IP packets passed to a raw socketClaudio Jeker
with INP_HDRINCL. There is no reason to allow badly constructed packets through our network stack. Especially since they may trigger diagnostic checks further down the stack. Now EINVAL is returned instead which was already used for some checks that happened before. OK florian@ Reported-by: syzbot+0361ed02deed123667cb@syzkaller.appspotmail.com
2019-01-07It is possible to call m_zero with a read-only cluster. In that case justClaudio Jeker
return. Hopefully the other reference holder has the M_ZEROIZE flag set as well. Triggered by syzkaller. OK deradt@ visa@ Reported-by: syzbot+c578107d70008715d41f@syzkaller.appspotmail.com
2019-01-07tweak ohci_checkrev so it doesnt print a leading comma and space.David Gwynne
it assumes that it always followed an interrupt string, but we don't print that on fdt. having the bus responsible for the whitespace means the fdt glue can print a colon to separate the bus info from checkrev output, while every other glue keeps the comma. ok deraadt@
2019-01-06the pledge handing for access(2) of /var/run/ypbind.lock is artificiallyTheo de Raadt
tough (so that non-YP using developers don't break the tree for YP/LDAP users). This check failed to handle the newish RPATH+UNVEIL_INSPECT namei operation. discovered by florian, ok beck
2019-01-06Increase L2 PTE reservation for the kernelMike Larkin
Bump the number of L2 page table entries reserved for the kernel from 16 to 64, to allow for larger kernels. This diff was in snaps for 21 days without any reported fallout. ok deraadt
2019-01-06fold a bunch of similar sysctl cases into a switch.Ted Unangst
ok deraadt mestre
2019-01-06Clear ps_uvpcwd when we free ps_uvpaths. Fixes a crash seen by kn@ and meMark Kettenis
where ps_uvpcwd obviously contains a dangling pointer. ok deraadt@, krw@
2019-01-06Unbreak SR_DEBUG buildskn
In arch/amd64/amd64/machdep.c r1.239 (21.02.2018) guenther added DPRINTF, redefining the one from dev/softraidvar.h. softraid(4) has been using DNPRINTF exclusively since import in 2007, so simply remove the DPRINTF macro definition from there. OK krw
2019-01-06Fix unsafe use of ptsignal() in mi_switch().Visa Hankala
ptsignal() has to be called with the kernel lock held. As ensuring the locking in mi_switch() is not easy, and deferring the signaling using the task API is not possible because of lock order issues in mi_switch(), move the CPU time checking into a periodic timer where the kernel can be locked without issues. With this change, each process has a dedicated resource check timer. The timer gets activated only when a CPU time limit is set. Because the checking is not done as frequently as before, some precision is lost. Use of timers adapted from FreeBSD. OK tedu@ Reported-by: syzbot+2f5d62256e3280634623@syzkaller.appspotmail.com
2019-01-06Rewrite ip_pcbopts() to fill a fresh mbuf with the ip options insteadClaudio Jeker
of fiddling with the user supplied mbuf and then copy it at the end. OK visa@
2019-01-06remove some old comments that were inherited from i386 (and wrong)Mike Larkin
2019-01-05fix previous commitMark Kettenis
"please commit asap" deraadt@
2019-01-05Expand a macro instruction for clang. Unlike gas, the integratedVisa Hankala
assembler does not handle the large immediate value automatically.
2019-01-05Replace two-operand instruction aliases that clang does notVisa Hankala
understand with the three-operand instructions. No binary change with gas.
2019-01-05match arm64 and armv7 and print unconfigured simplebus devices on octeonJonathan Gray
ok and tested by visa@
2019-01-05Add em_pch_cnp to IS_ICH8 macro. Missed when adding em_pch_cnp.Jonathan Gray
2019-01-05regenJonathan Gray
2019-01-05add more intel core and 300 series u idsJonathan Gray
2019-01-05match arm64 and print unconfigured simplebus devices on armv7Jonathan Gray
ok dlg@ kettenis@
2019-01-05enable ohci at fdt on RAMDISK as wellJonathan Gray
ok dlg@