kernel: enable CONFIG_CRYPTO_ECDSA for H100 confidential compute#14
Merged
Conversation
NVIDIA's open kernel driver (nvidia.ko) gates its LKCA-backed libspdm crypto provider on `CONFIG_CRYPTO_ECDSA` being defined when the driver is built (see `kernel-open/nvidia/internal_crypt_lib.h`: the `USE_LKCA` macro requires the kernel to advertise ECDSA, ECDH, RSA, HMAC, AKCIPHER, etc.). When `CONFIG_CRYPTO_ECDSA` is missing, libspdm falls back to stubs and at runtime prints `libspdm expects LKCA but found stubs!` then fails `spdmEstablishSession`, so H100 in Confidential Compute mode (e.g. GCP TDX + a3-highgpu-1g) never finishes init and `nvidia-smi` reports no devices. `meta-nvidia/recipes-kernel/linux/files/nvidia.cfg` already sets this config, but it ships as a `linux-yocto%.bbappend`, which does not attach to the in-tree `linux-custom_*.bb` recipes that build the dstack kernel from a defconfig. Add the option directly to the 6.17 and 6.18 defconfigs so all flavors (incl. nvidia) pick it up. Verified end-to-end on GCP a3-highgpu-1g + TDX after rebuilding the kernel + nvidia kernel modules with this change: SPDM session establishes, `nvidia-smi conf-compute -f` reports `CC status: ON`, and a PyTorch matmul runs at ~38 TFLOPs.
There was a problem hiding this comment.
Pull request overview
Enables CONFIG_CRYPTO_ECDSA=y in the dstack kernel defconfigs so NVIDIA’s open kernel driver can use the kernel crypto (LKCA) backend required for H100 Confidential Compute initialization.
Changes:
- Add
CONFIG_CRYPTO_ECDSA=yto the Linux 6.17 defconfig. - Add
CONFIG_CRYPTO_ECDSA=yto the Linux 6.18 defconfig.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| meta-dstack/recipes-kernel/linux/files/6.18/defconfig | Enables ECDSA in the 6.18 defconfig to satisfy NVIDIA driver LKCA requirements for CC. |
| meta-dstack/recipes-kernel/linux/files/6.17/defconfig | Enables ECDSA in the 6.17 defconfig to satisfy NVIDIA driver LKCA requirements for CC. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Add
CONFIG_CRYPTO_ECDSA=yto the dstack kernel defconfigs (6.17 and 6.18).Why
NVIDIA's open kernel driver (
nvidia.ko) gates its LKCA-backed libspdmcrypto provider on
CONFIG_CRYPTO_ECDSAbeing defined at compile time(see
kernel-open/nvidia/internal_crypt_lib.h— theUSE_LKCAmacrorequires the kernel to advertise ECDSA, ECDH, RSA, HMAC, AKCIPHER, etc.).
When
CONFIG_CRYPTO_ECDSAis missing, libspdm is wired to stubs atcompile time. At runtime the driver prints:
…and the H100 never finishes init in Confidential Compute mode
(e.g. GCP TDX +
a3-highgpu-1g).nvidia-smireports no devices.meta-nvidia/recipes-kernel/linux/files/nvidia.cfgalready declaresthis option, but it ships as a
linux-yocto%.bbappend, which doesnot attach to the in-tree
linux-custom_*.bbrecipes that buildthe dstack kernel from a defconfig. So the setting never reached the
final kernel. Adding it directly to the defconfigs ensures all
flavors (incl. nvidia) pick it up.
Verification
End-to-end on GCP
a3-highgpu-1g+ TDX +--confidential-compute-type=TDX,after rebuilding the kernel + nvidia kernel modules with this change:
nvidia.kologslibspdm_check_crypto_backend: LKCA wrappers found.nvidia-smishowsNVIDIA H100 80GB HBM3nvidia-smi conf-compute -freportsCC status: ONnvidia-smi conf-compute -grsreportsConfidential Compute GPUs Ready state: readypytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime) runs a 4096³ matmul at ~38 TFLOPs FP32Test plan
mc:nvidia:dstack-image-ukiwith this changenvidia-smiworksCC status: ON