Bug 231181 - random(4): Error transitioning from unseeded to seeded state
Summary: random(4): Error transitioning from unseeded to seeded state
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks: 228911
  Show dependency treegraph
 
Reported: 2018-09-05 16:56 UTC by Conrad Meyer
Modified: 2018-09-25 05:18 UTC (History)
1 user (show)

See Also:
rgrimes: mfc-stable11+
delphij: mfc-stable10-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2018-09-05 16:58:07 UTC
Suggest blocker status for 12.0 release, but I am not tied to it (relatively uncommon to be in an unseeded state and such configurations *could* work around it).
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2018-09-05 17:00:35 UTC
Formally approved by secteam (delphij@), vangyzen@ in phab.  Tagged re@ for approval in freeze.
Comment 3 Rodney W. Grimes freebsd_committer freebsd_triage 2018-09-05 19:39:16 UTC
(In reply to Conrad Meyer from comment #2)
You need to send an official RFA to re@ if you want to commit this, tagging in phabricator does not get you there.

Thanks,
Rod
Comment 4 Conrad Meyer freebsd_committer freebsd_triage 2018-09-05 19:55:06 UTC
(In reply to Rodney W. Grimes from comment #3)
I am happy to commit before thaw or after thaw -- choice is re's.
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-09-09 17:12:45 UTC
A commit references this bug:

Author: delphij
Date: Sun Sep  9 17:12:31 UTC 2018
New revision: 338542
URL: https://svnweb.freebsd.org/changeset/base/338542

Log:
  random(4): Squash non-error timeout codes from tsleep(9).

  In both scenarios a timeout (EWOULDBLOCK) is considered as a
  normal condition and the error should not pop up to upper layers.

  PR:		231181
  Submitted by:	cem
  Reported by:	lev
  Reviewed by:	vangyzen, markm, delphij
  Approved by:	re (kib)
  Approved by:	secteam (delphij)
  Differential Revision:	https://reviews.freebsd.org/D17049

Changes:
  head/sys/dev/random/randomdev.c
Comment 6 Conrad Meyer freebsd_committer freebsd_triage 2018-09-20 17:31:04 UTC
It is no longer blocking 12.0.  Should the blocking relationship be removed, or the bug closed?
Comment 7 Rodney W. Grimes freebsd_committer freebsd_triage 2018-09-20 19:36:18 UTC
(In reply to Conrad Meyer from comment #6)
If the bug is fixed the PR should be closed.
Comment 8 Conrad Meyer freebsd_committer freebsd_triage 2018-09-20 20:09:46 UTC
(In reply to Rodney W. Grimes from comment #7)
It's fixed on CURRENT, but not on stable.
Comment 9 Rodney W. Grimes freebsd_committer freebsd_triage 2018-09-20 20:29:41 UTC
@delphij is there some reason you did not mark your commit as MFC:?
Comment 10 Conrad Meyer freebsd_committer freebsd_triage 2018-09-20 20:55:47 UTC
The primary bug has lower impact on 11 due to the specifics of the previous arc4random(3).  And the second tsleep was not introduced until after 11, unless someone MFC'ed it.  I don't know if this bug is relevant for 10 at all; random's structure changed heavily in ~2015.  (Also, are there going to be any more 10.x releases anyway?)
Comment 11 Xin LI freebsd_committer freebsd_triage 2018-09-24 21:48:46 UTC
(In reply to Rodney W. Grimes from comment #9)
I'll merge the applicable portion to stable/11.

The issue was introduced in r284959 which was not merged to stable/10.
Comment 12 commit-hook freebsd_committer freebsd_triage 2018-09-25 05:18:30 UTC
A commit references this bug:

Author: delphij
Date: Tue Sep 25 05:18:20 UTC 2018
New revision: 338923
URL: https://svnweb.freebsd.org/changeset/base/338923

Log:
  Partial MFC of r338542:

  random(4): Squash non-error timeout code from tsleep(9).

  PR:		231181
  Submitted by:	cem
  Reported by:	lev
  Reviewed by:	vangyzen, markm, delphij
  Approved by:	secteam (delphij)
  Differential Revision:	https://reviews.freebsd.org/D17049

Changes:
_U  stable/11/
  stable/11/sys/dev/random/randomdev.c