mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 23:40:25 +07:00
38e9efcdb3
struct rnd_state got mistakenly pulled into uapi header. It is not
used anywhere and does also not belong there!
Commit 5960164fde
("lib/random32: export pseudo-random number
generator for modules"), the last commit on rnd_state before it
got moved to uapi, says:
This patch moves the definition of struct rnd_state and the inline
__seed() function to linux/random.h. It renames the static __random32()
function to prandom32() and exports it for use in modules.
Hence, the structure was moved from lib/random32.c to linux/random.h
so that it can be used within modules (FCoE-related code in this
case), but not from user space. However, it seems to have been
mistakenly moved to uapi header through the uapi script. Since no-one
should make use of it from the linux headers, move the structure back
to the kernel for internal use, so that it can be modified on demand.
Joint work with Hannes Frederic Sowa.
Cc: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
/*
|
|
* include/linux/random.h
|
|
*
|
|
* Include file for the random number generator.
|
|
*/
|
|
|
|
#ifndef _UAPI_LINUX_RANDOM_H
|
|
#define _UAPI_LINUX_RANDOM_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/ioctl.h>
|
|
#include <linux/irqnr.h>
|
|
|
|
/* ioctl()'s for the random number generator */
|
|
|
|
/* Get the entropy count. */
|
|
#define RNDGETENTCNT _IOR( 'R', 0x00, int )
|
|
|
|
/* Add to (or subtract from) the entropy count. (Superuser only.) */
|
|
#define RNDADDTOENTCNT _IOW( 'R', 0x01, int )
|
|
|
|
/* Get the contents of the entropy pool. (Superuser only.) */
|
|
#define RNDGETPOOL _IOR( 'R', 0x02, int [2] )
|
|
|
|
/*
|
|
* Write bytes into the entropy pool and add to the entropy count.
|
|
* (Superuser only.)
|
|
*/
|
|
#define RNDADDENTROPY _IOW( 'R', 0x03, int [2] )
|
|
|
|
/* Clear entropy count to 0. (Superuser only.) */
|
|
#define RNDZAPENTCNT _IO( 'R', 0x04 )
|
|
|
|
/* Clear the entropy pool and associated counters. (Superuser only.) */
|
|
#define RNDCLEARPOOL _IO( 'R', 0x06 )
|
|
|
|
struct rand_pool_info {
|
|
int entropy_count;
|
|
int buf_size;
|
|
__u32 buf[0];
|
|
};
|
|
|
|
#endif /* _UAPI_LINUX_RANDOM_H */
|