summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
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.
2014-10-16Additonal registers needs to be saved in sc_save2, not sc_save.Mark Kettenis
ok deraadt@
2014-10-16LID control method devices aren't required to offer _PSW, so don't skipMike Larkin
putting a LID into the global list of LIDs if we encounter an error writing to _PSW for that LID. Needed for another upcoming diff. ok deraadt, phessler
2014-10-16Use an instruction encoding for the return-to-realmode code that works onMike Larkin
both AMD and Intel CPUs. Previously, the encoding was causing illegal instruction exceptions on AMD, causing hibernate resume to fail.
2014-10-16Remove references to unimplemented CLOCK_VIRTUAL. It is non-standardTodd C. Miller
and existing implementations vary as to whether it returns time for the calling thread or the entire process. OK kettenis@
2014-10-16No need to reserve separate KVA ranges for the RLE and copy pages inMike Larkin
hibernate anymore.
2014-10-16missing \n in printf; Daniel WadeTheo de Raadt
2014-10-15move CPU_BUSY_CYCLES define out of #ifdef/else MULTIPROCESSOR, its meant toSebastian Reitenbach
be for both cases. OK ketennis@
2014-10-15Do not panic when attempting to decode invalid condition codes, or ifMiod Vallat
the disassembler initialization fails. Correctly compute the destination of pc-relative branches.
2014-10-15Sprinkle CPU_BUSY_CYCLE() in a few places.Masao Uebayashi
OK kettenis@
2014-10-15Revert previous (wrong commit message).Masao Uebayashi
2014-10-15pppx(4): Correct pppx_dev_lookup() and pppx_dev2pxd() local declarationsMasao Uebayashi
Those two functions take one dev_t argument, not int. Match declarations with reality. No functional changes.
2014-10-14Do not skip saving callee-saved registers in trap frames if compiling withoutMiod Vallat
option DDB; some parts of trap() depend upon the whole frame being populated (especially when running on PCXS processors). ok kettenis@
2014-10-14Document that lo0 must be present on your system by panic(9)ing if weMartin Pieuchot
cannot create it. Suggested by and ok claudio@
2014-10-14Don't check for an empty list of interfaces. This is never true even ifMartin Pieuchot
you don't have a physical interface on your machine, so why rawip should be more clever^Wparanoid than the others? ok henning@, mikeb@
2014-10-14Use rtfree() instead of RTFREE(), NULLify some free'd route pointers andMartin Pieuchot
kill the macro. ok mikeb@, henning@
2014-10-14NetBSD revision 1.20 of pmap.h (from 1996) deleted license text that shouldDaniel Dickman
not have been removed (per the license conditions). Revert that removal of the BSD license text and conditions. Special thanks to Aaron Brown who also provided explicit permission to make this change. ok schwarze@, miod@
2014-10-13disable pagezero thread on hppa, until failure gets diagnosed, ok miod kettenisTheo de Raadt
2014-10-13POSIX says that mknod(2) should support fifos. OK guenther@Todd C. Miller
2014-10-13Let this compile without option DDB.Miod Vallat
2014-10-13Add dumping of struct dqblk done by quotactl(2)Philip Guenther
ok millert@
2014-10-13Calling quotactl(QCMD(Q_QUOTAON)) twice with the same filesystem,Philip Guenther
type, and path shouldn't leak vnode or ucred references. ok millert@
2014-10-13use mallocarray to get the array of pollfd structs.David Gwynne
tweaks and ok millert@ deraadt@