include/uapi/linux/random.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/random.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/random.h
Extension
.h
Size
1912 bytes
Lines
74
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct rand_pool_info {
	int	entropy_count;
	int	buf_size;
	__u32	buf[];
};

/*
 * Flags for getrandom(2)
 *
 * GRND_NONBLOCK	Don't block and return EAGAIN instead
 * GRND_RANDOM		No effect
 * GRND_INSECURE	Return non-cryptographic random bytes
 */
#define GRND_NONBLOCK	0x0001
#define GRND_RANDOM	0x0002
#define GRND_INSECURE	0x0004

/**
 * struct vgetrandom_opaque_params - arguments for allocating memory for vgetrandom
 *
 * @size_per_opaque_state:	Size of each state that is to be passed to vgetrandom().
 * @mmap_prot:			Value of the prot argument in mmap(2).
 * @mmap_flags:			Value of the flags argument in mmap(2).
 * @reserved:			Reserved for future use.
 */
struct vgetrandom_opaque_params {
	__u32 size_of_opaque_state;
	__u32 mmap_prot;
	__u32 mmap_flags;
	__u32 reserved[13];
};

#endif /* _UAPI_LINUX_RANDOM_H */

Annotation

Implementation Notes