History log of /haiku/src/add-ons/kernel/bus_managers/random/driver.cpp
Revision Date Author Comments
# 6bde05ae 29-Aug-2023 Augustin Cavalier <waddlesplash@gmail.com>

libs/bsd: Implement getentropy(2).

With generic_syscall to avoid using a FD.

Change-Id: Id1702118bb673f06a861e4f0ad3401ce3d45cbd0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/31
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 425ac1b6 20-Jun-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

refactor: Swap %Ld for %lld in all format usages

* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 215b685f 11-Dec-2022 X512 <danger_mail@list.ru>

kernel: Drop non-standard GNU inline assignment syntax

* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff

Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 34e92438 19-Nov-2022 Jérôme Duval <jerome.duval@gmail.com>

random: always use the PRNG, and use entropy sources to feed it

remove the yarrow module. the hardware modules can push entropy with queue_randomness().
virtio_rng will now push entropy every 300 seconds.
helps with #14937

Change-Id: If76c5deabf61dc616a0e051332f44b89deb6b8a1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5824
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 1029af17 01-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

Add missing includes following previous commit.

All these files were making use of headers included indirectly
through AutoLock.h that are now no longer following the previous commit.


# 84f33567 30-Oct-2018 Augustin Cavalier <waddlesplash@gmail.com>

random: Fix mutex use-after-destroy.

sRandomLock is a driver-global lock used by all instances of the "random"
device, of which there can be more than one, it seems; and somehow some
are destroyed before others. I didn't really investigate too far to see
under what circumstances that occurs.

Found while trying to compile some ports; suddenly all attempted
reads of /dev/random started PANIC'ing with "mutex uninitialized".


# 1ab38414 08-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

CID 1108455 Structurally dead code


# c5603138 23-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

random: remove non Haiku code.


# 8d2bf695 29-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

random: add a Virtio RNG module

* The default module is replaced by the Virtio RNG module when found.
* This can have the undesired effect of rendering /dev/urandom slow.
* Tested with the following QEmu command line option:
-device virtio-rng-pci,rng=rng0 -object rng-random,filename=/dev/random,id=rng0
* moved random.h to private/drivers headers.


# f73fb105 27-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

random: added a bus interface for RNG modules.

* Yarrow RNG is the default RNG module.


# 7032e703 27-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

random: move to bus_managers/


# 1ab38414b16d4ee91e46e7fa25fe9e44cee1354c 08-Nov-2013 Jérôme Duval <jerome.duval@gmail.com>

CID 1108455 Structurally dead code


# c5603138e5244e54be09b06af9de4bd3fd91f841 23-Oct-2013 Jérôme Duval <jerome.duval@gmail.com>

random: remove non Haiku code.


# 8d2bf6953e851d431fc67de1bc970c40afa79e9f 29-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

random: add a Virtio RNG module

* The default module is replaced by the Virtio RNG module when found.
* This can have the undesired effect of rendering /dev/urandom slow.
* Tested with the following QEmu command line option:
-device virtio-rng-pci,rng=rng0 -object rng-random,filename=/dev/random,id=rng0
* moved random.h to private/drivers headers.


# f73fb1051dbdebede4a6ecec5b37674237f0b528 27-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

random: added a bus interface for RNG modules.

* Yarrow RNG is the default RNG module.


# 7032e7033039a3bea39e49fdd7084369ce9c7d47 27-Aug-2013 Jérôme Duval <jerome.duval@gmail.com>

random: move to bus_managers/