source: trunk/target/linux/generic/patches-2.6.34/971-ocf_20100325.patch @ 26125

Last change on this file since 26125 was 26125, checked in by hauke, 5 years ago

kernel: update to kernel version 2.6.34.8

File size: 5.2 KB
  • drivers/char/random.c

    a b  
    129129 *                                unsigned int value); 
    130130 *      void add_interrupt_randomness(int irq); 
    131131 * 
     132 *      void random_input_words(__u32 *buf, size_t wordcount, int ent_count) 
     133 *      int random_input_wait(void); 
     134 * 
    132135 * add_input_randomness() uses the input layer interrupt timing, as well as 
    133136 * the event type information from the hardware. 
    134137 * 
     
    140143 * a better measure, since the timing of the disk interrupts are more 
    141144 * unpredictable. 
    142145 * 
     146 * random_input_words() just provides a raw block of entropy to the input 
     147 * pool, such as from a hardware entropy generator. 
     148 * 
     149 * random_input_wait() suspends the caller until such time as the 
     150 * entropy pool falls below the write threshold, and returns a count of how 
     151 * much entropy (in bits) is needed to sustain the pool. 
     152 * 
    143153 * All of these routines try to estimate how many bits of randomness a 
    144154 * particular randomness source.  They do this by keeping track of the 
    145155 * first and second order deltas of the event timings. 
    void add_disk_randomness(struct gendisk 
    714724} 
    715725#endif 
    716726 
     727/* 
     728 * random_input_words - add bulk entropy to pool 
     729 * 
     730 * @buf: buffer to add 
     731 * @wordcount: number of __u32 words to add 
     732 * @ent_count: total amount of entropy (in bits) to credit 
     733 * 
     734 * this provides bulk input of entropy to the input pool 
     735 * 
     736 */ 
     737void random_input_words(__u32 *buf, size_t wordcount, int ent_count) 
     738{ 
     739        mix_pool_bytes(&input_pool, buf, wordcount*4); 
     740 
     741        credit_entropy_bits(&input_pool, ent_count); 
     742 
     743        DEBUG_ENT("crediting %d bits => %d\n", 
     744                  ent_count, input_pool.entropy_count); 
     745        /* 
     746         * Wake up waiting processes if we have enough 
     747         * entropy. 
     748         */ 
     749        if (input_pool.entropy_count >= random_read_wakeup_thresh) 
     750                wake_up_interruptible(&random_read_wait); 
     751} 
     752EXPORT_SYMBOL(random_input_words); 
     753 
     754/* 
     755 * random_input_wait - wait until random needs entropy 
     756 * 
     757 * this function sleeps until the /dev/random subsystem actually 
     758 * needs more entropy, and then return the amount of entropy 
     759 * that it would be nice to have added to the system. 
     760 */ 
     761int random_input_wait(void) 
     762{ 
     763        int count; 
     764 
     765        wait_event_interruptible(random_write_wait,  
     766                         input_pool.entropy_count < random_write_wakeup_thresh); 
     767 
     768        count = random_write_wakeup_thresh - input_pool.entropy_count; 
     769 
     770        /* likely we got woken up due to a signal */ 
     771        if (count <= 0) count = random_read_wakeup_thresh;  
     772 
     773        DEBUG_ENT("requesting %d bits from input_wait()er %d<%d\n", 
     774                  count, 
     775                  input_pool.entropy_count, random_write_wakeup_thresh); 
     776 
     777        return count; 
     778} 
     779EXPORT_SYMBOL(random_input_wait); 
     780 
     781 
    717782#define EXTRACT_SIZE 10 
    718783 
    719784/********************************************************************* 
  • fs/fcntl.c

    a b SYSCALL_DEFINE1(dup, unsigned int, filde 
    141141        } 
    142142        return ret; 
    143143} 
     144EXPORT_SYMBOL(sys_dup); 
    144145 
    145146#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME) 
    146147 
  • include/linux/miscdevice.h

    a b  
    1818#define APOLLO_MOUSE_MINOR      7 
    1919#define PC110PAD_MINOR          9 
    2020/*#define ADB_MOUSE_MINOR       10      FIXME OBSOLETE */ 
     21#define CRYPTODEV_MINOR         70      /* /dev/crypto */ 
    2122#define WATCHDOG_MINOR          130     /* Watchdog timer     */ 
    2223#define TEMP_MINOR              131     /* Temperature Sensor */ 
    2324#define RTC_MINOR               135 
  • include/linux/random.h

    a b  
    99 
    1010#include <linux/types.h> 
    1111#include <linux/ioctl.h> 
     12#include <linux/types.h> /* for __u32 in user space */ 
    1213#include <linux/irqnr.h> 
    1314 
    1415/* ioctl()'s for the random number generator */ 
     
    3435/* Clear the entropy pool and associated counters.  (Superuser only.) */ 
    3536#define RNDCLEARPOOL    _IO( 'R', 0x06 ) 
    3637 
     38#ifdef CONFIG_FIPS_RNG 
     39 
     40/* Size of seed value - equal to AES blocksize */ 
     41#define AES_BLOCK_SIZE_BYTES    16 
     42#define SEED_SIZE_BYTES                 AES_BLOCK_SIZE_BYTES 
     43/* Size of AES key */ 
     44#define KEY_SIZE_BYTES          16 
     45 
     46/* ioctl() structure used by FIPS 140-2 Tests */ 
     47struct rand_fips_test { 
     48        unsigned char key[KEY_SIZE_BYTES];                      /* Input */ 
     49        unsigned char datetime[SEED_SIZE_BYTES];        /* Input */ 
     50        unsigned char seed[SEED_SIZE_BYTES];            /* Input */ 
     51        unsigned char result[SEED_SIZE_BYTES];          /* Output */ 
     52}; 
     53 
     54/* FIPS 140-2 RNG Variable Seed Test. (Superuser only.) */ 
     55#define RNDFIPSVST      _IOWR('R', 0x10, struct rand_fips_test) 
     56 
     57/* FIPS 140-2 RNG Monte Carlo Test. (Superuser only.) */ 
     58#define RNDFIPSMCT      _IOWR('R', 0x11, struct rand_fips_test) 
     59 
     60#endif /* #ifdef CONFIG_FIPS_RNG */ 
     61 
    3762struct rand_pool_info { 
    3863        int     entropy_count; 
    3964        int     buf_size; 
    extern void add_input_randomness(unsigne 
    5075                                 unsigned int value); 
    5176extern void add_interrupt_randomness(int irq); 
    5277 
     78extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count); 
     79extern int random_input_wait(void); 
     80#define HAS_RANDOM_INPUT_WAIT 1 
     81 
    5382extern void get_random_bytes(void *buf, int nbytes); 
    5483void generate_random_uuid(unsigned char uuid_out[16]); 
    5584 
  • kernel/pid.c

    a b struct task_struct *find_task_by_vpid(pi 
    389389{ 
    390390        return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns); 
    391391} 
     392EXPORT_SYMBOL(find_task_by_vpid); 
    392393 
    393394struct pid *get_task_pid(struct task_struct *task, enum pid_type type) 
    394395{ 
Note: See TracBrowser for help on using the repository browser.