summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2014-10-24Bring phys_map to sparc64 and use it in vmapbuf(9) and vunmapbuf(9).Mark Kettenis
2014-10-24obvious sizes for freeTed Unangst
2014-10-24Fix indentation of closing brace.Alexander Bluhm
From Florian Riehm
2014-10-23Correctly mask IE_ALLIE during sun4/4c/4e NMI; from NetBSDMiod Vallat
2014-10-23Correctly set up the HPMC trap entry: according to the PA-RISC FirmwareMiod Vallat
Architecture Reference Specification, the sum of the 8 trap entry words *and* of the payload which address and length are to be set at well-known positions in the aforementioned trap entry, needs to be zero; the existing code was only enforcing that the sum of the trap entry words is zero. This matches what Linux and NetBSD do. ok kettenis@
2014-10-23In the various desidhash_*() functions, make sure we clear the `set to clear'Miod Vallat
bit fields with their right sizes (the L2PARERR field on PCXL processors being 4 bits wide, not 1 bit), and make comments consistent accross these functions. ok kettenis@
2014-10-23Revert limiting physmem to 2GB; the culprit was likely in uvm and uvm hasMiod Vallat
changed a lot in the last 5 years; verified to work on a 3GB system, in snapshots for a few weeks already.
2014-10-23Now that gcc2 is gone revert the removal of anonymous unions, means not ↵Brad Smith
having to modify various third party apps using the V4L2 API to build on OpenBSD specifically. "I think this is the right thing to do" miod@ "Fine with me." sthen@
2014-10-23pools lock themselves now, we just have to tell them what IPL theyDavid Gwynne
will be used from. this adds pool_setipl at IPL_VM to the crypto descriptor pools, and removes all the splvm handling around the use of those pools. tested by many via tech@ ok kettenis@ deraadt@
2014-10-23apply only the bit of r1.69 that should have been committed:David Gwynne
make the crypto taskq protect things at IPL_VM instead of IPL_HIGH. everything else in crypto.c uses splvm/IPL_VM. it seems this IPL_HIGH came about because the hand rolled task list and thread that crypto used to use was converted to workqs, which unconditionally used IPL_HIGH internally. when it was converted from workqs to tasks it blindly ported the protection workqs gave. tested by many via tech@ and snapshots ok kettenis@
2014-10-23revert previous. it did more than the commit message said it did.David Gwynne
2014-10-22make [bl]emtoh{16,32,64} take volatile const foo *, not volatile foo *David Gwynne
while in the manpage add volatile where the code has it too. ok miod@ guenther@
2014-10-22Extend domknodat() to support S_IFIFO directly and remove domkfifoat().Todd C. Miller
Both sys_mkfifo(2) and sys_mkfifoat(2) could be replace by libc wrappers using mknodat(2) at a later date if we desire. OK guenther@
2014-10-22Introduce a special hack for carp during IPv6 source address selection:Stefan Sperling
If there is a tie then a carp interface is not allowed to win even if it has an address with a longer bitwise match. This allows reliable IPv6 communication between carp master and backup across a shared IPv6 subnet. Consider the carp address 2001:DB8:10::14, which is configured on firewall A (in carp master state) and firewall B (in carp backup state), each of which has another address in the same prefix on a non-carp interface (A has 2001:DB8:10::1 and B has 2001:DB8:10::11). In this setup, A would use 2001:DB8:10::14 as source address when sending neighbour solicitations to B. Since 2001:DB8:10::14 is a local address from B's point of view, B never replied to the neighbour solicitations sent by A. With this change A uses 2001:DB8:10::1 as source address instead. ok mpi@
2014-10-22Sync offsetof() definition with what we have in <stddef.h> forDavid Coppa
userland. Fix a warning from gcc-4.9: ../../../../ufs/ufs/dir.h:113:33: warning: variably modified 'dh_firstfree' at file scope ok kettenis@
2014-10-22Remove some unused/unneeded code.Mike Larkin
2014-10-22make the crypto taskq protect things at IPL_VM instead of IPL_HIGH.David Gwynne
everything else in crypto.c uses splvm/IPL_VM. it seems this IPL_HIGH came about because the hand rolled task list and thread that crypto used to use was converted to workqs, which unconditionally used IPL_HIGH internally. when it was converted from workqs to tasks it blindly ported the protection workqs gave. tested by many via tech@ and snapshots ok kettenis@
2014-10-22Use the global piglet address variables as sparingly as possible to avoidMike Larkin
redundant copies of the same information. No functional change. Also add some comments as to how these globals are used.
2014-10-21tun(4) has a pipex session which is used for multicast internally, itYASUOKA Masahiko
wasn't freeed when the interface is destroyed. Free it properly. ok dlg
2014-10-21Style + typos in debug printfs.Masao Uebayashi
2014-10-20Be sure to return if the pci interrupt can't be mapped, instead of fallingMiod Vallat
through the remainder of the attachment logic.
2014-10-20pipex(4): Converted to use pool(9)Masao Uebayashi
OK blambert@ yasuoka@
2014-10-20use sha512 instead of md5 for tcp isn. ok deraadtTed Unangst
2014-10-20typo; deraadtTed Unangst
2014-10-20replace bzeros after allocations with M_ZERO and PR_ZERO as appropriate.David Gwynne
ok deraadt@
2014-10-20use SHA512 to hash entropy instead of MD5Ted Unangst
2014-10-20unconditionally build sha2 so we can use it in all the kernels.Ted Unangst
2014-10-19More gracefully handle firmware loading errors in ulpt(4).Stefan Sperling
The previous lack of error handling could trigger a kernel crash in some situations, with ulptwrite being called while not ready. ok deraadt phessler
2014-10-19Use sc_if->sk_pktlen to specify the maximum DMA transfer size and maximumBrad Smith
DMA segment size when setting up the TX buffers in msk_init_tx_ring(). ok jsg@
2014-10-18Don't use %r1 to refer to bit 1. No binary difference.Mark Kettenis
2014-10-18Whitespace.Masao Uebayashi
2014-10-18Make sure the direct map isn't executable on hardware that allows us to do so.Mark Kettenis
Enforcing W^X in the kernel like this mitigates at least some ret2dir attacks. ok mlarkin@, deraadt@
2014-10-18oops, too greedyMiod Vallat
2014-10-18Don't assume that ep_taddr and ep_daddr are page-aligned. It is possible toMark Kettenis
construct ELF executables for which ep_daddr ends up not being properly aligned. Sanitize the addresses before setting up the address space for the new executable. Should fix the panic discovered by Alejandro Hernandez. ok miod@
2014-10-18Remove even more unnecessary `needs-flag' attributes from config machinery,Miod Vallat
as well as useless include of the generated flag files.
2014-10-18Add VIDIOC_G_INPUT ioctl, some ports need it (at least ffmpeg)Jonathan Armani
ok ratchov@, sthen@, mpi@
2014-10-17reinstate i386/bus_space diff now that serial consoles are fixed inStuart Henderson
sys/arch/i386/i386/bios.c, ok deraadt
2014-10-17Initialize comconsiot. Fixes problems with the (now backed out) i386Mark Kettenis
bus_space(9) diff. ok sthen@
2014-10-17backout i386/bus_space diff for now, req'd by deraadt@ - problems at bootStuart Henderson
| i386/bus_space.c:1.5->1.6 | i386/machdep.c:1.551->1.552 | include/bus.h:1.61->1.62
2014-10-17Also remove trailing spaces from the CPU brand string.Mark Kettenis
ok deraadt@, armani@
2014-10-17revert previous. It isn't just i386 which cares about the setperfTheo de Raadt
hiding, it is a lot of other systems too.
2014-10-17cpu_setperf and perflevel must remain exposed, otherwise a bunch ofTheo de Raadt
MD code needs excess #ifndef SMALL_KERNEL
2014-10-17In the new world order, setperf does not exist on ramdisks.Theo de Raadt
2014-10-17Mark Cave-Ayland pointed out on tech@ that the OF_test_method was calledDaniel Dickman
with an ihandle instead of a phandle. And also the comparison was the wrong way around. This bug was causing an exception. Because -1 is returned to indicate failure and because the comparison is the wrong way around, the bad logic led to believing that SUNW,retain exists which is why this currently works on some PROMs. On E250/E450 machines, this didn't work so there was a hack to detect these machines and work-around the problem. After this fix that hack is now removed. Tested on an E450 by sebastia@ and confirmed that his dmesg is now retained after a reboot. nick@ promises to complain if his E250 is any worse off. ok kettenis@
2014-10-17convert old b functions to mem functionsTed Unangst
2014-10-17redo the performance throttling in the kernel.Ted Unangst
introduce a new sysctl, hw.perfpolicy, that governs the policy. when set to anything other than manual, hw.setperf then becomes read only. phessler was heading in this direction, but this is slightly different. :)
2014-10-17bring the twisting of bus_space from amd64 over to i386. this is:David Gwynne
src/sys/arch/amd64/amd64/bus_space.c r1.22 src/sys/arch/amd64/include/bus.h r1.27 instead of using the tag as an identifier for IO or memory mappings that was checked inside the api, turn it into a pointer to a structure of function pointers. the api then generally becomes a set of macros that deref the function pointers on the callers behalf. the idea is that following a pointer to very small functions is cheap compared to doing compares continuously. the kernel is smaller and the api is more cache friendly now. the porting of this code from amd64 to i386 was done by kimberley manning requested by and ok tedu@
2014-10-17reset all the pfsync packet state before calling ip_output inDavid Gwynne
pfsync_sendout. more specifically, move the reset of sc->sc_len to PFSYNC_MINPKT above ip_output. this prevents a situation where ipsec via ip_output calls pfsync_update_tdb for syncing the ipsec flow to a peer, which accounts for the tdb in the next pfsync packet, before unwinding back to pfsync_output which resets the accounting we just did. the next pfsync packet to be sent out will be allocated with a short length because sc_len is wrong, and the long lists of things (eg, the tdb) can overwrite memory after the mbuf. this manifests as incorrect poisoning or xsimpleq entry corruption in mbufs still in a pool, or random corruption of m->m_next on other mbufs in the system. bug found, fix tested, and ok stsp@
2014-10-16No longer used.Mark Kettenis
2014-10-16The "close" word doesn't return any arguments.Mark Kettenis
Pointed out by Mark Cave-Ayland.