Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | "Race-free because we're running single-threaded in a new | deraadt | 2014-07-17 | 1 | -1/+5 | |
| | | | | | address space, and once allocated rs is never deallocated." document the forkhandler to save reviewers time, with matthew | |||||
* | #ifdef wrap the _rs_forkhandler | deraadt | 2014-07-16 | 1 | -1/+3 | |
| | ||||||
* | added handler for an atfork hook from kettenis@ | bcook | 2014-07-16 | 1 | -1/+10 | |
| | | | | ok deraadt@ beck@ kettenis@ | |||||
* | tweak previous; | jmc | 2014-07-13 | 1 | -2/+2 | |
| | ||||||
* | missing bracket in previous; | jmc | 2014-07-13 | 1 | -2/+2 | |
| | ||||||
* | Update BUGS section. | miod | 2014-07-13 | 1 | -4/+6 | |
| | ||||||
* | oops, i deleted the wrong word | tedu | 2014-07-13 | 1 | -2/+2 | |
| | ||||||
* | remove a lie spotted by guenther | tedu | 2014-07-13 | 1 | -5/+4 | |
| | ||||||
* | once srandomdev() is called, switch to using arc4random() but mask off the | tedu | 2014-07-13 | 1 | -12/+10 | |
| | | | | | high bit as required by posix. wouldn't want to break any standards. idea and ok deraadt | |||||
* | Split out ntoh[ls] and hton[ls] into their own manpage. | guenther | 2014-07-13 | 3 | -136/+199 | |
| | | | | | | Update byteorder(3) to cover the new functions in <endian.h> ok deraadt@ millert@ | |||||
* | While we thought this would make portable life easier it actually | beck | 2014-07-13 | 1 | -3/+1 | |
| | | | | | makes it much harder. ok bcook@ kettenis@ | |||||
* | Wrap "thread_private.h" with #ifdef __OpenBSD__ so that other systems | deraadt | 2014-07-12 | 1 | -1/+3 | |
| | | | | | | can copy this file (plus chacha_private.h) directly and reuse it trivially. Well, as long as they have a getentropy() as well.. ok beck | |||||
* | Split arc4random_uniform into it's own file, to assist other projects | deraadt | 2014-07-12 | 3 | -39/+60 | |
| | | | | | | now using this as upstream code. The particular problem is systems that contain older arc4random derivations lacking arc4random_uniform(). ok tedu miod | |||||
* | Add locking for __cxa_finalize() as it modifies the page permissions of the | kettenis | 2014-07-11 | 1 | -1/+5 | |
| | | | | | | | __atexit tables and touches global variables. From Srinavasa Nagaraju through Android/Elliott Hughes. ok tedu@, guenther@ | |||||
* | better document perils of setuid getenv and xr with issetugid | tedu | 2014-07-11 | 1 | -2/+10 | |
| | | | | ok deraadt | |||||
* | as noted by google/android via kettenis, atexit handlers can install new | tedu | 2014-07-10 | 1 | -1/+8 | |
| | | | | | handlers. if this happens, restart the loop. ok kettenis matthew millert miod | |||||
* | reduce obvious dependency on global g_pool by moving to local aliases | tedu | 2014-07-09 | 1 | -42/+48 | |
| | | | | ok otto | |||||
* | rephrase the stpcpy() warning | naddy | 2014-07-09 | 1 | -2/+2 | |
| | | | | new wording agreed by at least kettenis@ millert@ otto@ | |||||
* | Clean up after arc4random u_int32_t uint32_t change | beck | 2014-07-09 | 1 | -5/+5 | |
| | | | | ok jsing@ | |||||
* | changes to improve portability | bcook | 2014-07-09 | 1 | -10/+11 | |
| | | | | ok beck@ deraadt@ jsing@ guenther@ | |||||
* | re-init and init code paths are now more shared, so the getpid()-based | deraadt | 2014-06-27 | 1 | -2/+3 | |
| | | | | portable code path must handle that; with brent cook | |||||
* | extra evil spaces snuck in over the last while | deraadt | 2014-06-27 | 1 | -20/+20 | |
| | ||||||
* | Move to a smaller rbytes buffer and skip a random part. Not to | otto | 2014-06-27 | 1 | -3/+4 | |
| | | | | | | improve the random stream itself (it doesn't), but to introduce noise in the arc4random calling pattern. Thanks to matthew@ who pointed out bias in a previous diff, ok deraadt@ matthew@ | |||||
* | Add back an #ifndef MAP_INHERIT_ZERO chunk to support the old getpid() | deraadt | 2014-06-26 | 1 | -1/+13 | |
| | | | | | mechanism, to aid in portability to other systems as requested. ok matthew | |||||
* | document why we explicit_bzero | deraadt | 2014-06-25 | 1 | -2/+2 | |
| | ||||||
* | loosen the spec for timingsafe functions slightly, so as to not | tedu | 2014-06-21 | 1 | -10/+5 | |
| | | | | artificially constrain alternative implementations. ok deraadt | |||||
* | Protect explicit_bzero() from link-time optimization | matthew | 2014-06-21 | 1 | -7/+10 | |
| | | | | | | | | | | | | | | | | | | | | Modern compiler toolchains are capable of optimizing even across translation unit boundaries, so simply moving the memory clearing into a separate function is not guaranteed to clear memory. To avoid this, we take advantage of ELF weak symbol semantics, and insert a call to an empty, weakly named function. The semantics of calling this function aren't determinable until load time, so the compiler and linker need to keep the memset() call. There are still ways a toolchain might defeat this trick (e.g., optimistically expecting the weak symbol to not be overloaded, and only calling memset() if it is; promoting weak symbols to strong symbols at link-time when emitting a static binary because they won't be interposed; implementing load-time optimizations). But at least for the foreseeable future, these seem unlikely. ok deraadt | |||||
* | arc4random: hard fail with raise(SIGKILL) if getentropy() returns -1 | matthew | 2014-06-20 | 1 | -3/+4 | |
| | | | | | | | Allow other non-zero return values in case we change our mind to return an ssize_t byte count instead of simple success/fail. ok deraadt, djm | |||||
* | Move rs_chacha and rs_buf into the same memory page and don't mark it | matthew | 2014-06-19 | 1 | -22/+31 | |
| | | | | | | | | | MAP_INHERIT_ZERO anymore. This restores arc4random's previous behavior where fork children would mix in some randomness from the parent process. New behavior noticed by deraadt ok deraadt, tedu | |||||
* | Always call atexit handlers as if they were registered with __cxa_atexit. | kettenis | 2014-06-18 | 2 | -14/+8 | |
| | | | | | | | | | | | The extra argument doesn't hurt genuine atexit handlers and this fixes a bug where we didn't provide the argument (effectively passing garbage) for functions registered with __cxa_atexit in the main executable. Pointed out by Dmitriy Ivanov <dimitry@google.com> and Elliott Hughes <enh@google.com>. ok matthew@ | |||||
* | Use MAP_INHERIT_ZERO in arc4random(3) | matthew | 2014-06-17 | 1 | -37/+44 | |
| | | | | | | | | Now instead of calling getpid() each time a user invokes arc4random(), we're able to rely on the kernel zero'ing out the RNG state if the process forks. ok deraadt, djm | |||||
* | oops, typo. James Hartley is fast at trying -current | deraadt | 2014-06-15 | 1 | -2/+2 | |
| | ||||||
* | In srandomdev(), use arc4random_buf() instead of from the kernel. | deraadt | 2014-06-15 | 1 | -4/+3 | |
| | | | | discussion with matthew | |||||
* | For now... assume success of getentropy() just like we assumed success | deraadt | 2014-06-13 | 1 | -3/+3 | |
| | | | | of sysctl(). Mark it with XXX while we consider. | |||||
* | Remove deprecated RFC2292 ancillary data convenience functions. | chrisz | 2014-06-13 | 2 | -488/+2 | |
| | | | | | | They are obsoleted by the RFC3542 api. ok mpi@ | |||||
* | use getgentropy() call. If it fails, things are pretty bad -- | deraadt | 2014-06-13 | 1 | -8/+3 | |
| | | | | | call abort(). this direction discussed at length with miod beck tedu matthew etc | |||||
* | use getentropy; from matthew | deraadt | 2014-06-13 | 1 | -5/+2 | |
| | ||||||
* | Add timingsafe_memcmp(). | matthew | 2014-06-13 | 5 | -33/+152 | |
| | | | | ok deraadt, jmc, tedu | |||||
* | Disable the "switch to insertion sort" optimization to avoid quadratic | millert | 2014-06-12 | 1 | -13/+2 | |
| | | | | behavior for certain inputs. From NetBSD. OK tedu@ | |||||
* | Really remove the obsolete manpages left by earlier commit | chrisz | 2014-06-11 | 2 | -0/+0 | |
| | | | | which just emptied the file but didn't remove it. | |||||
* | Remove manpages about deprecated RFC2292 ancillary data convenience functions. | chrisz | 2014-06-11 | 4 | -769/+4 | |
| | | | | | | They are obsoleted by the RFC3542 api. ok mpi@ | |||||
* | mop up ifndef KERNEL goo; ok miod | deraadt | 2014-06-10 | 12 | -60/+12 | |
| | ||||||
* | move random bytes buffer to be part of mmaped pages; ok tedu@ | otto | 2014-06-02 | 1 | -21/+18 | |
| | ||||||
* | Delete the extraneous "return" statement at the end of a void function. | jca | 2014-05-31 | 1 | -2/+1 | |
| | | | | From Fritjof Bornebusch. | |||||
* | move all stats collecting under MALLOC_STATS; ok krw@ | otto | 2014-05-26 | 1 | -28/+33 | |
| | ||||||
* | fix MALLOC_STATS (not compiled in by default); ok tedu@ | otto | 2014-05-21 | 1 | -18/+19 | |
| | ||||||
* | factor out a bit of the chunk index code and use it to make sure that a | tedu | 2014-05-18 | 1 | -14/+33 | |
| | | | | | freed chunk is actually freeable immediately. catch more errors. hints/ok otto | |||||
* | correctly match size and buffer. from enh at google | tedu | 2014-05-17 | 1 | -3/+3 | |
| | ||||||
* | Add missing header needed by isdigit(). | chl | 2014-05-17 | 1 | -4/+5 | |
| | | | | | | While there, sort headers. ok tedu@ | |||||
* | refactor some of the des crypt code to use fewer globals. | tedu | 2014-05-17 | 2 | -42/+45 | |
| | | | | ok miod |