source: trunk/target/linux/generic/patches-3.0/941-ocf_20110720.patch @ 27954

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

kernel: revert r27953

KanjiMonster did the right patch, I was just confused because of linux-3.0 and linux-2.6.30

File size: 4.1 KB
  • kernel/pid.c

    a b struct task_struct *find_task_by_vpid(pi 
    427427{ 
    428428        return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns); 
    429429} 
     430EXPORT_SYMBOL(find_task_by_vpid); 
    430431 
    431432struct pid *get_task_pid(struct task_struct *task, enum pid_type type) 
    432433{ 
  • drivers/char/random.c

    a b  
    130130 *      void add_interrupt_randomness(int irq); 
    131131 *      void add_disk_randomness(struct gendisk *disk); 
    132132 * 
     133 *      void random_input_words(__u32 *buf, size_t wordcount, int ent_count) 
     134 *      int random_input_wait(void); 
     135 * 
    133136 * add_input_randomness() uses the input layer interrupt timing, as well as 
    134137 * the event type information from the hardware. 
    135138 * 
     
    147150 * seek times do not make for good sources of entropy, as their seek 
    148151 * times are usually fairly consistent. 
    149152 * 
     153 * random_input_words() just provides a raw block of entropy to the input 
     154 * pool, such as from a hardware entropy generator. 
     155 * 
     156 * random_input_wait() suspends the caller until such time as the 
     157 * entropy pool falls below the write threshold, and returns a count of how 
     158 * much entropy (in bits) is needed to sustain the pool. 
     159 * 
    150160 * All of these routines try to estimate how many bits of randomness a 
    151161 * particular randomness source.  They do this by keeping track of the 
    152162 * first and second order deltas of the event timings. 
    void add_disk_randomness(struct gendisk 
    722732} 
    723733#endif 
    724734 
     735/* 
     736 * random_input_words - add bulk entropy to pool 
     737 * 
     738 * @buf: buffer to add 
     739 * @wordcount: number of __u32 words to add 
     740 * @ent_count: total amount of entropy (in bits) to credit 
     741 * 
     742 * this provides bulk input of entropy to the input pool 
     743 * 
     744 */ 
     745void random_input_words(__u32 *buf, size_t wordcount, int ent_count) 
     746{ 
     747        mix_pool_bytes(&input_pool, buf, wordcount*4); 
     748 
     749        credit_entropy_bits(&input_pool, ent_count); 
     750 
     751        DEBUG_ENT("crediting %d bits => %d\n", 
     752                  ent_count, input_pool.entropy_count); 
     753        /* 
     754         * Wake up waiting processes if we have enough 
     755         * entropy. 
     756         */ 
     757        if (input_pool.entropy_count >= random_read_wakeup_thresh) 
     758                wake_up_interruptible(&random_read_wait); 
     759} 
     760EXPORT_SYMBOL(random_input_words); 
     761 
     762/* 
     763 * random_input_wait - wait until random needs entropy 
     764 * 
     765 * this function sleeps until the /dev/random subsystem actually 
     766 * needs more entropy, and then return the amount of entropy 
     767 * that it would be nice to have added to the system. 
     768 */ 
     769int random_input_wait(void) 
     770{ 
     771        int count; 
     772 
     773        wait_event_interruptible(random_write_wait,  
     774                         input_pool.entropy_count < random_write_wakeup_thresh); 
     775 
     776        count = random_write_wakeup_thresh - input_pool.entropy_count; 
     777 
     778        /* likely we got woken up due to a signal */ 
     779        if (count <= 0) count = random_read_wakeup_thresh;  
     780 
     781        DEBUG_ENT("requesting %d bits from input_wait()er %d<%d\n", 
     782                  count, 
     783                  input_pool.entropy_count, random_write_wakeup_thresh); 
     784 
     785        return count; 
     786} 
     787EXPORT_SYMBOL(random_input_wait); 
     788 
     789 
     790#define EXTRACT_SIZE 10 
     791 
    725792/********************************************************************* 
    726793 * 
    727794 * Entropy extraction routines 
  • fs/fcntl.c

    a b SYSCALL_DEFINE1(dup, unsigned int, filde 
    142142        } 
    143143        return ret; 
    144144} 
     145EXPORT_SYMBOL(sys_dup); 
    145146 
    146147#define SETFL_MASK (O_APPEND | O_NONBLOCK | O_NDELAY | O_DIRECT | O_NOATIME) 
    147148 
  • 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 extern void add_input_randomness(unsigne 
    5454                                 unsigned int value); 
    5555extern void add_interrupt_randomness(int irq); 
    5656 
     57extern void random_input_words(__u32 *buf, size_t wordcount, int ent_count); 
     58extern int random_input_wait(void); 
     59#define HAS_RANDOM_INPUT_WAIT 1 
     60 
    5761extern void get_random_bytes(void *buf, int nbytes); 
    5862void generate_random_uuid(unsigned char uuid_out[16]); 
    5963 
Note: See TracBrowser for help on using the repository browser.