summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-03-17KNF: Remove a blank line.Masao Uebayashi
2016-03-17Only attempt to build the pci sdhc attachment when it is configured.Jonathan Gray
Don't require it when building other sdhc attachments. From Patrick Wildt.
2016-03-17- add realloc_pages to move a buffer's physmem from one range to another.Bob Beck
- modify B_DMA handling to be in vfs_biomem.c - change buffer allocation to try allocations with NOWAIT and to throw away clean pages if allocation fails - allocate with WAITOK only if you can't throw away enough pages to succeed "probably sound" deraadt@
2016-03-16Make urndis(4) print tx/rx errors only if compiled in DEBUG mode.Stefan Sperling
These printfs were causing too much noise in dmesg during regular operation. And don't forget to count input errors. ok sthen@ mpi@
2016-03-16Remove redundant check.Stefan Kempf
The compiler is also smart enough to recognize that this is redundant. The resulting code on amd64 is basically equivalent (slightly different register allocation and instruction scheduling). ok mpi@ deraadt@
2016-03-16More "(<blah> *)0" -> NULL, avoiding any stdarg functions.Kenneth R Westerback
Feedback millert@ kettenis@
2016-03-16Add SDF_DYING checks to more functions in scsi disk, to prevent anAlexander Bluhm
use after free of the scsi link structure during detach. OK krw@
2016-03-16if ticks diverge from ifq_congestion too far the diff will go negativeDavid Gwynne
detect this and bump ifq_congestion forward rather than claim the system is congested for a long period of time. ok mpi@ henning@ jmatthew@
2016-03-16macros for the null, min, and max vlan ids.David Gwynne
ok mpi@ and tweaks from sthen@
2016-03-16Expose new audio ioctls that do one thing only: start and stop DMA,Alexandre Ratchov
set and get parameters. This is much simpler. ok semarie, armani, tweaks from jmc
2016-03-15'accomodate' -> 'accommodate' in comments.Kenneth R Westerback
Started by diff from Mical Mazurek.
2016-03-15Allocate amap slots for a virtual memory range reserved with sbrk lazily.Stefan Kempf
This avoids wasting kernel memory if the user process does not make use of the allocated memory. Testing by sthen@ and tobiasu@, thanks! ok deraadt@
2016-03-15For amaps with only a few slots, allocate the slots via pool(9)Stefan Kempf
This saves some memory compared to using malloc, because there's no roundup to the next bucket size. And it reduces kmem pressure at least for some architectures (e.g. amd64). Testing by sthen@ and tobiasu@, thanks! ok sthen@ deraadt@
2016-03-15not compiled before commitTheo de Raadt
2016-03-15Fix size passed to free(), found the hard way by Nick PermyakovJeremie Courreges-Anglas
ok deraadt@
2016-03-15Ethernet drivers no longer need to include if_vlan_var.h for the VLANChristian Weisgerber
definitions; ok mpi@
2016-03-15pledge: wl_paths: resolvpath() logic errorSebastien Marie
prepend chroot value *after* canonization and not before.
2016-03-15pledge: wl_paths: corrects a memory leak in error code path and an evaluationSebastien Marie
order ("a += b > c" is the same as "a += (b > c)" which is wrong here) ok jca@
2016-03-15usbd_is_dying() can't be part of the common rtwn(4) driver code once weStefan Sperling
merge code from urtwn(4). So timeouts must move back to the bus-specific part of the driver. ok mpi@
2016-03-15Exar XR17V354 puc(4) device, "high speed quad uart".Mike Larkin
2016-03-15syncMike Larkin
2016-03-15Typo in part number in previous commit (fix Exar P/N from XR17C354 toMike Larkin
XR17V354)
2016-03-15syncMike Larkin
2016-03-15syncMike Larkin
2016-03-15Add Exar 4 port PCIe serial port (puc)Mike Larkin
2016-03-15Remove now unused legacy uiomovei() function.Stefan Kempf
All its callers got reviewed and converted to use uiomove() properly. ok deraadt@
2016-03-15Burn more LDT deadwood: stop allocating one for each idle thread,Philip Guenther
load the ldt register with the null selector (disabling use of it), stop reloading it on every context switch, and blow away the table itself, as well as the pcb and pmap bits that were used to track it (making sure to keep pcb_savefpu correctly aligned). testing naddy@ ok kettenis@ mpi@ mlarkin@
2016-03-14Change a bunch of (<blah> *)0 to NULL.Kenneth R Westerback
ok beck@ deraadt@
2016-03-14Convert sparc drivers bpp and magma to uiomoveStefan Kempf
Compile test and ok tobiasu@
2016-03-14Correct the value of SRT_ENDTAG: it was documented incorrectly in earlyPhilip Guenther
ACPI specs. With the correct value, it can now be used in a few places instead of hardcoding 0x79. ok kettenis@
2016-03-14move the vlan protocol definitions to the same places as the ethernet onesDavid Gwynne
ok mpi@
2016-03-14Allocate statistics command from the heap, pointed out by deraadt@Mike Belopuhov
2016-03-13keep disabled wl_paths for now. the expensiveness impact need to be betterSebastien Marie
considered. ok deraadt@
2016-03-13reenable wl_paths (whitelisted-paths) in pledge(2)Sebastien Marie
2016-03-13pledge: replace #if 0 printf with DNPRINTF macroSebastien Marie
2016-03-13pledge: let wl_paths works well with chrootSebastien Marie
it factorizes path resolution in resolvpath() function, and use it in sys_pledge() and pledge_namei(). please note that wl_paths is still disabled.
2016-03-13Introduce memory ranges to support VMs with >= 4G RAMStefan Kempf
Kernel bits: - When creating a VM, a list of memory ranges has to be specified, similar to the BIOS memory map. This is necessary for VMs with RAM sizes approaching 4G because we'll need PCI MMIO space in the higher parts of the 32 bit address space. vmctl and vmd bits: - Construct appropriate memory ranges to create a VM with a given RAM size - Construct a corresponding BIOS memory map from the memory ranges and update the boot params page accordingly. - Make sure that all variables that represent guest physical addresses match the address width of the target CPU instead of using uint32_t. - Fix some integer promotion glitches that actually restricted VM RAM size to 2G. This changes the VM create ioctl interface, so update your kernel, vmd, and vmctl. ok mlarkin@
2016-03-13In ichiic(4), ignore the SMBALERT# interrupt. This interrupt has beenStefan Sperling
observed to fire for spurious reasons with buggy hardware/bios. It is being ignored by both FreeBSD and Linux as well. Fixes GENERIC kernel boot on ADI RCC-VE with buggy bios versions, where ichiic(4) ended up stealing interrupts from ehci(4), rendering the internal eMMC flash unusable. Also, always ackknowledge all interrupts by writing status bits back to avoid a potential SMBALERT# interrupt storm. with and ok deraadt@ kettenis@ mpi@
2016-03-13i forgot to rename p to ifp0 in vlan_configDavid Gwynne
still no binary change.
2016-03-13corrects on off-by-one error in pledge_namei()Sebastien Marie
- rewrite canonpath() to not require extra byte before shrinking - make canonpath() error not fatal for the caller (proposition from tedu@) ok millert@ tedu@ deraadt@
2016-03-13consistencly name ifnet pointers like we did in carpDavid Gwynne
the vlan interface is ifp, the vlans parent interface is ifp0, the new interface parent is newifp0. requested by mpi@ no binary change
2016-03-12Standardize on calling local scsi_link variables 'link' instead ofKenneth R Westerback
'sc_link'. 'sc_link' is a field in the various device *_softc structures, where the sc_ prefix was for 'softc'. Reduces potential mental confusion. Newer code from down under was already using 'link'. No functional change. Prompted by bluhm@'s adventures in scsi. ok dlg@ jmatthew@
2016-03-12Add checks on overlapping IPv6 sockets ownershipVincent Gross
ok mpi@ bluhm@
2016-03-12When unplugging an USB umass stick, the kernel could panic becauseAlexander Bluhm
of a use after free. In sdopen() the scsi link pointer is taken from the scsi disk struct. While the scsi disk memory is refcounted by autoconf, the scsi link may be detached and freed during sleep. The solution is to check wether the disk is dying after every sleep. The SDF_DYING flag is set before scsi bus and scsi disk are detached, so without this flag the link must be valid. input and OK krw@
2016-03-12When vfs_busy() is sleeping, it uses RW_SLEEPFAIL and will fail.Alexander Bluhm
So if vop_generic_revoke() does not unmount because the mount point is busy, this could result in a mount point without a valid device. It is better to check and sleep in a loop to avoid a corrupt mount point. OK natano@ krw@
2016-03-11increase size of oldpids to 128 to prevent mod bias when idx wraps.Ted Unangst
from Michal Mazurek
2016-03-11don't check a stack-allocated array against NULLmmcc
ok mpi@
2016-03-11"if (_3btol(cmd->len) != 0)" is more likely to be a useful test thanKenneth R Westerback
"if (cmd->len) != 0)", as cmd->len is a 3 byte array. Broken since media_blkno accounting was introduced in r1.72 (2007!). Might fix some obscure tape issues around miscounting variable sized blocks. Spotted by mmcc@ and his friend clang.
2016-03-11Move rtwn(4) DMA init code back to the PCI part of the driver.Stefan Sperling
This will make a future merge with urtwn(4) easier. ok mpi@
2016-03-11pledge: define the meaning of passing NULL to one arguments of pledge(2) as "ISebastien Marie
don't want to change the current value" it changes only the `request' argument behaviour when NULL is passed: previously it was traited as "" was passed. with help from jmc@ for man-page OK tb@ on previous version