From nobody Fri Mar 18 00:06:18 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D3201A236F3 for ; Fri, 18 Mar 2022 00:06:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KKPSB1T1Lz4ptd for ; Fri, 18 Mar 2022 00:06:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 139E9147FA for ; Fri, 18 Mar 2022 00:06:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 22I06Ie5037272 for ; Fri, 18 Mar 2022 00:06:18 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 22I06Ibx037271 for bugs@FreeBSD.org; Fri, 18 Mar 2022 00:06:18 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262192] Crashes at boot with kern.random.initial_seeding.bypass_before_seeding=0 in randomdev_wait_until_seeded() Date: Fri, 18 Mar 2022 00:06:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: olivier.freebsd@free.fr X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: mfc-stable13? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647561978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JPvjMH6qOwfXCF82+npEifxcWkUWoyFRUtJ1qWdpLNo=; b=b0savQIbeV1uYfbLqucX3UNl7fNfj+UwuMfFygbpJuq1gzr4PDNJYn6fOa/PxV/oBfMIjU L6pXIgFvbBn5MlQMDvgKiUCKWStuxixbatI81zDyNI2OecuMzbpGePsPvxhmxxzpA6N44H 4WEHLPHmHF4GyUAy3FxZI/L6v50Ct63kATjiMOt2WVl+KEOh0Bww/Czesd84LP0lIDWRKK /qrqrllR9q4y8Gl4n06i73/1W8msCtYWn9RlQcZsXG7us3DU5BNpr5BYS1xTuwYz9qO7bW Mk4YSIhk59Yhd9+uGc5XUe163zrl6AeZzPnwGOGEyXr6kRzERwiYCq5r3Pu4Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647561978; a=rsa-sha256; cv=none; b=RXSIVlDWFOn3Z2cbhMRSCarpX0qj48+jJPnq2kcQXG4I39lk+wC67Rxusa6HSvd9LFn8qO WgWOMAkyNfrLsyQMomoDlrU4rhSM+n6gpSyrfErr6yhgt/ZM2Rvjb37vhGeNmrCT2tXgRL KJh2g8n61YZqlYBVjlLOVMU2MRntHWmniNp1S/6aApu+YrF4D06gwh8pNdDPT868MYzx1J qUp9rotJGUZOK69y6CMDnHu2vHV4OBZmEfW03O/Jr8KJjngKy9AI5aePcej/uMJzoNjWRU o7JyoIEDZSgTxqtjv59RIzJ5hZ/JD4RNrBmZgALhNE3qeDRAqeS0XIj/Dlk/DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262192 --- Comment #13 from Olivier Certner --- This is on a relatively recent 13-STABLE. I'll repeat this process with CURRENT's GENERIC kernel when possible. I'm wondering if it is possible, or even desirable, to initialize the seeds later on. I've not taken the time yet to figure out at which point in the b= oot TCP connections may be established, and I'm not sure it's not before KICK_SCHEDULER. Moreover, splitting the initialization code is a cognitive burden, so it would be best to avoid it (if possible). The last two stacks above correspond to random values that are generated ea= ch time a new FS is mounted/a process started. They happen after KICK_SCHEDULE= R. However, in my tests, I introduced code to make the kernel panic if, on the first call to the random dev, seeding doesn't happen within 10s (to catch t= he earlier stacks, where anyway no harvesting takes place, so the random calls block indefinitely). And I got panics indeed for these two stacks as well, = so entropy isn't accumulating "fast enough" (would be interesting to see how l= ong the calls would block before enough entropy is available; waiting tens of seconds might be tolerable at boot in some scenarios, but probably not much more). If some entropy source could be made available very early, all these considerations and problems would be avoided. --=20 You are receiving this mail because: You are the assignee for the bug.=