In ithread_schedule(), when we plan to go harvest some entropy as
a result of scheduling an ithread, cut a KTR_INTR trace record so that it's clear in tracing interrupt activity where and when the entropy harvesting code is invoked.
This commit is contained in:
parent
a405528350
commit
a75f66ca0a
@ -379,19 +379,21 @@ ithread_schedule(struct ithd *ithread)
|
||||
return (EINVAL);
|
||||
|
||||
ctd = curthread;
|
||||
td = ithread->it_td;
|
||||
p = td->td_proc;
|
||||
/*
|
||||
* If any of the handlers for this ithread claim to be good
|
||||
* sources of entropy, then gather some.
|
||||
*/
|
||||
if (harvest.interrupt && ithread->it_flags & IT_ENTROPY) {
|
||||
CTR3(KTR_INTR, "%s: pid %d (%s) gathering entropy", __func__,
|
||||
p->p_pid, p->p_comm);
|
||||
entropy.vector = ithread->it_vector;
|
||||
entropy.proc = ctd->td_proc;
|
||||
random_harvest(&entropy, sizeof(entropy), 2, 0,
|
||||
RANDOM_INTERRUPT);
|
||||
}
|
||||
|
||||
td = ithread->it_td;
|
||||
p = td->td_proc;
|
||||
KASSERT(p != NULL, ("ithread %s has no process", ithread->it_name));
|
||||
CTR4(KTR_INTR, "%s: pid %d: (%s) need = %d",
|
||||
__func__, p->p_pid, p->p_comm, ithread->it_need);
|
||||
|
Loading…
Reference in New Issue
Block a user