| f470543a | 18-Sep-2024 |
Colin Percival <[email protected]> |
loader: Expand EFI entropy if < 2048 bytes
The EFI RNG on some platforms takes a long time if we request 2048 bytes of entropy, so we would like to request less; but our kernel Fortuna RNG needs to
loader: Expand EFI entropy if < 2048 bytes
The EFI RNG on some platforms takes a long time if we request 2048 bytes of entropy, so we would like to request less; but our kernel Fortuna RNG needs to be fed 2048 bytes in order to consider itself "fully seeded". If we have between 64 bytes (the size of a single Fortuna pool and enough to guarantee cryptographic security) and 2048 bytes (what Fortuna wants) then the boot process will hang waiting for more entropy despite in fact having enough to operate securely.
Since 64 bytes of entropy is plenty to be cryptographically secure (an attack of cost ~ 2^128 is infeasible, which implies a mere 16 bytes of entropy), use PBKDF2 (aka pkcs5v2_genkey_raw) to spread the entropy across 2048 bytes. This is secure since PBKDF2 has the property that every subset of output bytes has within O(1) of the maximum possible amount of entropy.
Reviewed by: pjd MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46635
(cherry picked from commit c8ebbd28aa91705aea3a67b06018ea6aef5aa6e4)
show more ...
|
| dd2cfed9 | 29-Jul-2024 |
Warner Losh <[email protected]> |
loader: Bump all versions to 3.0
Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a wa
loader: Bump all versions to 3.0
Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a warning that their boot loader is too old. We check only the major version, though, so minor versions can still be bumped for individual loaders (though I honestly doubt we'll ever need to do that again).
Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45888
(cherry picked from commit 9f7f90507528aaa9a2f54575c1d4f4010d01c2e5)
show more ...
|
| 7cc0ac56 | 25-Feb-2024 |
Warner Losh <[email protected]> |
loader/efi: Only include interpreter's linker script
For safety, only include the interpreter's linker script. Note that the simple loader doesn't have one, but it's not an error to copy a ELF secti
loader/efi: Only include interpreter's linker script
For safety, only include the interpreter's linker script. Note that the simple loader doesn't have one, but it's not an error to copy a ELF section that does not exist. No functional change, however.
Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D44064
(cherry picked from commit f5f08e41aa57f94e3c127a488a82b4e518781f89)
show more ...
|
| 36d49fb2 | 25-Feb-2024 |
Warner Losh <[email protected]> |
loader/ficl: Rename the ficl compile set to X4th_compile_set
And upcoming change will need this set to be named this. Since it's only used in the efi Makefile, and inside if ficl itself, the change
loader/ficl: Rename the ficl compile set to X4th_compile_set
And upcoming change will need this set to be named this. Since it's only used in the efi Makefile, and inside if ficl itself, the change should be a nop.
Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D44063
(cherry picked from commit 8ec8413faa3573c579d9e6361de904f8251b0c0e)
show more ...
|
| 88ec6ce7 | 25-Feb-2024 |
Warner Losh <[email protected]> |
loader/efi: Use unique linker set for lua
After the linker set cleanup in ldscripts, there's now only one place we need to know the linkerset name, so go ahead and change the lua interpreter augment
loader/efi: Use unique linker set for lua
After the linker set cleanup in ldscripts, there's now only one place we need to know the linkerset name, so go ahead and change the lua interpreter augmentation linker set to be uniquely named.
Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D44062
(cherry picked from commit b4e85f760b6b77d276747c9beb6191bfb864e0c2)
show more ...
|
| 92f8c2f6 | 21-Feb-2024 |
Warner Losh <[email protected]> |
loader/efi: Make gcc friendlier by move md_dev
Move the extern struct devsw md_dev out of the function. gcc is happier with this arrangemnt often. However, we really should move it to a header file,
loader/efi: Make gcc friendlier by move md_dev
Move the extern struct devsw md_dev out of the function. gcc is happier with this arrangemnt often. However, we really should move it to a header file, but that requires a bit of a rework of md support and config.
Sponsored by: Netflix Reviewed by: manu, tsoome Differential Revision: https://reviews.freebsd.org/D44008
(cherry picked from commit b2822c40f61d351bf8a4cac87e12521db06ff962)
show more ...
|
| 16d49d0e | 12-Feb-2024 |
Simon J. Gerraty <[email protected]> |
libsecureboot do not report expected unverified files
By default only report unverified files at severity VE_WANT and above. This inlcudes *.conf but not *.hints, *.cookie or *.tgz which get VE_TRY
libsecureboot do not report expected unverified files
By default only report unverified files at severity VE_WANT and above. This inlcudes *.conf but not *.hints, *.cookie or *.tgz which get VE_TRY as their severity.
If Verbose is set to 0, then VerifyFlags should default to 0 too. Thus the combination of
module_verbose=0 VE_VEBOSE=0
is sufficient to make the loader almost totally silent.
When verify_prep has to find_manifest and it is verified ok return VE_NOT_CHECKED to verify_file so that it can skip repeating verify_fd
Also add better debugging output for is_verified and add_verify_status.
vectx handle compressed modules
When verifying a compressed module (.ko.gz or .ko.bz2) stat() reports the size as -1 (unknown). vectx_lseek needs to spot this during closing - and just read until EOF is hit.
Note: because of the way libsa's open() works, verify_prep will see the path to be verified as module.ko not module.ko.bz2 etc. This is actually ok, because we need a separate module.ko.bz2 entry so that the package can be verified, and the hash for module.ko is of the uncompressed file which is what vectx will see.
Re-work local.trust.mk so site.trust.mk need only set VE_SIGN_URL_LIST (if using the mentioned signing server)
interp.c: restrict interactive input
Apply the same restrictions to interactive input as for unverified conf and hints files.
Use version.veriexec when LOADER_VERIEXEC is yes
Reviewed by: kevans Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43810
(cherry picked from commit f616d61ab6b071e5fbfdbae7033a9ef04c1444ad)
show more ...
|
| 77d298ea | 08-Dec-2023 |
Kyle Evans <[email protected]> |
loader: lua: assume late ACPI detection if the feature isn't enabled
While we're here, enable the feature in the places we detect ACPI. This lets us side-step the existing issues and provide a path
loader: lua: assume late ACPI detection if the feature isn't enabled
While we're here, enable the feature in the places we detect ACPI. This lets us side-step the existing issues and provide a path forward for folks upgrading from previous releases that haven't updated their ESP yet.
Let's also fix core.setACPI: the hint already indicates that the user's disabled it more consistently than loader.acpi_disabled_by_user. Even more, the latter is wrong because we set it by default if we did not detect ACPI. The ACPI hint remains even when we're setting defaults because ACPI loaded into the kernel will make some noise if it's not hinted off, even when we didn't detect it.
imp notes that this will result in some relatively harmless noise on platforms that don't support ACPI but aren't using the UEFI loader, as we would enable the ACPI module for loading on them and then loader would not be able to find it. These are non-fatal, but should probably be fixed by just declaring support for EARLY_ACPI in those loaders since we know they won't have ACPI early on -- punting on this for the time being, though, in favor of providing a safer upgrade path sooner.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42727
(cherry picked from commit e183039f0882009c455c3b59fe1ab58a4fd25a5e)
show more ...
|
| ac0776ec | 22-Nov-2023 |
Warner Losh <[email protected]> |
stand/efi: Consolidate integer types
We have no need for 5 different copies of these.
Sponsored by: Netflix Reviewed by: rcm, kevans, andrew Differential Revision: https://reviews.freebsd.org/D42
stand/efi: Consolidate integer types
We have no need for 5 different copies of these.
Sponsored by: Netflix Reviewed by: rcm, kevans, andrew Differential Revision: https://reviews.freebsd.org/D42699
(cherry picked from commit 7a1bc422d109a7cee56dcfbac616eda613c1c43e)
show more ...
|
| beab67c8 | 21-Nov-2023 |
Warner Losh <[email protected]> |
stand/efi: Define ACPI_USE_SYSTEM_INTTYPES to be 1 instead of blank
To avoid a redefinition warning... This needs to be redone correctly, but this gets amd64 building again... My amd64 environment
stand/efi: Define ACPI_USE_SYSTEM_INTTYPES to be 1 instead of blank
To avoid a redefinition warning... This needs to be redone correctly, but this gets amd64 building again... My amd64 environment is polluted with something that caues earlier failures which I ignored...
Fixes: 488bc7e9a777 Sponsored by: Netflix
(cherry picked from commit e4789047ffd1319be337711ae4b6c594378f31b2)
show more ...
|
| 58b95f5f | 21-Nov-2023 |
Warner Losh <[email protected]> |
stand/efi: Request ACPI use the system inttypes
With the system inttypes, we build on all platforms again.
Suggested by: andrew Fixes: 0b01d45783c3 Sponsored by: Netflix
(cherry picked from commi
stand/efi: Request ACPI use the system inttypes
With the system inttypes, we build on all platforms again.
Suggested by: andrew Fixes: 0b01d45783c3 Sponsored by: Netflix
(cherry picked from commit 488bc7e9a77763dde6919d3c83e57d1fc8175ca2)
show more ...
|
| 05cf4dda | 20-Nov-2023 |
R. Christian McDonald <[email protected]> |
loader: fix EFI ACPI detection
lua was previously unable to determine ACPI presence because this probing was postponed until the final loading and execution of the kernel.
This patch resolves that
loader: fix EFI ACPI detection
lua was previously unable to determine ACPI presence because this probing was postponed until the final loading and execution of the kernel.
This patch resolves that by detecting ACPI early (similar to the order of operations in the legacy i386 loader).
Reviewed by: kevans Approved by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42459
(cherry picked from commit 0b01d45783c3ee5a544c882d1b147e4a60382c41)
show more ...
|