summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-17Correctly encode half line feed in the output stream for -f;Ingo Schwarze
this patch only changes two bits, note that '\011' != '9' == '\071'. Bug introduced by the original author, Michael Rendell, and committed by Keith Bostic on May 22, 1990 (CSRG SCCS rev. 5.1). The following operating systems are affected: 4.3BSD Reno, BSD Net/2, 4.4BSD, 4.4BSD Lite1, 4.4BSD Lite2, and all versions of 386BSD, NetBSD, OpenBSD, FreeBSD, DragonFly, Debian GNU/Linux (package bsdmainutils) and probably many others. "that's a fun one" millert@, "nice find" deraadt@
2014-10-17Partial revert of rev. 1.7 (Nov. 21, 2000):Ingo Schwarze
The half line feed escape codes are decimal 8 and 9 (octal 010 and 011). While here, make it clear that the numbers are ASCII, and consistently use lower cases character names in the first column and decimal numbers in the parentheses at the end of the second column. OK millert@
2014-10-17Remove some #ifdef HAVE_syscall.Alexander Bluhm
OK nicm@
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-17Instead of doing strvis() of gecos string on output, do it whenTodd C. Miller
storing them in struct person since they are only used for output. Uses reallocarray() for overflow detection. OK deraadt@
2014-10-17Use strlcpy() instead of strncpy() when making a copy of pw_gecos.Todd C. Miller
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-17Remove #ifdef HAVE_.*_H, just include the header files.Alexander Bluhm
Do not include sys/param.h. OK nicm@
2014-10-17Also remove trailing spaces from the CPU brand string.Mark Kettenis
ok deraadt@, armani@
2014-10-17rspec2 will be removedJasper Lievisse Adriaanse
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-17Add the -d flag (limit display depth) for compatibility with FreeBSD,Ingo Schwarze
DragonFly, NetBSD and GNU coreutils, even though it's not POSIX. Actually, this simplifies the code rather than complicating it. Because -a and -d need not be mutually exclusive (as observed by millert@) and -s is identical to -d 0, -a and -s are no longer mutually exclusive, but -as and -sa are now the same as -s. That is explicitly allowed by POSIX. Based on a patch from William Orr <will at worrbase dot com>, but extensively massaged and HISTORY added by me. feedback and ok millert@
2014-10-17Drop the _lkm group.Antoine Jacoutot
ok dcoppa@ deraadt@
2014-10-17If gotoeop() is called requiring more than one iteration, it behavesMark Lumsden
oddly if it reaches the end of buffer before completing all iterations. This diff makes the kill-paragraph and forward-paragraph commands stop once they can go no further. ok florian@
2014-10-17Nuke 'increase' which was always set to 1. Replace the if/else that testedKenneth R Westerback
its value with the body of the if. No functional change. 'increase' was orphaned when r1.139 eliminated support for 'medium' statements in dhclient.conf. Stumbled over while looking into a problem for weerd@.
2014-10-17strvis() requires that the buffer is at least 4 * srclen + 1.Doug Hogan
ok deraadt@
2014-10-17remove -C from usage();Jason McIntyre
2014-10-17remove -C from usage();Jason McIntyre
2014-10-17trivial replacement with reallocarray()Theo de Raadt
2014-10-17no need for realloc() front ends anymoreTheo de Raadt
2014-10-17Remove chunk special-casing malloc(siz) for realloc(NULL, siz). BitTheo de Raadt
tricky, but note the remembered size is in bss.
2014-10-17Remove non-exposed malloc/realloc/free wrappers, and then substituteTheo de Raadt
reallocarray() where it helps. ok doug
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-17fewer lies in the docs regarding performance modes after recent changes.Ted Unangst
2014-10-17remove performance throttling code from here, use the kernel versionTed Unangst
instead. this effectively kills -C, though the option is kept for compat.
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-16use reallocarray(); ok lteoTheo de Raadt
2014-10-16Use reallocarray() and remove a few archaic memory allocation practices.Theo de Raadt
ok deraadt
2014-10-16Additonal registers needs to be saved in sc_save2, not sc_save.Mark Kettenis
ok deraadt@
2014-10-16Kill the alloc command, which tried to measure behaviour based on sbrk.Theo de Raadt
Discussed with guenther.
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-16Use reallocarray() where possible. There are further possible overflowsTheo de Raadt
in the region, but my time is limited...
2014-10-16Fix bounds check for newlen without relying on unspecified behavior.Todd C. Miller
OK deraadt@
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-16we stopped building librt a while back. delete stubs.Ted Unangst
2014-10-161) Fix a segfault triggered by an input line containing two consecutiveIngo Schwarze
backspace characters beyond column MAX_SHRT, overflowing c_column. 2) Fix imcomplete initialization of the final element of the *count array by adding a missing pair of parentheses. 3) For code clarity and extra safety, change all variables dealing with column numbers from int to size_t such that they cannot overflow. Found while reviewing the patch from deraadt@'s reallocarray() rampage. Feedback and OK millert@.
2014-10-16use .fn here too. from Jean-Philippe OuelletTed Unangst
2014-10-16Repair BUF_strdup() breakage.Joel Sing
2014-10-16disable SSLv3Gilles Chehade
ok jsing@
2014-10-16Remove #ifdef HAVE_CONFIG_H, there is no config.h file.Alexander Bluhm
OK nicm@
2014-10-16No need to reserve separate KVA ranges for the RLE and copy pages inMike Larkin
hibernate anymore.