~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/random.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/random.h (Version linux-6.12-rc7) and /include/uapi/linux/random.h (Version linux-4.11.12)


  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux << 
  2 /*                                                  1 /*
  3  * include/linux/random.h                           2  * include/linux/random.h
  4  *                                                  3  *
  5  * Include file for the random number generato      4  * Include file for the random number generator.
  6  */                                                 5  */
  7                                                     6 
  8 #ifndef _UAPI_LINUX_RANDOM_H                        7 #ifndef _UAPI_LINUX_RANDOM_H
  9 #define _UAPI_LINUX_RANDOM_H                        8 #define _UAPI_LINUX_RANDOM_H
 10                                                     9 
 11 #include <linux/types.h>                           10 #include <linux/types.h>
 12 #include <linux/ioctl.h>                           11 #include <linux/ioctl.h>
 13 #include <linux/irqnr.h>                           12 #include <linux/irqnr.h>
 14                                                    13 
 15 /* ioctl()'s for the random number generator *     14 /* ioctl()'s for the random number generator */
 16                                                    15 
 17 /* Get the entropy count. */                       16 /* Get the entropy count. */
 18 #define RNDGETENTCNT    _IOR( 'R', 0x00, int )     17 #define RNDGETENTCNT    _IOR( 'R', 0x00, int )
 19                                                    18 
 20 /* Add to (or subtract from) the entropy count     19 /* Add to (or subtract from) the entropy count.  (Superuser only.) */
 21 #define RNDADDTOENTCNT  _IOW( 'R', 0x01, int )     20 #define RNDADDTOENTCNT  _IOW( 'R', 0x01, int )
 22                                                    21 
 23 /* Get the contents of the entropy pool.  (Sup !!  22 /* Get the contents of the entropy pool.  (Superuser only.) */
 24 #define RNDGETPOOL      _IOR( 'R', 0x02, int [     23 #define RNDGETPOOL      _IOR( 'R', 0x02, int [2] )
 25                                                    24 
 26 /*                                                 25 /* 
 27  * Write bytes into the entropy pool and add t     26  * Write bytes into the entropy pool and add to the entropy count.
 28  * (Superuser only.)                               27  * (Superuser only.)
 29  */                                                28  */
 30 #define RNDADDENTROPY   _IOW( 'R', 0x03, int [     29 #define RNDADDENTROPY   _IOW( 'R', 0x03, int [2] )
 31                                                    30 
 32 /* Clear entropy count to 0.  (Superuser only.     31 /* Clear entropy count to 0.  (Superuser only.) */
 33 #define RNDZAPENTCNT    _IO( 'R', 0x04 )           32 #define RNDZAPENTCNT    _IO( 'R', 0x04 )
 34                                                    33 
 35 /* Clear the entropy pool and associated count     34 /* Clear the entropy pool and associated counters.  (Superuser only.) */
 36 #define RNDCLEARPOOL    _IO( 'R', 0x06 )           35 #define RNDCLEARPOOL    _IO( 'R', 0x06 )
 37                                                    36 
 38 /* Reseed CRNG.  (Superuser only.) */          << 
 39 #define RNDRESEEDCRNG   _IO( 'R', 0x07 )       << 
 40                                                << 
 41 struct rand_pool_info {                            37 struct rand_pool_info {
 42         int     entropy_count;                     38         int     entropy_count;
 43         int     buf_size;                          39         int     buf_size;
 44         __u32   buf[];                         !!  40         __u32   buf[0];
 45 };                                                 41 };
 46                                                    42 
 47 /*                                                 43 /*
 48  * Flags for getrandom(2)                          44  * Flags for getrandom(2)
 49  *                                                 45  *
 50  * GRND_NONBLOCK        Don't block and return     46  * GRND_NONBLOCK        Don't block and return EAGAIN instead
 51  * GRND_RANDOM          No effect              !!  47  * GRND_RANDOM          Use the /dev/random pool instead of /dev/urandom
 52  * GRND_INSECURE        Return non-cryptograph << 
 53  */                                                48  */
 54 #define GRND_NONBLOCK   0x0001                     49 #define GRND_NONBLOCK   0x0001
 55 #define GRND_RANDOM     0x0002                     50 #define GRND_RANDOM     0x0002
 56 #define GRND_INSECURE   0x0004                 << 
 57                                                << 
 58 /**                                            << 
 59  * struct vgetrandom_opaque_params - arguments << 
 60  *                                             << 
 61  * @size_per_opaque_state:      Size of each s << 
 62  * @mmap_prot:                  Value of the p << 
 63  * @mmap_flags:                 Value of the f << 
 64  * @reserved:                   Reserved for f << 
 65  */                                            << 
 66 struct vgetrandom_opaque_params {              << 
 67         __u32 size_of_opaque_state;            << 
 68         __u32 mmap_prot;                       << 
 69         __u32 mmap_flags;                      << 
 70         __u32 reserved[13];                    << 
 71 };                                             << 
 72                                                    51 
 73 #endif /* _UAPI_LINUX_RANDOM_H */                  52 #endif /* _UAPI_LINUX_RANDOM_H */
 74                                                    53 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php