summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2015-08-03A recently added sanity check panic in pf_postprocess_addr() wasJonathan Gray
triggered for a reply-to rule. It turns out this case has been using uninitialised memory as if it were a valid pf pool. As the rest of the function assumes a valid pool for now just return. Problem reported by RD Thrush. ok jung@ mikeb@
2015-08-03On mips64, enable IPIs before calling refreshcreds() in trap(), toVisa Hankala
avoid a potential deadlock. ok miod@, deraadt@
2015-08-03add amdcf(4) here too; unbreaks RAMDISKJasper Lievisse Adriaanse
ok pirofti@
2015-08-03Remove a debug printf that should have been removed years ago. ok ratchovStefan Sperling
2015-08-01Fix free() of uninitialized variable introduced in previous commit.Philip Guenther
Eliminate the goto that I tripped on. problem noted by Mark Latimer (mark.latimer (at) gmail.com) ok miod@ millert@
2015-07-31Removed uninitialized pointer usage, we didn't need to use it there anyway.Rafael Zalamena
Thanks to Patrick Wild for noticing that! ok mpi@, deraadt@.
2015-07-31As usual, turn off POOL_DEBUG for the release.Sebastian Benoit
ok deraadt@
2015-07-30Make mips64 pmap prepared for the unlocked reaper.Visa Hankala
ok miod@, deraadt@
2015-07-29Fix spacing and be more verbose in printfs under #ifdef AUDIO_DEBUG.Alexandre Ratchov
No binary change.
2015-07-29Use DMA pointer determine the number of times the audio(4) layer hasAlexandre Ratchov
to advance in time. This is needed to properly recover, when interrupts are blocked for too long. Fixes permanent distortion on MP systems. ok deraadt
2015-07-2917 years ago, setfault() was modified to save the status register in theMiod Vallat
faultbuf. But 1/ sr was only restored for machine check exceptions, and 2/ the way it was saved was unsafe if interrupts were enabled, and could cause %r2 to be lost. Discussing this with deraadt@ at the end of c2k15, this was probably needed for the old VI boards which were the target of the original powerpc port, came with a worse-than-Genesi openfirmware. Since then, machine check exceptions have been unheard of; or, if they happen, they do not need the status register to be restored. ok mpi@ deraadt@
2015-07-29Something subtle in previous revision is locking up suspend or bootingTheo de Raadt
on some laptops. Mailing lists threads mention x220 and Asus machines. Reverting for now.
2015-07-29Neuter tame(2) with ENOSYS for upcoming release cycle, in a fairlyTheo de Raadt
simple and gross fashion, but the least impact on other parts...
2015-07-29Acquire the kernel lock in pmap_remove(). The reasons for this can't beMiod Vallat
stated here as I have been asked to be polite in this commit message. ok deraadt@
2015-07-29Determine and print Xen hypervisor version.Mike Belopuhov
ok reyk, with deraadt@'s permission
2015-07-29Zap a SLIST in a more obviously correct/safe way.Kenneth R Westerback
Originally from pelikan@, recent prodding from bluhm@ and jsg@. ok pelikan@ millert@ bluhm@
2015-07-29Rework buffer position reporting code.Alexandre Ratchov
- use simpler data structures (makes the code shorter). - if multiple interrupts are missed, call audio(4) as many times as we missed interrupts (unless the pointer wrapped, which this is undetectable, but upper layer handles it) - fetch the link fifos size in the interrupt handler, as, according to the spec it may change dynamically. - certain devices expose the last offset of the link fifo size instead of the fifo size itself; workaround this by incrementing the reported link fifo size if it's odd. Fixes recovery after missed interrupts on asus eeepcs, maybe others. ok deraadt, help from armani@
2015-07-29Zap a couple of extra blank lines that keep showing up in diffs I'mKenneth R Westerback
trying to build.
2015-07-29Don't use mpls_input() as input handler anymore and instead call itRafael Zalamena
directly. Also protect non mp-safe functions while at it. ok mpi@.
2015-07-28Convert sectors to DEV_BSIZE block values were necessary to find,Kenneth R Westerback
read and validate disklabels on GPT partitioned disks. Makes it much more likely GPT partitioned disks with non-512-byte sectors will work. Part of the larger reverted GPT work. ok deraadt@
2015-07-28add missing space, from Donovan Watteau <tsoomi at gmail.com>Alexandre Ratchov
thanks!
2015-07-28In case the system misses enough audio interrupts for DMAAlexandre Ratchov
pointers to wrap, recover by detecting and compensating for the missed interrupts. Fixes certain audio hangs on MP machines. with help from armani@, typos fixed by Alexey Suslikov
2015-07-28Add the AUDIO_GETPOS ioctl() to fetch a snapshot of the 4 countersAlexandre Ratchov
returned by AUDIO_GETxOFFS and AUDIO_xERROR ioctls. ok deraadt
2015-07-28Tweak a couple of [SLIST|TAILQ]_REMOVE() usages in loops to a moreKenneth R Westerback
obvious idiom. ok bluhm@ jsing@
2015-07-28normalize disclaimer to license.template; noted by reykTheo de Raadt
2015-07-28For unix domain sequenced packet socket pairs the ruby regressionAlexander Bluhm
tests reported an EMSGSIZE error although the sent message was not too large. The way backpressure was implemented for unix domain sockets confused the check in sosend(). Unix domain sockets append data only to the recv buffer. To report the amount of content to the sender, the high watermark of the send buffer was reduced. This happend for SOCK_STREAM and SOCK_SEQPACKET. Sosend checks wether atomic chunks could ever fit into the send buffer which is limited by the high watermark. This happens for SOCK_DGRAM and SOCK_SEQPACKET. For SOCK_SEQPACKET the combination of these mechanisms resulted in an EMSGSIZE error when the buffer got filled. This also happened when space could be created by reading from the other end in contradiction to the semantics of EMSGSIZE. Do not emulate a send buffer that has no space. It is better to fill the buffer with fake data than to reduce its size. Thus the high watermark always contains the real value. When disconnecting, reset the counters. Otherwise the socket layer would try to flush non existing data in the send buffer. Tested by jeremy@ with a C program and the ruby tests. OK markus@ jeremy@
2015-07-28Implement pf divert-reply for raw sockets. Note that an emptyAlexander Bluhm
divert->addr means that the rule has a divert-reply option. With divert-to the divert->addr is always set. The divert-reply rules should compare the original packet with the socket addresses. So skip the step that compares the inp->inp_laddr with the empty divert->addr. OK mikeb@
2015-07-28iDo not link an ICMP6 socket to the pf state. When multiple ICMPAlexander Bluhm
packets with a different ICMP ID are sent over the same raw socket, multiple states should be created. Put a similar check into rip6_output() like in the IPv4 case. OK mikeb@
2015-07-28Add callbacks for supported hypervisors in pvbus(4) to print moreReyk Floeter
information and for some generic CPUID/MSR-level initialization. This changes the attach/match path a bit. Hypervisor informatiom may include a version number, for example: pvbus0 at mainbus0: Hyper-V 6.3.9600 OK mlarkin@
2015-07-28Add ktracing of structs iovec, msghdr, and cmsghdr for {,p}{read,write}v(),Philip Guenther
sendmsg(), and recvmsg(). For cmsghdr, the len, level, and type are always shown, and for SOL_SOCKET,SCM_RIGHTS the fd numbers being passed are shown. ok millert@ deraadt@
2015-07-27Rather than disabling tame to coredump, leave it enabled but flag thatTheo de Raadt
a coredump is happening. This improves behaviour while threaded. ok semarie
2015-07-27typoTheo de Raadt
2015-07-27Allow coalescing of IPI requests on mips64, to make IPI sendingVisa Hankala
non-blocking. This improves performance on systems that have more than a few cores and where there is a heavy IPI load. Currently the only place where coalescing must not happen is rendezvous processing, but there invocations are serialized by the rendezvous mutex. ok miod@
2015-07-27enforce tame by disabling all TAME_ flags if tame_fail() is reach, and not onlySebastien Marie
if TAME_ABORT is setted. ok deraadt@
2015-07-27zap trailing linefeeds from sr_error() and panic() callsAlexander Hall
ok jsing@
2015-07-27tame check of msghdr should be done after checking for copyin failurePhilip Guenther
ok deraadt@
2015-07-27Always #include <sys/mutex.h>: need struct mutex for struct vm_page_mdPhilip Guenther
problem noted by landry@ ok dlg@
2015-07-26Always initialize the b_error field and B_ERROR flag before usingKenneth R Westerback
a buf. Otherwise stale data might cause a successful I/O to be seen as a failed I/O. ok tedu@
2015-07-26Make sure pci_intr_map() will perform proper interrupt swizzling for devicesMiod Vallat
behind a bridge, if the SRM didn't pick an interrupt line for them.
2015-07-26When attaching on an alpha system, get the current textmode resolution byMiod Vallat
querying the 6845 registers, and preserve it if it is larger than 80x25 yet plausible. This is necessary to properly operate on the Alphabook 1 where the vga display is running in a 100x37 textmode. Other platforms are not affected.
2015-07-26Make pcic_ident_ok() completely silent in case of failure.Miod Vallat
2015-07-25Only store mod/ref flags in the vm_page_md struct, not in every pv_entry.Miod Vallat
2015-07-24Switch back into counting bytes rather than blocks. We can't justAlexandre Ratchov
multiply the block count by the block size to get the bytes count because they won't wrap correctly.
2015-07-24if we free the mbuf in the rx path, clear the pointer to it so we dontDavid Gwynne
try and queue it for the stack and cause a use after free. found by maxime villard and brainy
2015-07-23Revert attempted GPT code cleanup. Too much code, too little testing.Kenneth R Westerback
Requested by deraadt@
2015-07-23Missed file in *_data_offset -> *_data_blkno switch.Kenneth R Westerback
Found the hardway by benoit@.
2015-07-23remove -beta tag. take that as a hint.Theo de Raadt
2015-07-23remove the POOL_NEEDS_CATCHUP macro, it isnt used.David Gwynne
from martin natano
2015-07-23Add the bhyve id to recognize if we're running under this hypervisor.Reyk Floeter
OK mlarkin@
2015-07-23Attach pvbus(4) later just before pci(4). Same change was done for amd64.Reyk Floeter
Tested on VMware-GENERIC-i386. OK mlarkin@