3 @@ -141,6 +141,7 @@ SYSCALL_DEFINE1(dup, unsigned int, filde
7 +EXPORT_SYMBOL(sys_dup);
9 #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
11 --- a/include/linux/miscdevice.h
12 +++ b/include/linux/miscdevice.h
14 #define APOLLO_MOUSE_MINOR 7
15 #define PC110PAD_MINOR 9
16 /*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */
17 +#define CRYPTODEV_MINOR 70 /* /dev/crypto */
18 #define WATCHDOG_MINOR 130 /* Watchdog timer */
19 #define TEMP_MINOR 131 /* Temperature Sensor */
21 --- a/include/linux/random.h
22 +++ b/include/linux/random.h
25 #include <linux/types.h>
26 #include <linux/ioctl.h>
27 +#include <linux/types.h> /* for __u32 in user space */
28 #include <linux/irqnr.h>
30 /* ioctl()'s for the random number generator */
32 /* Clear the entropy pool and associated counters. (Superuser only.) */
33 #define RNDCLEARPOOL _IO( 'R', 0x06 )
35 +#ifdef CONFIG_FIPS_RNG
37 +/* Size of seed value - equal to AES blocksize */
38 +#define AES_BLOCK_SIZE_BYTES 16
39 +#define SEED_SIZE_BYTES AES_BLOCK_SIZE_BYTES
40 +/* Size of AES key */
41 +#define KEY_SIZE_BYTES 16
43 +/* ioctl() structure used by FIPS 140-2 Tests */
44 +struct rand_fips_test {
45 + unsigned char key[KEY_SIZE_BYTES]; /* Input */
46 + unsigned char datetime[SEED_SIZE_BYTES]; /* Input */
47 + unsigned char seed[SEED_SIZE_BYTES]; /* Input */
48 + unsigned char result[SEED_SIZE_BYTES]; /* Output */
51 +/* FIPS 140-2 RNG Variable Seed Test. (Superuser only.) */
52 +#define RNDFIPSVST _IOWR('R', 0x10, struct rand_fips_test)
54 +/* FIPS 140-2 RNG Monte Carlo Test. (Superuser only.) */
55 +#define RNDFIPSMCT _IOWR('R', 0x11, struct rand_fips_test)
57 +#endif /* #ifdef CONFIG_FIPS_RNG */
59 struct rand_pool_info {
62 @@ -50,6 +75,10 @@ extern void add_input_randomness(unsigne
64 extern void add_interrupt_randomness(int irq);
66 +extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count);
67 +extern int random_input_wait(void);
68 +#define HAS_RANDOM_INPUT_WAIT 1
70 extern void get_random_bytes(void *buf, int nbytes);
71 void generate_random_uuid(unsigned char uuid_out[16]);
75 @@ -389,6 +389,7 @@ struct task_struct *find_task_by_vpid(pi
77 return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
79 +EXPORT_SYMBOL(find_task_by_vpid);
81 struct pid *get_task_pid(struct task_struct *task, enum pid_type type)