summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Round bits up and target full pool sizeJason A. Donenfeld2022-04-041-2/+2
| | | | | | | Rather than rounding bits down, round them up. Otherwise 249 bits full in a 256 bit pool won't ever get filled up with the additional 7 bits. In addition, target a full pool rather than a half pool, since a full pool is sometimes required.
* Bumnped version to 1.9.18Jirka Hladky2022-01-142-3/+3
|
* Added new verbose modeJirka Hladky2022-01-062-2/+16
|
* Bumped version to v1.9.17Jirka Hladky2022-01-021-1/+1
|
* Fixed exist status when using --once option. Updated man pageJirka Hladky2022-01-021-1/+3
|
* Updated Copyright message (year). Added log messagesJirka Hladky2021-12-3113-32/+45
|
* New parameter --once to refill entropy once and quit immediatellyJirka Hladky2021-12-312-1/+11
|
* Updated configure scriptJirka Hladky2021-12-311-0/+1
|
* Removed debug messageJirka Hladky2021-12-301-4/+3
|
* Add entropy unconditionally at start and then every 60 secondsJirka Hladky2021-12-291-1/+24
|
* Fix: haveged cannot be run as an application if also running as a daemonJirka Hladky2021-11-031-1/+1
|
* Bumped version to v1.9.16Jirka Hladky2021-09-301-1/+1
|
* Fix for https://github.com/jirka-h/haveged/issues/62Jirka Hladky2021-09-301-4/+4
|
* Removed init.dJirka Hladky2021-09-301-4/+2
|
* Fixed issue #60Jirka Hladky2021-08-301-1/+3
|
* Preparing v1.9.15 releaseJirka Hladky2021-03-241-1/+1
|
* Check for sys/auxv.h before using it.Peter Seiderer2021-03-211-0/+4
| | | | | | | | | | | | - fixes uclibc-ng compile (does not provide sys/auxv.h header file) Fixes: haveged.c:22:10: fatal error: sys/auxv.h: No such file or directory 22 | #include <sys/auxv.h> | ^~~~~~~~~~~~ Signed-off-by: Peter Seiderer <ps.report@gmx.net>
* Preparing v1.9.14 releaseJirka Hladky2021-01-022-2/+2
|
* Updated year to 2021Jirka Hladky2021-01-012-2/+2
|
* Preparing version 1.9.14Jirka Hladky2021-01-0112-13/+13
|
* Fix error handling as well as add new commandWerner Fink2020-11-254-83/+221
| | | | | | | for closing the communication socket. As well as get error messages back from running instance to client process. Signed-off-by: Werner Fink <werner@suse.de>
* Fixed compiler warningsJirka Hladky2020-10-114-6/+22
|
* don't fail completely if we can't set write wakeup watermarkDan Streetman2020-09-081-0/+3
| | | | | | We won't have access to change the watermark if we're running in an unprivileged container, so if the error is EACCES just warn and continue
* Fixed Wsign-compare compiler warningsJirka Hladky2020-07-011-2/+2
|
* Use labs()Chocobo12020-06-301-1/+1
| | | | Because the parameter is `long int` type.
* Add fallthrough comment to switch casesChocobo12020-06-303-0/+23
|
* Use proper initializerChocobo12020-06-301-2/+2
| | | | This was the compiler warning: "warning: ISO C forbids empty initializer braces"
* Avoid using gnu printf specifierChocobo12020-06-301-1/+1
| | | | http://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html
* Enable more compiler warningsChocobo12020-06-301-1/+1
|
* Use proper printf specifier for unsigned integer typeChocobo12020-06-302-10/+10
|
* Fixed spellingv1.9.13Jirka Hladky2020-06-281-3/+3
|
* Added support for --verionJirka Hladky2020-06-282-2/+18
|
* Bumped version to 1.9.12v1.9.12Jirka Hladky2020-06-181-1/+1
|
* fix a memory leak in havege_destroyAnakin Zhang2020-06-171-1/+1
|
* Updated version to v1.9.11v1.9.11Jirka Hladky2020-06-111-1/+1
|
* Fixed https://github.com/jirka-h/haveged/issues/29Jirka Hladky2020-05-1113-18/+45
|
* Merge pull request #28 from johnou/patch-1jirka-h2020-05-111-0/+8
|\ | | | | don't use SOCK_CLOEXEC or SOCK_NONBLOCK if not available
| * don't use SOCK_CLOEXEC or SOCK_NONBLOCK if not availableJohno Crawford2020-03-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Avoids these errors: havegecmd.c: In function ‘cmd_listen’: havegecmd.c:105: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function) havegecmd.c:105: error: (Each undeclared identifier is reported only once havegecmd.c:105: error: for each function it appears in.) havegecmd.c:105: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function) havegecmd.c: In function ‘cmd_connect’: havegecmd.c:154: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function) havegecmd.c:154: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function)
* | haveged: fix crash on shutdown in threaded modeSergei Trofimovich2020-05-013-1/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug happens when havege is built with --enable-threads. On shutdown the following crash happens: ``` 3109 p = mem2chunk (mem); (gdb) bt #0 __GI___libc_free (mem=0x7f630c066000) at malloc.c:3109 #1 0x00007f630c035f9e in havege_destroy (hptr=0x564b56b6b900) at havege.c:197 #2 0x0000564b561c3dca in error_exit (format=<optimized out>) at haveged.c:708 #3 0x0000564b561c33f1 in run_daemon (argv=0x7ffce7627758, path=0x564b56b6b2a0 ``` valgrind helped me to understand it was a mmap() / free() mismatch: ``` For lists of detected and suppressed errors, rerun with: -s ERROR SUMMARY: 14 errors from 2 contexts (suppressed: 0 from 0) Invalid free() / delete / delete[] / realloc() at 0x48389CB: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x48AED9F: havege_destroy (havege.c:197) by 0x10BCA5: error_exit (haveged.c:708) by 0x10B1B7: run_daemon (haveged.c:573) by 0x10B1B7: main (haveged.c:470) Address 0x4845000 is in a rw- anonymous segment ``` It happens due to a few factors: 1. havege is built in threaded mode, there parent pid is stored in shared memory and is expected to free resources. 2. havege is ran in daemon mode, that means havege changes pid when detaches from terminal with daemon(). Combination of [1.] and [2.] causes main process to avoid munmap() and inctead fallback to free() at: ```c void havege_destroy(H_PTR hptr) { ... if (!havege_exit(hptr)) // <- here incorrect pid-based detection happens return; if (0 != (temp=hptr->io_buf)) { hptr->io_buf = 0; free(temp); // <--- here free() happens } ``` The change adds a helper to update parent pid with `havege_reparent` helper. It might not be a very clean fix, but it should be good enough to illustrate the problem. Bug: https://bugs.gentoo.org/720286 Reported-by: Marcin Mirosław Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* build: Fix compilation with --enable-threadsLars Wendler2019-11-141-1/+1
| | | | | | | | | | | Previously failed with: havegetune.c:190:12: error: ‘BUILD_THREAD’ undeclared (first use in this function); did you mean ‘BUILD_THREADS’? 190 | *bp++ = BUILD_THREAD; | ^~~~~~~~~~~~ | BUILD_THREADS Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
* Preparing 1.9.8 releasev1.9.8aJirka Hladky2019-09-301-1/+1
|
* Preparing 1.9.7 releaseJirka Hladky2019-09-302-11/+7
|
* Fix for Unresolved symbol error_exit in libhavege #20 by pld-gitsyncv1.9.7-alphav1.9.7Jirka Hladky2019-09-301-5/+4
|
* New version 1.9.5v1.9.5-alphaJirka Hladky2019-08-201-1/+1
|
* Added test for /dev/random symlinkJirka Hladky2019-08-201-0/+7
|
* Update to automake 1.16Jirka Hladky2019-08-201-49/+52
|
* Merge pull request #14 from brada4/masterjirka-h2019-08-191-1/+1
|\ | | | | fix segv at start
| * minimize diffAndrew2019-08-161-1/+1
| |
| * minimize diffAndrew2019-08-161-1/+1
| |
| * take into account review by @nbraudAndrew2019-08-161-2/+2
| |