summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2017-04-05When building counter memory in preparation to copy to userland, alwaysTheo de Raadt
zero the buffers first. All the current objects appear to be safe, however future changes might introduce structure pads. Discussed with guenther, ok bluhm
2017-04-05timeval has trailing padding on powerpc and m88k, so memset it beforePhilip Guenther
copyout to avoid leaking kernel stack ok deraadt@
2017-04-05Here at OpenBSD we change ABIs at the fling of a hat. Just in case aTheo de Raadt
future disk info sysctl has pads in the structures, use M_ZERO when allocating the storage to avoid leaking kernel memory.
2017-04-05clear structure on the stack before copying out for sysctl. At presentTheo de Raadt
it has no pads, but a future ABI change could add something and leak kernel memory.
2017-04-04struct vfsconf is tightly packed, but let's M_ZERO it in case that everTheo de Raadt
changes to avoid exposing userland memory.
2017-04-04Cleanup the code further. Get rid of the remaining C++-style comments,Mark Kettenis
remove some debug printfs, get rid of STATIC and __inline defines and remove a bit more unused code. ok drahn@, visa@
2017-04-04Issue memory barrier before lock release, not after. This ensuresVisa Hankala
the release write becomes globally visible only after any writes of the critical section are globally visible. In practice, the reordering has not happened because the kernel runs in the total store order mode. Tested by and OK kettenis@
2017-04-04add a free() size near microcode loadingTheo de Raadt
2017-04-04Add 8265 and 3168 support. Both cards need new firmware files which currentlyClaudio Jeker
need to be installed by hand until the iwm-firmware package has been updated. This includes handling (by ignoring) of IWM_UCODE_TLV_FW_MEM_SEG and IWM_DEBUG_LOG_MSG firmware commands. Mostly stolen from dragonflybsd. With this in the X270 has working ethernet and wifi. Commit! deraadt@
2017-04-03provide size to free(9)Theo de Raadt
2017-04-03Compute address for ll/sc only once.Visa Hankala
2017-04-02Less convoluted code in soshutdown()Theo de Raadt
ok guenther
2017-04-02Filter out RDTSCP, needed to handle solaris guests. We set the VMX controlMike Larkin
to enable RDTSCP to 0, so when solaris attempted to use the instruction (since it wasn't filtered out of CPUID information), the CPU issued an #UD exception.
2017-04-02On ARMv8, the translation table walk is fully coherent so there is noMark Kettenis
reason to explicitly flush the cache before invalidating the TLB. The barrier that is included in out TLB flushing code should be enough to guarantee that the TLB walking hardware sees the updated page table contents, so the explicit barriers can go as well. Sanitize the code immediately surrounding the removed bits while I'm there. Tested by jsg@, ok drahn@, visa@
2017-04-02printf format strings should be literals. Reminded by clang.Visa Hankala
2017-04-02Drop address conversion cruft.Visa Hankala
2017-04-02Fix tcp stats reportingJeremie Courreges-Anglas
Return the sum of per-cpu counters instead of the current cpu's counters. Brainfart on my side. Analysis and fix by Andrei-Marius Radu.
2017-04-02Bring back the wait instruction into the idle loop, but only on octeon.Visa Hankala
This lets an idle SoC run a bit cooler. Tested on CN5020, CN6120 and CN7130.
2017-04-02normalize order of arguments to if ()Theo de Raadt
2017-04-02unlock tree, we are now hacking on 6.1-currentTheo de Raadt
2017-03-30correct NBPFILTER #ifdef'sTheo de Raadt
from sthen and others
2017-03-30these free() size choices appear to be wrong. joel has a diff that fixesTheo de Raadt
them, but for release let's be conservative and use 0.
2017-03-30Use m_devget(9) to replace code that does more or less the same but assumesMark Kettenis
the received packet fits in a single mbuf cluster, which isn't necessarily the case. This might fix the pool corruption seen by jcs@. ok jcs@, jmatthew@, deraadt@
2017-03-29Fix iwi(4) regressions. WPA was broken since 6.0 errata 018.Stefan Sperling
Also, the firmware was rejecting RTS frames so iwi(4) didn't work against an OpenBSD athn(4) hostap anymore; fix the config sent to firmware. Prompted by report from bg2200 at jamesjerkinscomputer on misc@ ok deraadt@
2017-03-29POOL_DEBUG off for releaseTheo de Raadt
2017-03-29move to 6.1 release, drop -beta tagTheo de Raadt
2017-03-29Remove quirks for two devices that are known to be CDC ACM protocol 0Jonathan Gray
that are now covered by the generic class matching.
2017-03-29Match on class communications subclass abstract control model protocolJonathan Gray
0 "No class specific protocol required" in addition to the existing protocol 1 "AT Commands: V.250 etc" match. This lets umodem(4) attach to the serial console on the overdrive 1000 which is a usb type-b socket on the back of the box not a db9 like the overdrive 3000.
2017-03-28Add an instruction synchronisation barrier instruction after changingJonathan Gray
the vfp state via cpacr_el1. This matches the advice given in the "Synchronization requirements for system registers" section of the ARMv8 ARM. Without this an overdrive 1000 with A1120 (Cortex A57 r1p2) reliably triggers "panic: VFP exception in the kernel" when init(8) is run. ok drahn@ kettenis@
2017-03-28Properly handle VMX entry controls governing guest processor mode.Mike Larkin
Before seabios, this didn't matter much but now it does since various bootloaders/kernels need such treatment. ok deraadt
2017-03-28add RDTSCP flags to identcpu.cMike Larkin
ok guenther, deraadt
2017-03-28Previous W^X diff only changed the access permissions in the bootstrap pageMark Kettenis
tables. We need to set them in the final kernel page tables as well. ok visa@
2017-03-28Reset ci_curmap to kernel_pmap() in cpu_hatch(). Otherwise the lazy pmapMark Kettenis
switching code might think the old pmap is still active after a resume which could lead to a page fault in the kernel. ok stsp@, mlarkin@, deraadt@
2017-03-28Allow the multicast ttl/hops and loop options with the mcast pledge.Alexander Bluhm
from Matthias Pitzl; OK deraadt@
2017-03-28Make set_params() return the rate the device is using. FixesAlexandre Ratchov
a wrong rate being reported when a unsupported rate was requested.
2017-03-28Simplify rate/channels/bits bounds checking code. FromAlexandre Ratchov
Michael W. Bombardieri <mb at ii.net>. Thanks.
2017-03-28Add quirk for MacBook Pro 5,5. From Manav Rathi <mnvrth at gmail.com>.Alexandre Ratchov
Thanks!
2017-03-27Don't reject etherip packets if they are protected with IPsec.Jeremie Courreges-Anglas
This aligns code with documentation & matches what was available before etherip(4) was split from gif(4). sysctl net.inet.etherip.allow=1 is still needed to accept etherip packets not protected with IPsec. Reported by at least Jason Tubnor, ok mikeb@
2017-03-27Now that hibernate_alloc() only has clean success/failure, don'tTheo de Raadt
need to call hibernate_free() to clean up a partial mess. ok mlarkin kettenis
2017-03-27If hibernate_alloc() encounters a problem it should undo the partialTheo de Raadt
work. ok mlarkin kettenis
2017-03-27typo in debug buildMike Larkin
2017-03-27add a newline to an error printfMike Larkin
2017-03-27hibernate_free() should not be called from MD code, acpi_sleep_state()Theo de Raadt
unwinds that. Upon hibernate fail, this was a collection of double-frees.. ok claudio mlarkin
2017-03-27If the sub-device of a softraid lacks a side-effect io function, returnTheo de Raadt
failure as early as possible. ok mlarkin claudio
2017-03-27Reject times in the first year that can be represented by the clock to catchMark Kettenis
RTC clocks that aren't battery powered. ok deraadt@, millert@, visa@, tom@
2017-03-27Reorder FREF() and FRELE() in a way that the the global variableAlexander Bluhm
syslogf always points to a file object with increased reference count. This makes the implementation independent from the fact whether changing the reference counter may sleep. pointed out by Mateusz Guzik; OK deraadt@
2017-03-27Fix the prefixlen sent by RTM_NEWADDR on new addresses without masks:Rafael Zalamena
calculate the prefixlen using the address before sending the RTM_NEWADDR message. ok claudio@
2017-03-27regenJonathan Gray
2017-03-27shorten vmm stringsJonathan Gray
ok kettenis@ reyk@
2017-03-27wrap bpf pledge code in #if BPFFILTERTheo de Raadt