Linux 2.6.38 and later requires 20110520 to build and run properly.

Redux: fix for 2.6.39 as well, and make conditional depending on kernel version.

Signed-off-by: Philip Prindeville <[email protected]>

Index: target/linux/generic/patches-2.6.38/941-ocf_20110530.patch
===================================================================
--- target/linux/generic/patches-2.6.38/941-ocf_20110530.patch  (revision 0)
+++ target/linux/generic/patches-2.6.38/941-ocf_20110530.patch  (revision 0)
@@ -0,0 +1,138 @@
+diff -u -r1.1.1.51 -r1.18
+--- linux-2.6.38/drivers/char/random.c 15 Mar 2011 22:12:51 -0000      1.1.1.51
++++ linux-2.6.38/drivers/char/random.c 16 Mar 2011 04:12:24 -0000      1.18
+@@ -129,6 +129,9 @@
+  *                                unsigned int value);
+  *    void add_interrupt_randomness(int irq);
+  *
++ *      void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
++ *      int random_input_wait(void);
++ *
+  * add_input_randomness() uses the input layer interrupt timing, as well as
+  * the event type information from the hardware.
+  *
+@@ -140,6 +143,13 @@
+  * a better measure, since the timing of the disk interrupts are more
+  * unpredictable.
+  *
++ * random_input_words() just provides a raw block of entropy to the input
++ * pool, such as from a hardware entropy generator.
++ *
++ * random_input_wait() suspends the caller until such time as the
++ * entropy pool falls below the write threshold, and returns a count of how
++ * much entropy (in bits) is needed to sustain the pool.
++ *
+  * All of these routines try to estimate how many bits of randomness a
+  * particular randomness source.  They do this by keeping track of the
+  * first and second order deltas of the event timings.
+@@ -715,6 +725,63 @@
+ }
+ #endif
+ 
++/*
++ * random_input_words - add bulk entropy to pool
++ *
++ * @buf: buffer to add
++ * @wordcount: number of __u32 words to add
++ * @ent_count: total amount of entropy (in bits) to credit
++ *
++ * this provides bulk input of entropy to the input pool
++ *
++ */
++void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
++{
++      mix_pool_bytes(&input_pool, buf, wordcount*4);
++
++      credit_entropy_bits(&input_pool, ent_count);
++
++      DEBUG_ENT("crediting %d bits => %d\n",
++                ent_count, input_pool.entropy_count);
++      /*
++       * Wake up waiting processes if we have enough
++       * entropy.
++       */
++      if (input_pool.entropy_count >= random_read_wakeup_thresh)
++              wake_up_interruptible(&random_read_wait);
++}
++EXPORT_SYMBOL(random_input_words);
++
++/*
++ * random_input_wait - wait until random needs entropy
++ *
++ * this function sleeps until the /dev/random subsystem actually
++ * needs more entropy, and then return the amount of entropy
++ * that it would be nice to have added to the system.
++ */
++int random_input_wait(void)
++{
++      int count;
++
++      wait_event_interruptible(random_write_wait, 
++                       input_pool.entropy_count < random_write_wakeup_thresh);
++
++      count = random_write_wakeup_thresh - input_pool.entropy_count;
++
++        /* likely we got woken up due to a signal */
++      if (count <= 0) count = random_read_wakeup_thresh; 
++
++      DEBUG_ENT("requesting %d bits from input_wait()er %d<%d\n",
++                count,
++                input_pool.entropy_count, random_write_wakeup_thresh);
++
++      return count;
++}
++EXPORT_SYMBOL(random_input_wait);
++
++
++#define EXTRACT_SIZE 10
++
+ /*********************************************************************
+  *
+  * Entropy extraction routines
+diff -u -r1.1.1.49 -r1.15
+--- linux-2.6.38/fs/fcntl.c    15 Mar 2011 21:35:51 -0000      1.1.1.49
++++ linux-2.6.38/fs/fcntl.c    16 Mar 2011 04:12:31 -0000      1.15
+@@ -142,6 +142,7 @@
+       }
+       return ret;
+ }
++EXPORT_SYMBOL(sys_dup);
+ 
+ #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
+ 
+diff -u -r1.1.1.23 -r1.16
+--- linux-2.6.38/include/linux/miscdevice.h    21 Oct 2010 00:38:07 -0000      
1.1.1.23
++++ linux-2.6.38/include/linux/miscdevice.h    21 Oct 2010 02:02:26 -0000      
1.16
+@@ -18,6 +18,7 @@
+ #define APOLLO_MOUSE_MINOR    7
+ #define PC110PAD_MINOR                9
+ /*#define ADB_MOUSE_MINOR     10      FIXME OBSOLETE */
++#define CRYPTODEV_MINOR               70      /* /dev/crypto */
+ #define WATCHDOG_MINOR                130     /* Watchdog timer     */
+ #define TEMP_MINOR            131     /* Temperature Sensor */
+ #define RTC_MINOR             135
+diff -u -r1.1.1.14 random.h
+--- linux-2.6.38/include/linux/random.h        12 Aug 2010 00:16:26 -0000      
1.1.1.14
++++ linux-2.6.38/include/linux/random.h        31 Mar 2011 04:12:25 -0000
+@@ -54,6 +54,10 @@
+                                unsigned int value);
+ extern void add_interrupt_randomness(int irq);
+ 
++extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count);
++extern int random_input_wait(void);
++#define HAS_RANDOM_INPUT_WAIT 1
++
+ extern void get_random_bytes(void *buf, int nbytes);
+ void generate_random_uuid(unsigned char uuid_out[16]);
+ 
+diff -u -r1.1.1.31 -r1.7
+--- linux-2.6.38/kernel/pid.c  5 Jan 2011 04:28:04 -0000       1.1.1.31
++++ linux-2.6.38/kernel/pid.c  5 Jan 2011 05:20:18 -0000       1.7
+@@ -424,6 +424,7 @@
+ {
+       return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
+ }
++EXPORT_SYMBOL(find_task_by_vpid);
+ 
+ struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
+ {
Index: target/linux/generic/patches-2.6.38/941-ocf_20100325.patch
===================================================================
--- target/linux/generic/patches-2.6.38/941-ocf_20100325.patch  (revision 27413)
+++ target/linux/generic/patches-2.6.38/941-ocf_20100325.patch  (working copy)
@@ -1,170 +0,0 @@
---- a/drivers/char/random.c
-+++ b/drivers/char/random.c
-@@ -129,6 +129,9 @@
-  *                                unsigned int value);
-  *    void add_interrupt_randomness(int irq);
-  *
-+ *      void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
-+ *      int random_input_wait(void);
-+ *
-  * add_input_randomness() uses the input layer interrupt timing, as well as
-  * the event type information from the hardware.
-  *
-@@ -140,6 +143,13 @@
-  * a better measure, since the timing of the disk interrupts are more
-  * unpredictable.
-  *
-+ * random_input_words() just provides a raw block of entropy to the input
-+ * pool, such as from a hardware entropy generator.
-+ *
-+ * random_input_wait() suspends the caller until such time as the
-+ * entropy pool falls below the write threshold, and returns a count of how
-+ * much entropy (in bits) is needed to sustain the pool.
-+ *
-  * All of these routines try to estimate how many bits of randomness a
-  * particular randomness source.  They do this by keeping track of the
-  * first and second order deltas of the event timings.
-@@ -715,6 +725,61 @@ void add_disk_randomness(struct gendisk
- }
- #endif
- 
-+/*
-+ * random_input_words - add bulk entropy to pool
-+ *
-+ * @buf: buffer to add
-+ * @wordcount: number of __u32 words to add
-+ * @ent_count: total amount of entropy (in bits) to credit
-+ *
-+ * this provides bulk input of entropy to the input pool
-+ *
-+ */
-+void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
-+{
-+        mix_pool_bytes(&input_pool, buf, wordcount*4);
-+
-+        credit_entropy_bits(&input_pool, ent_count);
-+
-+        DEBUG_ENT("crediting %d bits => %d\n",
-+                  ent_count, input_pool.entropy_count);
-+      /*
-+       * Wake up waiting processes if we have enough
-+       * entropy.
-+       */
-+      if (input_pool.entropy_count >= random_read_wakeup_thresh)
-+              wake_up_interruptible(&random_read_wait);
-+}
-+EXPORT_SYMBOL(random_input_words);
-+
-+/*
-+ * random_input_wait - wait until random needs entropy
-+ *
-+ * this function sleeps until the /dev/random subsystem actually
-+ * needs more entropy, and then return the amount of entropy
-+ * that it would be nice to have added to the system.
-+ */
-+int random_input_wait(void)
-+{
-+      int count;
-+
-+      wait_event_interruptible(random_write_wait,
-+              input_pool.entropy_count < random_write_wakeup_thresh);
-+
-+      count = random_write_wakeup_thresh - input_pool.entropy_count;
-+
-+      /* likely we got woken up due to a signal */
-+      if (count <= 0) count = random_read_wakeup_thresh;
-+
-+      DEBUG_ENT("requesting %d bits from input_wait()er %d<%d\n",
-+              count,
-+              input_pool.entropy_count, random_write_wakeup_thresh);
-+
-+      return count;
-+}
-+EXPORT_SYMBOL(random_input_wait);
-+
-+
- /*********************************************************************
-  *
-  * Entropy extraction routines
---- a/fs/fcntl.c
-+++ b/fs/fcntl.c
-@@ -142,6 +142,7 @@ SYSCALL_DEFINE1(dup, unsigned int, filde
-       }
-       return ret;
- }
-+EXPORT_SYMBOL(sys_dup);
- 
- #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
- 
---- a/include/linux/miscdevice.h
-+++ b/include/linux/miscdevice.h
-@@ -18,6 +18,7 @@
- #define APOLLO_MOUSE_MINOR    7
- #define PC110PAD_MINOR                9
- /*#define ADB_MOUSE_MINOR     10      FIXME OBSOLETE */
-+#define CRYPTODEV_MINOR               70      /* /dev/crypto */
- #define WATCHDOG_MINOR                130     /* Watchdog timer     */
- #define TEMP_MINOR            131     /* Temperature Sensor */
- #define RTC_MINOR             135
---- a/include/linux/random.h
-+++ b/include/linux/random.h
-@@ -9,6 +9,7 @@
- 
- #include <linux/types.h>
- #include <linux/ioctl.h>
-+#include <linux/types.h> /* for __u32 in user space */
- #include <linux/irqnr.h>
- 
- /* ioctl()'s for the random number generator */
-@@ -34,6 +35,30 @@
- /* Clear the entropy pool and associated counters.  (Superuser only.) */
- #define RNDCLEARPOOL  _IO( 'R', 0x06 )
- 
-+#ifdef CONFIG_FIPS_RNG
-+
-+/* Size of seed value - equal to AES blocksize */
-+#define AES_BLOCK_SIZE_BYTES  16
-+#define SEED_SIZE_BYTES                       AES_BLOCK_SIZE_BYTES
-+/* Size of AES key */
-+#define KEY_SIZE_BYTES                16
-+
-+/* ioctl() structure used by FIPS 140-2 Tests */
-+struct rand_fips_test {
-+      unsigned char key[KEY_SIZE_BYTES];                      /* Input */
-+      unsigned char datetime[SEED_SIZE_BYTES];        /* Input */
-+      unsigned char seed[SEED_SIZE_BYTES];            /* Input */
-+      unsigned char result[SEED_SIZE_BYTES];          /* Output */
-+};
-+
-+/* FIPS 140-2 RNG Variable Seed Test. (Superuser only.) */
-+#define RNDFIPSVST    _IOWR('R', 0x10, struct rand_fips_test)
-+
-+/* FIPS 140-2 RNG Monte Carlo Test. (Superuser only.) */
-+#define RNDFIPSMCT    _IOWR('R', 0x11, struct rand_fips_test)
-+
-+#endif /* #ifdef CONFIG_FIPS_RNG */
-+
- struct rand_pool_info {
-       int     entropy_count;
-       int     buf_size;
-@@ -54,6 +79,10 @@ extern void add_input_randomness(unsigne
-                                unsigned int value);
- extern void add_interrupt_randomness(int irq);
- 
-+extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count);
-+extern int random_input_wait(void);
-+#define HAS_RANDOM_INPUT_WAIT 1
-+
- extern void get_random_bytes(void *buf, int nbytes);
- void generate_random_uuid(unsigned char uuid_out[16]);
- 
---- a/kernel/pid.c
-+++ b/kernel/pid.c
-@@ -427,6 +427,7 @@ struct task_struct *find_task_by_vpid(pi
- {
-       return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
- }
-+EXPORT_SYMBOL(find_task_by_vpid);
- 
- struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
- {
Index: target/linux/generic/patches-2.6.39/941-ocf_20110530.patch
===================================================================
--- target/linux/generic/patches-2.6.39/941-ocf_20110530.patch  (revision 0)
+++ target/linux/generic/patches-2.6.39/941-ocf_20110530.patch  (revision 0)
@@ -0,0 +1,138 @@
+diff -u -r1.1.1.51 -r1.18
+--- linux-2.6.38/drivers/char/random.c 15 Mar 2011 22:12:51 -0000      1.1.1.51
++++ linux-2.6.38/drivers/char/random.c 16 Mar 2011 04:12:24 -0000      1.18
+@@ -129,6 +129,9 @@
+  *                                unsigned int value);
+  *    void add_interrupt_randomness(int irq);
+  *
++ *      void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
++ *      int random_input_wait(void);
++ *
+  * add_input_randomness() uses the input layer interrupt timing, as well as
+  * the event type information from the hardware.
+  *
+@@ -140,6 +143,13 @@
+  * a better measure, since the timing of the disk interrupts are more
+  * unpredictable.
+  *
++ * random_input_words() just provides a raw block of entropy to the input
++ * pool, such as from a hardware entropy generator.
++ *
++ * random_input_wait() suspends the caller until such time as the
++ * entropy pool falls below the write threshold, and returns a count of how
++ * much entropy (in bits) is needed to sustain the pool.
++ *
+  * All of these routines try to estimate how many bits of randomness a
+  * particular randomness source.  They do this by keeping track of the
+  * first and second order deltas of the event timings.
+@@ -715,6 +725,63 @@
+ }
+ #endif
+ 
++/*
++ * random_input_words - add bulk entropy to pool
++ *
++ * @buf: buffer to add
++ * @wordcount: number of __u32 words to add
++ * @ent_count: total amount of entropy (in bits) to credit
++ *
++ * this provides bulk input of entropy to the input pool
++ *
++ */
++void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
++{
++      mix_pool_bytes(&input_pool, buf, wordcount*4);
++
++      credit_entropy_bits(&input_pool, ent_count);
++
++      DEBUG_ENT("crediting %d bits => %d\n",
++                ent_count, input_pool.entropy_count);
++      /*
++       * Wake up waiting processes if we have enough
++       * entropy.
++       */
++      if (input_pool.entropy_count >= random_read_wakeup_thresh)
++              wake_up_interruptible(&random_read_wait);
++}
++EXPORT_SYMBOL(random_input_words);
++
++/*
++ * random_input_wait - wait until random needs entropy
++ *
++ * this function sleeps until the /dev/random subsystem actually
++ * needs more entropy, and then return the amount of entropy
++ * that it would be nice to have added to the system.
++ */
++int random_input_wait(void)
++{
++      int count;
++
++      wait_event_interruptible(random_write_wait, 
++                       input_pool.entropy_count < random_write_wakeup_thresh);
++
++      count = random_write_wakeup_thresh - input_pool.entropy_count;
++
++        /* likely we got woken up due to a signal */
++      if (count <= 0) count = random_read_wakeup_thresh; 
++
++      DEBUG_ENT("requesting %d bits from input_wait()er %d<%d\n",
++                count,
++                input_pool.entropy_count, random_write_wakeup_thresh);
++
++      return count;
++}
++EXPORT_SYMBOL(random_input_wait);
++
++
++#define EXTRACT_SIZE 10
++
+ /*********************************************************************
+  *
+  * Entropy extraction routines
+diff -u -r1.1.1.49 -r1.15
+--- linux-2.6.38/fs/fcntl.c    15 Mar 2011 21:35:51 -0000      1.1.1.49
++++ linux-2.6.38/fs/fcntl.c    16 Mar 2011 04:12:31 -0000      1.15
+@@ -142,6 +142,7 @@
+       }
+       return ret;
+ }
++EXPORT_SYMBOL(sys_dup);
+ 
+ #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
+ 
+diff -u -r1.1.1.23 -r1.16
+--- linux-2.6.38/include/linux/miscdevice.h    21 Oct 2010 00:38:07 -0000      
1.1.1.23
++++ linux-2.6.38/include/linux/miscdevice.h    21 Oct 2010 02:02:26 -0000      
1.16
+@@ -18,6 +18,7 @@
+ #define APOLLO_MOUSE_MINOR    7
+ #define PC110PAD_MINOR                9
+ /*#define ADB_MOUSE_MINOR     10      FIXME OBSOLETE */
++#define CRYPTODEV_MINOR               70      /* /dev/crypto */
+ #define WATCHDOG_MINOR                130     /* Watchdog timer     */
+ #define TEMP_MINOR            131     /* Temperature Sensor */
+ #define RTC_MINOR             135
+diff -u -r1.1.1.14 random.h
+--- linux-2.6.38/include/linux/random.h        12 Aug 2010 00:16:26 -0000      
1.1.1.14
++++ linux-2.6.38/include/linux/random.h        31 Mar 2011 04:12:25 -0000
+@@ -54,6 +54,10 @@
+                                unsigned int value);
+ extern void add_interrupt_randomness(int irq);
+ 
++extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count);
++extern int random_input_wait(void);
++#define HAS_RANDOM_INPUT_WAIT 1
++
+ extern void get_random_bytes(void *buf, int nbytes);
+ void generate_random_uuid(unsigned char uuid_out[16]);
+ 
+diff -u -r1.1.1.31 -r1.7
+--- linux-2.6.38/kernel/pid.c  5 Jan 2011 04:28:04 -0000       1.1.1.31
++++ linux-2.6.38/kernel/pid.c  5 Jan 2011 05:20:18 -0000       1.7
+@@ -424,6 +424,7 @@
+ {
+       return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
+ }
++EXPORT_SYMBOL(find_task_by_vpid);
+ 
+ struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
+ {
Index: target/linux/generic/patches-2.6.39/941-ocf_20100325.patch
===================================================================
--- target/linux/generic/patches-2.6.39/941-ocf_20100325.patch  (revision 27413)
+++ target/linux/generic/patches-2.6.39/941-ocf_20100325.patch  (working copy)
@@ -1,170 +0,0 @@
---- a/drivers/char/random.c
-+++ b/drivers/char/random.c
-@@ -130,6 +130,9 @@
-  *    void add_interrupt_randomness(int irq);
-  *    void add_disk_randomness(struct gendisk *disk);
-  *
-+ *      void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
-+ *      int random_input_wait(void);
-+ *
-  * add_input_randomness() uses the input layer interrupt timing, as well as
-  * the event type information from the hardware.
-  *
-@@ -147,6 +150,13 @@
-  * seek times do not make for good sources of entropy, as their seek
-  * times are usually fairly consistent.
-  *
-+ * random_input_words() just provides a raw block of entropy to the input
-+ * pool, such as from a hardware entropy generator.
-+ *
-+ * random_input_wait() suspends the caller until such time as the
-+ * entropy pool falls below the write threshold, and returns a count of how
-+ * much entropy (in bits) is needed to sustain the pool.
-+ *
-  * All of these routines try to estimate how many bits of randomness a
-  * particular randomness source.  They do this by keeping track of the
-  * first and second order deltas of the event timings.
-@@ -722,6 +732,61 @@ void add_disk_randomness(struct gendisk
- }
- #endif
- 
-+/*
-+ * random_input_words - add bulk entropy to pool
-+ *
-+ * @buf: buffer to add
-+ * @wordcount: number of __u32 words to add
-+ * @ent_count: total amount of entropy (in bits) to credit
-+ *
-+ * this provides bulk input of entropy to the input pool
-+ *
-+ */
-+void random_input_words(__u32 *buf, size_t wordcount, int ent_count)
-+{
-+        mix_pool_bytes(&input_pool, buf, wordcount*4);
-+
-+        credit_entropy_bits(&input_pool, ent_count);
-+
-+        DEBUG_ENT("crediting %d bits => %d\n",
-+                  ent_count, input_pool.entropy_count);
-+      /*
-+       * Wake up waiting processes if we have enough
-+       * entropy.
-+       */
-+      if (input_pool.entropy_count >= random_read_wakeup_thresh)
-+              wake_up_interruptible(&random_read_wait);
-+}
-+EXPORT_SYMBOL(random_input_words);
-+
-+/*
-+ * random_input_wait - wait until random needs entropy
-+ *
-+ * this function sleeps until the /dev/random subsystem actually
-+ * needs more entropy, and then return the amount of entropy
-+ * that it would be nice to have added to the system.
-+ */
-+int random_input_wait(void)
-+{
-+      int count;
-+
-+      wait_event_interruptible(random_write_wait,
-+              input_pool.entropy_count < random_write_wakeup_thresh);
-+
-+      count = random_write_wakeup_thresh - input_pool.entropy_count;
-+
-+      /* likely we got woken up due to a signal */
-+      if (count <= 0) count = random_read_wakeup_thresh;
-+
-+      DEBUG_ENT("requesting %d bits from input_wait()er %d<%d\n",
-+              count,
-+              input_pool.entropy_count, random_write_wakeup_thresh);
-+
-+      return count;
-+}
-+EXPORT_SYMBOL(random_input_wait);
-+
-+
- /*********************************************************************
-  *
-  * Entropy extraction routines
---- a/fs/fcntl.c
-+++ b/fs/fcntl.c
-@@ -142,6 +142,7 @@ SYSCALL_DEFINE1(dup, unsigned int, filde
-       }
-       return ret;
- }
-+EXPORT_SYMBOL(sys_dup);
- 
- #define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME)
- 
---- a/include/linux/miscdevice.h
-+++ b/include/linux/miscdevice.h
-@@ -18,6 +18,7 @@
- #define APOLLO_MOUSE_MINOR    7
- #define PC110PAD_MINOR                9
- /*#define ADB_MOUSE_MINOR     10      FIXME OBSOLETE */
-+#define CRYPTODEV_MINOR               70      /* /dev/crypto */
- #define WATCHDOG_MINOR                130     /* Watchdog timer     */
- #define TEMP_MINOR            131     /* Temperature Sensor */
- #define RTC_MINOR             135
---- a/include/linux/random.h
-+++ b/include/linux/random.h
-@@ -9,6 +9,7 @@
- 
- #include <linux/types.h>
- #include <linux/ioctl.h>
-+#include <linux/types.h> /* for __u32 in user space */
- #include <linux/irqnr.h>
- 
- /* ioctl()'s for the random number generator */
-@@ -34,6 +35,30 @@
- /* Clear the entropy pool and associated counters.  (Superuser only.) */
- #define RNDCLEARPOOL  _IO( 'R', 0x06 )
- 
-+#ifdef CONFIG_FIPS_RNG
-+
-+/* Size of seed value - equal to AES blocksize */
-+#define AES_BLOCK_SIZE_BYTES  16
-+#define SEED_SIZE_BYTES                       AES_BLOCK_SIZE_BYTES
-+/* Size of AES key */
-+#define KEY_SIZE_BYTES                16
-+
-+/* ioctl() structure used by FIPS 140-2 Tests */
-+struct rand_fips_test {
-+      unsigned char key[KEY_SIZE_BYTES];                      /* Input */
-+      unsigned char datetime[SEED_SIZE_BYTES];        /* Input */
-+      unsigned char seed[SEED_SIZE_BYTES];            /* Input */
-+      unsigned char result[SEED_SIZE_BYTES];          /* Output */
-+};
-+
-+/* FIPS 140-2 RNG Variable Seed Test. (Superuser only.) */
-+#define RNDFIPSVST    _IOWR('R', 0x10, struct rand_fips_test)
-+
-+/* FIPS 140-2 RNG Monte Carlo Test. (Superuser only.) */
-+#define RNDFIPSMCT    _IOWR('R', 0x11, struct rand_fips_test)
-+
-+#endif /* #ifdef CONFIG_FIPS_RNG */
-+
- struct rand_pool_info {
-       int     entropy_count;
-       int     buf_size;
-@@ -54,6 +79,10 @@ extern void add_input_randomness(unsigne
-                                unsigned int value);
- extern void add_interrupt_randomness(int irq);
- 
-+extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count);
-+extern int random_input_wait(void);
-+#define HAS_RANDOM_INPUT_WAIT 1
-+
- extern void get_random_bytes(void *buf, int nbytes);
- void generate_random_uuid(unsigned char uuid_out[16]);
- 
---- a/kernel/pid.c
-+++ b/kernel/pid.c
-@@ -427,6 +427,7 @@ struct task_struct *find_task_by_vpid(pi
- {
-       return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
- }
-+EXPORT_SYMBOL(find_task_by_vpid);
- 
- struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
- {
Index: package/ocf-crypto-headers/src/cryptodev.h
===================================================================
--- package/ocf-crypto-headers/src/cryptodev.h  (revision 27413)
+++ package/ocf-crypto-headers/src/cryptodev.h  (working copy)
@@ -2,8 +2,8 @@
 /*     $OpenBSD: cryptodev.h,v 1.31 2002/06/11 11:14:29 beck Exp $     */
 
 /*-
- * Linux port done by David McCullough <[email protected]>
- * Copyright (C) 2006-2007 David McCullough
+ * Linux port done by David McCullough <[email protected]>
+ * Copyright (C) 2006-2010 David McCullough
  * Copyright (C) 2004-2005 Intel Corporation.
  * The license and original author are listed below.
  *
@@ -156,7 +156,8 @@
 #define CRYPTO_SHA2_384                        23
 #define CRYPTO_SHA2_512                        24
 #define CRYPTO_RIPEMD160               25
-#define CRYPTO_ALGORITHM_MAX   25 /* Keep updated - see below */
+#define        CRYPTO_LZS_COMP                 26
+#define CRYPTO_ALGORITHM_MAX   26 /* Keep updated - see above */
 
 /* Algorithm flags */
 #define CRYPTO_ALG_FLAG_SUPPORTED      0x01 /* Algorithm is supported */
@@ -336,6 +337,7 @@
 #define crd_key                CRD_INI.cri_key
 #define crd_alg                CRD_INI.cri_alg
 #define crd_klen       CRD_INI.cri_klen
+#define crd_mlen       CRD_INI.cri_mlen
 
        struct cryptodesc *crd_next;
 };
Index: package/ocf-crypto-headers/Makefile
===================================================================
--- package/ocf-crypto-headers/Makefile (revision 27413)
+++ package/ocf-crypto-headers/Makefile (working copy)
@@ -7,7 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ocf-crypto-headers
-PKG_VERSION:=20080917
+ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.38)),1)
+PKG_VERSION:=20110530
+else
+PKG_VERSION:=20100325
+endif
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to