Repository navigation
fix(kernel): build accelerated AES and GHASH into the kernel - #20009
Open
Rachel Menge (rlmenge) wants to merge 1 commit into
Open
Rachel Menge (rlmenge) wants to merge 1 commit into
Rachel Menge (rlmenge) wants to merge 1 commit into
Conversation
Contributor
Author
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The early-boot FIPS changes affect both architectures, but reported validation lacks ARM64 build results and FIPS-enabled boot/self-test evidence needed to establish runtime correctness.
No open issues 🎉
What changed in this PR
This PR makes accelerated AES and GHASH implementations available before /init for early FIPS self-tests in Azure Linux.
Changes:
- Builds the selected crypto implementations and
cryptdinto the x86_64 and ARM64 kernels. - Adds config-checker requirements to prevent key settings from reverting to modules.
- Bumps the kernel package release to
1.3and updates rendered files and the lock fingerprint.
| File | Description |
|---|---|
specs/k/kernel/kernel.spec |
Reflects the release bump and changelog entry. |
specs/k/kernel/6.18-x86_64-azl.config |
Renders the x86_64 built-in crypto settings. |
specs/k/kernel/6.18-aarch64-azl.config |
Renders the ARM64 built-in crypto settings. |
scripts/ci/kernel/kernel-config-checker/kernel_config_checker/kernel_configs_json/azl4-os-required-kernel-configs.json |
Enforces required built-in crypto settings by architecture. |
locks/kernel.lock |
Updates the component input fingerprint. |
base/comps/kernel/kernel.spec |
Increments the package release and documents the change. |
base/comps/kernel/6.18-x86_64-azl.config |
Enables built-in AES-NI, GHASH, and cryptd. |
base/comps/kernel/6.18-aarch64-azl.config |
Enables built-in ARM64 AES variants, GHASH, and cryptd. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Build the hardware-accelerated AES and GHASH crypto implementations (and the
cryptdhelper they depend on) into the kernel instead of shipping them as modules. This makes them available before/init, so FIPS self-tests run against the accelerated implementations at boot.Fixes AB#24795
Changes
Kernel config (
base/comps/kernel/6.18-{x86_64,aarch64}-azl.config)m->yCRYPTO_AES_NI_INTEL,CRYPTO_GHASH_CLMUL_NI_INTEL,CRYPTO_CRYPTDCRYPTO_AES_ARM64,CRYPTO_AES_ARM64_CE,CRYPTO_AES_ARM64_CE_BLK,CRYPTO_AES_ARM64_NEON_BLK,CRYPTO_AES_ARM64_BS,CRYPTO_AES_ARM64_CE_CCM,CRYPTO_GHASH_ARM64_CE,CRYPTO_CRYPTDCRYPTO_CRYPTDis built in on both arches for consistency.Config checker (
azl4-os-required-kernel-configs.json)Enforce the new values so they can't silently regress to modules:
CONFIG_CRYPTO_AES_NI_INTEL,CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL(x86_64)CONFIG_CRYPTO_AES_ARM64_CE_BLK,CONFIG_CRYPTO_GHASH_ARM64_CE(arm64)CONFIG_CRYPTO_CRYPTD(both)Packaging
kernel.specrelease bumped to1.3with a changelog entry. Rendered spec and lock are regenerated.Testing
pytestpasses.azldev comp build -p kernelsucceeds on x86_64.kernel-coreconfig hasCONFIG_CRYPTO_AES_NI_INTEL=y,CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=yandCONFIG_CRYPTO_CRYPTD=y.aesni-intel,ghash-clmulni-intelandcryptdappear inmodules.builtin..kofiles is shipped in anykernel-modules*RPM.