Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: packaging: Use confidential kernel instead of the TDX one #8978

Conversation

fidencio
Copy link
Member

We've been building a 6.7 kernel for some time and it can be used for all the TEEs. For now I'm just enabling this for TDX, at least till the SEV / SNP CIs are up and running again.

@katacontainersbot katacontainersbot added the size/small Small and simple task label Jan 31, 2024
@fidencio fidencio marked this pull request as draft January 31, 2024 16:43
@fidencio fidencio force-pushed the topic/use-the-kernel-confidential-when-possible branch 2 times, most recently from 547e02a to fa653ce Compare January 31, 2024 18:59
@fidencio fidencio marked this pull request as ready for review January 31, 2024 19:00
@fidencio
Copy link
Member Author

fidencio commented Feb 1, 2024

/test

Copy link
Contributor

@portersrc portersrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@fidencio fidencio added the do-not-merge PR has problems or depends on another label Feb 2, 2024
@fidencio
Copy link
Member Author

fidencio commented Feb 2, 2024

I'm adding a `do-not-merge as Ryan wants to test a few things outside of the CI.

@fidencio fidencio removed the do-not-merge PR has problems or depends on another label Feb 2, 2024
@fidencio fidencio force-pushed the topic/use-the-kernel-confidential-when-possible branch from bc98acb to a735752 Compare February 2, 2024 13:07
@fidencio fidencio changed the title runtime: packaging: Use confidential kernel whenever it's possible runtime: packaging: Use confidential kernel instead of the TDX one Feb 2, 2024
@fidencio
Copy link
Member Author

fidencio commented Feb 2, 2024

Folks, I've dropped the AMD bits from here in order to have this one moving,

Copy link
Contributor

@zvonkok zvonkok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fidencio
Copy link
Member Author

fidencio commented Feb 2, 2024

/test

@fidencio fidencio force-pushed the topic/use-the-kernel-confidential-when-possible branch 4 times, most recently from fb8bc5c to 69de09d Compare February 2, 2024 15:40
@katacontainersbot katacontainersbot added size/medium Average sized task and removed size/small Small and simple task labels Feb 2, 2024
@fidencio fidencio marked this pull request as draft February 2, 2024 15:45
With this we can properly generate and the the `-confidential` kernel,
which supports SEV / SNP / TDX as part of our configuration files.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
As we're building a single confidential kernel, we should rely on it
rather than keep using the specific ones for TDX / SEV / SNP.

However, for debugability-sake, let's do this change TEE by TEE.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
@fidencio fidencio force-pushed the topic/use-the-kernel-confidential-when-possible branch from 69de09d to 16cd315 Compare February 2, 2024 16:14
@katacontainersbot katacontainersbot added the size/small Small and simple task label Feb 2, 2024
@katacontainersbot katacontainersbot removed the size/medium Average sized task label Feb 2, 2024
@fidencio fidencio force-pushed the topic/use-the-kernel-confidential-when-possible branch from 16cd315 to b9eeeb5 Compare February 2, 2024 16:34
Copy link
Member

@ryansavino ryansavino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Just a brief update here based on the slack discussion:
There is a SNP guest kernel patch in the current AMDESE/linux fork for a bug that addresses an issue when more than 1 TB is allocated for a guest. This will get pulled in when we update to a newer kernel at a later point in time.

@ryansavino
Copy link
Member

@niteeshkd we should make sure to rebase your forked branch once this gets into main.

As we're building a single confidential kernel, we should rely on it
rather than keep using the specific ones for TDX / SEV / SNP.

However, for debugability-sake, let's do this change TEE by TEE.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
As we're building a single confidential kernel, we should rely on it
rather than keep using the specific ones for TDX / SEV / SNP.

However, for debugability-sake, let's do this change TEE by TEE.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
As this is not used anymore, we can go ahead and just remove it.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
As this is not used anymore, we can go ahead and just remove it

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
As this is not used anymore, we can go ahead and just remove it

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
We're using the confidential kernel instead from now on.

Fixes: kata-containers#8981 -- part I

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
The modules dir has an extra "-nvidia-gpu-confidential" string in its
name.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This is already done for the TDX kernel, and should have been done also
for the confidential one.

This action requires us to bump the kernel version as the resulting
kernel will be different from the cached one.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
We need to do this in order to ensure that the measure boot will be
taking the latest kernel bits, as needed.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Now that we're using the kernel-confidential, let the rootfs depending
on it, instead of depending on the TEE specific ones.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
@fidencio fidencio force-pushed the topic/use-the-kernel-confidential-when-possible branch from b9eeeb5 to e9de0ef Compare February 2, 2024 20:14
@katacontainersbot katacontainersbot added size/medium Average sized task and removed size/small Small and simple task labels Feb 2, 2024
@fidencio
Copy link
Member Author

fidencio commented Feb 2, 2024

LGTM.
Just a brief update here based on the slack discussion:
There is a SNP guest kernel patch in the current AMDESE/linux fork for a bug that addresses an issue when more than 1 TB is allocated for a guest. This will get pulled in when we update to a newer kernel at a later point in time.

Cool, I've re-added the AMD related bits to this PR. Thanks.

@fidencio
Copy link
Member Author

fidencio commented Feb 2, 2024

/test

@fidencio fidencio marked this pull request as ready for review February 2, 2024 22:40
@fidencio fidencio merged commit 7ddb2e5 into kata-containers:main Feb 2, 2024
288 of 367 checks passed
fidencio added a commit to fidencio/kata-containers that referenced this pull request Feb 5, 2024
Now we're using a "confidential" image that has support for all of
those.

Fixes: kata-containers#9010 -- part II
       kata-containers#8982 -- part II
       kata-containers#8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
fidencio added a commit to fidencio/kata-containers that referenced this pull request Feb 13, 2024
Now we're using a "confidential" image that has support for all of
those.

Fixes: kata-containers#9010 -- part II
       kata-containers#8982 -- part II
       kata-containers#8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
fidencio added a commit to fidencio/kata-containers that referenced this pull request Feb 13, 2024
Now we're using a "confidential" image that has support for all of
those.

Fixes: kata-containers#9010 -- part II
       kata-containers#8982 -- part II
       kata-containers#8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
fidencio added a commit to fidencio/kata-containers that referenced this pull request Feb 13, 2024
Now we're using a "confidential" image that has support for all of
those.

Fixes: kata-containers#9010 -- part II
       kata-containers#8982 -- part II
       kata-containers#8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
fidencio added a commit to fidencio/kata-containers that referenced this pull request Feb 13, 2024
Now we're using a "confidential" image that has support for all of
those.

Fixes: kata-containers#9010 -- part II
       kata-containers#8982 -- part II
       kata-containers#8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
fidencio added a commit to fidencio/kata-containers that referenced this pull request Feb 13, 2024
Now we're using a "confidential" image that has support for all of
those.

Fixes: kata-containers#9010 -- part II
       kata-containers#8982 -- part II
       kata-containers#8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
c3d pushed a commit to c3d/kata-containers that referenced this pull request Feb 23, 2024
Now we're using a "confidential" image that has support for all of
those.

Fixes: kata-containers#9010 -- part II
       kata-containers#8982 -- part II
       kata-containers#8978 -- part II

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/medium Average sized task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runtime: Switch to using the kernel-confidential instead of TEE specific ones for x86_64
6 participants