rendered paste bodyINTERVAL: 0x1e
t - rekey_time: 0x1e
drivers/char/random.c:get_random_long(): not rekeying...
entropycache[1]: [0xd961349e]
entropycache[0]: [0xbc19746]
drivers/char/random.c:get_random_long(): t: 0x46796849
drivers/char/random.c:get_random_long(): rekey_time: 0x4679682b
INTERVAL: 0x1e
t - rekey_time: 0x1e
drivers/char/random.c:get_random_long(): not rekeying...
entropycache[1]: [0x4e9a6897]
entropycache[0]: [0x7e07ced8]
drivers/char/random.c:get_random_long(): t: 0x4679684a
drivers/char/random.c:get_random_long(): rekey_time: 0x4679682b
INTERVAL: 0x1e
t - rekey_time: 0x1f
drivers/char/random.c:get_random_long(): rekeying...
entropycache[0]: [[0xaf7eecd0]]
entropycache[1]: [[0xa32692ba]]
entropycache[2]: [[0x45130eee]]
entropycache[3]: [[0xcefdbead]]
entropycache[4]: [[0xb9180ad5]]
entropycache[5]: [[0x2afbaa59]]
entropycache[6]: [[0x7cf25bae]]
entropycache[7]: [[0x6399e41f]]
entropycache[8]: [[0x5d8e35]]
entropycache[9]: [[0xc840cfa]]
entropycache[10]: [[0x2188f89]]
entropycache[11]: [[0xc87a984]]
entropycache[1]: [0x893ca2e5]
entropycache[0]: [0xadc7db32]
drivers/char/random.c:get_random_long(): t: 0x4679684a
drivers/char/random.c:get_random_long(): rekey_time: 0x4679684a
INTERVAL: 0x1e
t - rekey_time: 0x0
drivers/char/random.c:get_random_long(): not rekeying...
entropycache[1]: [0x55d73b24]
entropycache[0]: [0xcb27c38b]
drivers/char/random.c:get_random_long(): t: 0x4679684a
drivers/char/random.c:get_random_long(): rekey_time: 0x4679684a
INTERVAL: 0x1e
t - rekey_time: 0x0
drivers/char/random.c:get_random_long(): not rekeying...
entropycache[1]: [0x23249af7]
entropycache[0]: [0xea50e392]
drivers/char/random.c:get_random_long(): t: 0x4679684a
drivers/char/random.c:get_random_long(): rekey_time: 0x4679684a
INTERVAL: 0x1e
t - rekey_time: 0x0
drivers/char/random.c:get_random_long(): not rekeying...
entropycache[1]: [0x7b79388a]
entropycache[0]: [0xed67b72e]
drivers/char/random.c:get_random_long(): t: 0x4679684a
drivers/char/random.c:get_random_long(): rekey_time: 0x4679684a
INTERVAL: 0x1e
t - rekey_time: 0x0
drivers/char/random.c:get_random_long(): not rekeying...
entropycache[1]: [0xcb8959d9]
entropycache[0]: [0x31c46816]
drivers/char/random.c:get_random_long(): t: 0x4679684a
drivers/char/random.c:get_random_long(): rekey_time: 0x4679684a
unsigned long get_random_long(void)
{
/* remember the last time we refreshed the cache with random entropy */
static time_t rekey_time;
/*
* the following data in the buffer is unchanged during REKEY_INTERVAL:
* |----|----|KKKK|KKKK|KKKK|KKKK|KKKK|KKKK|----|----|----|----|
* ___0____1____2____3____4____5____6____7____8____9___10___11__
*
* the following data is updated during the first half_md4_transform call
* |----|YYYY|----|----|----|----|----|----|ZZZZ|ZZZZ|ZZZZ|ZZZZ|
* ___0____1____2____3____4____5____6____7____8____9___10___11__
*
* the following data is updated during the second half_md4_transform
* |XXXX|----|----|----|----|----|----|----|ZZZZ|ZZZZ|ZZZZ|ZZZZ|
* ___0____1____2____3____4____5____6____7____8____9___10___11__
*/
static __u32 entropycache[12];
time_t t;
int i;
/* get the current time in seconds */
t = get_seconds();
printk(KERN_INFO "drivers/char/random.c:get_random_long(): t: 0x%x\n", (unsigned int) t);
printk(KERN_INFO "drivers/char/random.c:get_random_long(): rekey_time: 0x%x\n", (unsigned int) rekey_time);
printk(KERN_INFO "INTERVAL: 0x%x\n", 30);
printk(KERN_INFO "t - rekey_time: 0x%x\n", t - rekey_time);
/* check for REKEY_INTERVAL */
if (!rekey_time || (t - rekey_time) > 30) {
printk(KERN_INFO "drivers/char/random.c:get_random_long(): rekeying...\n");
rekey_time = t;
get_random_bytes(entropycache, sizeof(entropycache));
for (i=0; i < 12; i++) {
printk(KERN_INFO "entropycache[%d]: [[0x%x]]\n", i, entropycache[i]);
}
} else {
printk(KERN_INFO "drivers/char/random.c:get_random_long(): not rekeying...\n");
}
entropycache[1] = half_md4_transform(entropycache+8, entropycache);
printk(KERN_INFO "entropycache[1]: [0x%x]\n", entropycache[1]);
entropycache[0] = half_md4_transform(entropycache+8, entropycache);
printk(KERN_INFO "entropycache[0]: [0x%x]\n", entropycache[0]);
return *(unsigned long *)entropycache;
}