XenevaOS
Loading...
Searching...
No Matches
random.h
Go to the documentation of this file.
1#ifndef __LINUX_RANDOM_H__
2#define __LINUX_RANDOM_H__
3
4/*
5 * DCL <linux/random.h> -- the /dev/random + /dev/urandom fops mem.c's
6 * devlist[] points at. mainline keeps them in drivers/char/random.c on top
7 * of its own ChaCha20 pool; DCL binds them straight to Xeneva's hardware
8 * RNG (hwrng_read_bytes, already wired to virtio_rng.ko by the kmod shim),
9 * so the bytes are real entropy rather than a second, weaker PRNG.
10 *
11 * Declared here exactly as mainline does, consumed by DCL/linux_mm_shim.c.
12 */
13
14#include <linux/fs.h>
15
16extern const struct file_operations random_fops;
17extern const struct file_operations urandom_fops;
18
19void get_random_bytes(void* buf, unsigned long nbytes);
20
21/* Mainline credits input timing through its CRNG. Xeneva has a hardware
22 * RNG, so the hook exists for the input core but contributes nothing. */
23void add_input_randomness(unsigned int type, unsigned int code, int value);
24
25#endif /* __LINUX_RANDOM_H__ */
void add_input_randomness(unsigned int type, unsigned int code, int value)
void get_random_bytes(void *buf, unsigned long nbytes)
const struct file_operations random_fops
const struct file_operations urandom_fops
Definition fs.h:67