Home
last modified time | relevance | path

Searched refs:base_crng (Results 1 – 1 of 1) sorted by relevance

/kernel/linux/linux-5.10/drivers/char/
Drandom.c225 } base_crng = { variable
226 .lock = __SPIN_LOCK_UNLOCKED(base_crng.lock)
258 spin_lock_irqsave(&base_crng.lock, flags); in crng_reseed()
259 memcpy(base_crng.key, key, sizeof(base_crng.key)); in crng_reseed()
260 next_gen = base_crng.generation + 1; in crng_reseed()
263 WRITE_ONCE(base_crng.generation, next_gen); in crng_reseed()
264 WRITE_ONCE(base_crng.birth, jiffies); in crng_reseed()
267 spin_unlock_irqrestore(&base_crng.lock, flags); in crng_reseed()
322 return time_is_before_jiffies(READ_ONCE(base_crng.birth) + interval); in crng_has_old_seed()
347 spin_lock_irqsave(&base_crng.lock, flags); in crng_make_state()
[all …]