From nobody Sun Sep 22 07:36:42 2024 X-Original-To: dev-commits-src-all@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 4XBHxl0Zzcz5XYSH; Sun, 22 Sep 2024 07:36:43 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XBHxk6YbTz44Ym; Sun, 22 Sep 2024 07:36:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726990602; 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; bh=Pn1+nGaQZgG7wgknu8eKXYdVLZgbKfI/3/ndvw5Vf30=; b=YJ7XVAw/OPof6KsLmsnNLfSfB+9jBwxJ+GV5ZII4ag9b4ziOXmxelWqLy5fA0VuzaCi96p 7Sc8xYSnaFPaGQ/B6UcvHDc0HSiRInOs+6wONsKW78GsOhkxSOPrAlijHezMdUEw5tX8bg kAtprXKmU3K9Lef7D/9ZY3rud9SeiS/zsbiUMU9idjMnXWljSbAj9lWPX2GNiazGiRKVzt +g2uS/d/iVS/D7c8r4xI+9KQ8tvx1ED1BLfc9sioK55/v8EKebuHnbcodbCmGcPlsyFywF No6hQwR82Vjr3/fh5S30o/GkhBSCpJ1maeDG2uYOWapJHLxxx+c3ZhFjDfaKkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726990602; a=rsa-sha256; cv=none; b=Wlr6XgJ2GiuRJ+vgHh2xrHyDEKFQDaYEX0yQ2kMvR6BpCDOH0ahLFlMiwLlYnwLbSZLkAZ 1TWdfwhQUH2FnQixTXbTafo81IRGT6qOEht/BWITOhectQmDg5QUJMrJuB1BJndeCcbOCL dv4mLFIm/kogCBwThcS6nrCsfDkTILsivIV4ycZv9ylwfNEgtsmT4edRKn6doUXFoIQ5Sp 4E+GOnD2HKmVT8blkepxmN1HOcUe+ehzy1vAjBg/oWYBxgIbaHWAi54E2hZSwhoy9hLnNG yMI+W/pmWNxwyzXw41HxiLUaNtQDhwLxu/aDNL1FjNNDbrKy752+C3+QAXKxoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726990602; 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; bh=Pn1+nGaQZgG7wgknu8eKXYdVLZgbKfI/3/ndvw5Vf30=; b=DglwOn+VB+Ol6kgpChAy8GHExwNuIoz3GfXOvczJgHQ5itRpwn9wLooAEcVeOj0S7XtjLn /5uKCq/twZnY+ooNaWDlPWXA4ijBul/2gRXcUrVi35ukncKre2gPwZj7psdDC5SSp0wcvn gRplZd0Sw9VoUdc8oaz/p2LC69qOnOVOyYx8q51/gltaHBxQri+M1+sOOwvi3VuFbKpvCv K8DsNqzxTD8xE8tgU0Nn+QpIb6jc7FkkMYARAUTaWzdIAWhy4y9IQ5QTpjAqs/2n1UF/8R smKLlDw0zLV9Wkd+ftTwTA7v9elZoTgded19M09AyNpHw/sHOZKKoKvuWJsQPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4XBHxk67BRz17Lj; Sun, 22 Sep 2024 07:36:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48M7agcd097140; Sun, 22 Sep 2024 07:36:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48M7agEx097137; Sun, 22 Sep 2024 07:36:42 GMT (envelope-from git) Date: Sun, 22 Sep 2024 07:36:42 GMT Message-Id: <202409220736.48M7agEx097137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: f4a69a933cd6 - main - loader: Make EFI entropy size configurable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4a69a933cd645e384b337db5ef2ccf41a1ddd5b Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f4a69a933cd645e384b337db5ef2ccf41a1ddd5b commit f4a69a933cd645e384b337db5ef2ccf41a1ddd5b Author: Colin Percival AuthorDate: 2024-09-18 11:02:01 +0000 Commit: Colin Percival CommitDate: 2024-09-22 07:35:47 +0000 loader: Make EFI entropy size configurable Add a new loader variable entropy_efi_seed_size which defaults to 2048; if not defined (e.g. if the /boot/lua/ is updated but /boot/defaults/ isn't) the same 2048 default will be used. Reviewed by: Val Packett MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46632 --- stand/defaults/loader.conf | 8 ++++++-- stand/lua/core.lua | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index a5d27b96b6ba..c3de7cdfb74b 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -48,8 +48,12 @@ entropy_cache_type="boot_entropy_cache" # Required for the kernel to find # the boot-time entropy cache. This # must not change value even if the # _name above does change! -entropy_efi_seed="YES" # Set this to NO to disable loading - # entropy from the UEFI hardware random number generator API +entropy_efi_seed="YES" # Set this to NO to disable loading + # entropy from the UEFI hardware + # random number generator API +entropy_efi_seed_size="2048" # Set this to a different value to + # change the amount of entropy + # requested from EFI ### RAM Blacklist configuration ############################ ram_blacklist_load="NO" # Set this to YES to load a file diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 7b7560ddc820..72b19462ae5c 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -369,7 +369,8 @@ end function core.loadEntropy() if core.isUEFIBoot() then if (loader.getenv("entropy_efi_seed") or "no"):lower() == "yes" then - loader.perform("efi-seed-entropy") + local seedsize = loader.getenv("entropy_efi_seed_size") or "2048" + loader.perform("efi-seed-entropy " .. seedsize) end end end