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

Add initrd feature flag to kernel, and expose stage0 dice data if it's set #4757

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

jul-sh
Copy link
Contributor

@jul-sh jul-sh commented Feb 5, 2024

At this point we imo need conditional compilation, because we want the kernel to behave quite differently based on whether it is loading an applicatino over the channel vs from the initrd.

In the first case we want to create a new dice layer. In the second case we want to just expose the stage0 dice data to the orchestrator

At this point we imo need conditional compilation, because we want the kernel to behave quite differently based on whether it is loading an applicatino over the channel vs from the initrd.

In the first case we want to create a new dice layer. In the second case we want to just expose the stage0 dice data to the orchestrator
@andrisaar
Copy link
Collaborator

I expect we'd get rid of the non-initrd method of loading the app completely at some point in the not too distant future.

@jul-sh
Copy link
Contributor Author

jul-sh commented Feb 5, 2024

I expect we'd get rid of the non-initrd method of loading the app completely at some point in the not too distant future.

hopefully yeah. But I still think we should use compile time flags, especially now that the behavior is so different.

The alternative is blocking deployments of binaries to google3 until we're finished (bad).

Or executing different logic at runtime (no simpler, imo more potential for vulnerabilities).

I think it's the right call for this, and also the dev workflow we should get familiar with for similiar changes in the future.

One thing we could consider is to instead of gating initrd behind a feature, is moving the existing logic behind a default feature (and compiling initrd out if its set).

Copy link
Collaborator

@conradgrobler conradgrobler left a comment

Choose a reason for hiding this comment

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

It is a bit messy, but I think it is fine as a temporary solution.

@jul-sh jul-sh merged commit 25757dc into project-oak:main Feb 5, 2024
17 checks passed
@jul-sh jul-sh deleted the flag-kern branch February 5, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants