Changeset 33559


Ignore:
Timestamp:
2012-09-26T14:54:01+02:00 (5 years ago)
Author:
florian
Message:

[kernel] backport the upstream entropy changes (#11951)

Location:
trunk/target/linux/generic/patches-3.3
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/patches-3.3/941-ocf_20120127.patch

    r32672 r33559  
    11--- a/drivers/char/random.c 
    22+++ b/drivers/char/random.c 
    3 @@ -130,6 +130,9 @@ 
    4   *     void add_interrupt_randomness(int irq); 
     3@@ -131,6 +131,9 @@ 
     4  *     void add_interrupt_randomness(int irq, int irq_flags); 
    55  *     void add_disk_randomness(struct gendisk *disk); 
    66  * 
     
    1111  * the event type information from the hardware. 
    1212  * 
    13 @@ -147,6 +150,13 @@ 
     13@@ -152,6 +155,13 @@ 
    1414  * seek times do not make for good sources of entropy, as their seek 
    1515  * times are usually fairly consistent. 
     
    2525  * particular randomness source.  They do this by keeping track of the 
    2626  * first and second order deltas of the event timings. 
    27 @@ -726,6 +736,63 @@ void add_disk_randomness(struct gendisk 
     27@@ -796,6 +806,63 @@ void add_disk_randomness(struct gendisk 
    2828 } 
    2929 #endif 
     
    4141+void random_input_words(__u32 *buf, size_t wordcount, int ent_count) 
    4242+{ 
    43 +       mix_pool_bytes(&input_pool, buf, wordcount*4); 
     43+       mix_pool_bytes(&input_pool, buf, wordcount*4, NULL); 
    4444+ 
    4545+       credit_entropy_bits(&input_pool, ent_count); 
     
    142142        int     entropy_count; 
    143143        int     buf_size; 
    144 @@ -54,6 +78,10 @@ extern void add_input_randomness(unsigne 
     144@@ -53,6 +77,10 @@ extern void add_input_randomness(unsigne 
    145145                                 unsigned int value); 
    146  extern void add_interrupt_randomness(int irq); 
     146 extern void add_interrupt_randomness(int irq, int irq_flags); 
    147147  
    148148+extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count); 
     
    151151+ 
    152152 extern void get_random_bytes(void *buf, int nbytes); 
     153 extern void get_random_bytes_arch(void *buf, int nbytes); 
    153154 void generate_random_uuid(unsigned char uuid_out[16]); 
    154   
    155155--- a/kernel/pid.c 
    156156+++ b/kernel/pid.c 
Note: See TracChangeset for help on using the changeset viewer.