summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-28crank the versionTheo de Raadt
2013-12-28Try to load entropy data from disk:/etc/random.seed, and additionallyTheo de Raadt
use a MD-supplied random function. Then, insert this into the ELF openbsd.randomdata of the kernel, so that it has entropy right from the start. Some help from jsing for the softraid aspects. Also tested by phessler
2013-12-28If we fail to decrypt the softraid keys, return EPERM rather than fallingJoel Sing
through and failing when we attempt to read and validate the disklabel. Also return ENOTSUP rather than EPERM if an attempt is made to write to a softraid volume.
2013-12-28Use preprocessor symbols where possible.Theo de Raadt
2013-12-28Prevent GCC from inlining these unsafe builtins: sprintf, vsprintf,Martynas Venckus
stpcpy, strcat, strcpy. Also don't simplify some safe builtins into unsafe ones, otherwise we'll hit the linker with the bogus warning. OK miod@, millert@.
2013-12-28Add initial implementations of early MD random, for use in the boot code.Joel Sing
This makes use of rdrand if the CPU supports it, otherwise we fall back to using rdtsc. Further development will happen in the tree. Tested by phessler@ ok deraadt@
2013-12-28Add regression tests to check whether GCC folds unsafe builtins andMartynas Venckus
actually shows the security warning. Also add some other cases where GCC used to yield the warning but shouldn't (e.g. strncat simplified into strcat).
2013-12-28Annotate a few more bounded functions: realpath(3) needs a bufferMartynas Venckus
of size at least PATH_MAX. pread(2), pwrite(2) and readlinkat(2) also take the buffer and the bound. OK theo.
2013-12-28document a hack we want fixed laterTheo de Raadt
2013-12-27- add chmod of seedfile in /etcRobert Peichaer
- use its return code for single/multiuser detection ok deraadt
2013-12-27re-use random_seed in shutdown sectionRobert Peichaer
ok deraadt
2009-10-15import of gcc-4.2.1, the last gcc release under GPLv2Robert Nagy
2013-12-27correct commentDamien Miller
2013-12-27create a seed file for the bootloader in /etc/random.seedTheo de Raadt
2013-12-27nest random_seed() contents into a single redirectionTheo de Raadt
idea from rpe
2013-12-27make the original RSA and DSA signing/verification code look more likeDamien Miller
the ECDSA/Ed25519 ones: use key_type_plain() when checking the key type rather than tediously listing all variants, use __func__ for debug/ error messages
2013-12-27re-do shutdown operations. Run the scripts if we may; take down carpTheo de Raadt
unconditionally, and then do the optional powerdown discussed at length with rpe
2013-12-27remove lots from the Makefile, since this never depended on libsa.Theo de Raadt
2013-12-27syncTheo de Raadt
2013-12-27oops, correct wordingTheo de Raadt
2013-12-27correct comment about why first 16 pages are skipped: SMI corruptionTheo de Raadt
is the real cause discussed with mlarkin
2013-12-27from netbsd, free(bbp) in error paths. Coverity CID 274748.Theo de Raadt
via Loganaden Velvindron
2013-12-27do not need to create the stack cookie using a constructor anymore,Theo de Raadt
since the kernel supplies a .openbsd.randomdata segment. ok matthew miod guenther
2013-12-27/stand went awayTheo de Raadt
prompted by jmc
2013-12-27/stand has not been used in decadesTheo de Raadt
ok miod
2013-12-27Instead of playing #include games to get a 32-bit ELF implementation onJoel Sing
amd64, simply compile in our own nlist_elf32. Remove ECOFF and AOUT from the nlist implementation since we do not need it. This makes the code identical for the i386 and amd64 versions of installboot(8).
2013-12-27Add installboot support for hppa.Joel Sing
2013-12-27Provide a bootstrap implementation (effectively a `disklabel -B'Joel Sing
equivalent) for use with architectures like hppa, landisk and vax.
2013-12-27Add installboot support for amd64.Joel Sing
2013-12-27Rename some confusing variables.Joel Sing
2013-12-27Initial version of a unified installboot(8) that lives outside ofJoel Sing
sys/arch/${MACHINE}/stand. For now this only supports i386, however additional architectures will be added and further development can happen in tree. Requested by deraadt@ quite some time ago.
2013-12-27when forcing a re-key, might as well toss in dmesg as additional seedTheo de Raadt
material
2013-12-27all the random devices have been the same for a while; so let us avoidTheo de Raadt
being obtuse and use /dev/random
2013-12-27remove non-openbsd.randomdata partsTheo de Raadt
ok miod matthew
2013-12-27Add HISTORY and AUTHORS; triggered by a shorter patch from bcallah@.Ingo Schwarze
OK bcallah@ on a previous version, plus feedback from guenther@.
2013-12-27Document the P_SUSPSINGLE flag bitPhilip Guenther
2013-12-26When running the ll/sc version of the mutex code (for MULTIPROCESSOR kernels),Miod Vallat
correctly handle sc failures. All other ll/sc constructs were doing this correctly but apparently noone had noticed mutex did not.
2013-12-26Back at t2k13, I wrote code to park APs in real mode before resuming aMike Larkin
hibernated image. We backed out the code because it was causing reboots on resume. Turns out the parking code had a bug that caused the CPU to jump to some bogus address (calculating a bad offset for the jump target), which was likely the source of the problem. This diff fixes the bad offset calculation (verified by looking at the resulting asm output). This will be the first step in attempting to resurrect the original idea (and eventually add i386 if/when it works). discussed with deraadt@
2013-12-26make absence of pkg_scripts non silent, after nits from theo and halex.Marc Espie
okay rpe@, kirby@
2013-12-26constify data parameter in imsg_add() and imsg_compose()Eric Faurot
ok deraadt@
2013-12-26bcopy -> memmoveEric Faurot
bzero -> memset
2013-12-26Rework the documentation of Spaces, using the Ossanna/Kernighan/RitterIngo Schwarze
Heirloom Nroff/Troff User's Manual at the authoritative reference. Part of our text was outright wrong. Also, refrain from advertising the paddable non-breaking space `\~' in the DESCRIPTION, for three reasons: For nroff mode, -Tascii, and fixed width fonts in general, it makes no difference, so keep the discussion simple. Compared to `\ ', '\~' is of questionable portability. And if you want to keep words together, it is also more usual that you don't want padding to intervene either. Finally, drop the `\c' escape sequence (interrupt text processing) which is not a special character but an input processing instruction akin to the \<newline> escape sequence.
2013-12-26spacingMark Kettenis
2013-12-26to be dealt withMarc Espie
2013-12-26either dvp == vp or dvp != vp: zap extra test.Marc Espie
okay guenther@
2013-12-26I have no idea how it happened that \B, \H, \h, \L, and \l gotIngo Schwarze
mapped to ESCAPE_NUMBERED (which is for \N and only for \N), that made no sense at all. Properly remap them to ESCAPE_IGNORE. While here, move \B and \w from the group taking number arguments to the group taking string arguments; right now, that doesn't imply any functional change, but if we ever go ahead and implement a parser for roff(7) numerical expressions, it will suddenly start to matter, and cause confusion.
2013-12-26The roff language really has two groups of basic building blocks:Ingo Schwarze
Requests and escape sequences. Consequently, supplement the REQUEST REFERENCE by an ESCAPE SEQUENCE REFERENCE, such that people no longer need to guess or experiment what mandoc(1) implements, what it parses and ignores, and what it doesn't handle at all.
2013-12-25Parse and ignore the roff(7) escape sequences \d (move half line down)Ingo Schwarze
und \u (move half line up). Found by bentley@ in some DocBook crap. Surprisingly, these two do actually occur in our terminfo(5), so this patch reduces groff-mandoc differences in base by 0.03%.
2013-12-25repair the datesIngo Schwarze
2013-12-25Implement .Fo/.Fa/.Fc indentation and break handling for -Tman.Ingo Schwarze