NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/56730 CVS commit: src/sys/kern



The following reply was made to PR kern/56730; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/56730 CVS commit: src/sys/kern
Date: Fri, 18 Mar 2022 23:34:56 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Fri Mar 18 23:34:56 UTC 2022
 
 Modified Files:
 	src/sys/kern: kern_entropy.c
 
 Log Message:
 entropy(9): Use the early-entropy path only while cold.
 
 This way, we never take the global entropy lock from interrupt
 handlers (no interrupts while cold), so the global entropy lock need
 not block interrupts.
 
 There's an annoying ordering issue here: softint_establish doesn't
 work until after CPUs have been detected, which happens inside
 configure(), which is also what enables interrupts.  So we have no
 opportunity to softint_establish the entropy softint _before_
 interrupts are enabled.
 
 To work around this, we have to put a conditional into the interrupt
 path, and go out of our way to process any queued samples after
 establishing the softint.  If we just made softint_establish work
 early, like percpu_create does now, this problem would go away and we
 could delete a bit of logic here.
 
 Candidate fix for PR kern/56730.
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.36 -r1.37 src/sys/kern/kern_entropy.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index