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

kexec_file_load support for device-tree blobs #84

Open
klauskiwi opened this issue Apr 23, 2021 · 1 comment
Open

kexec_file_load support for device-tree blobs #84

klauskiwi opened this issue Apr 23, 2021 · 1 comment

Comments

@klauskiwi
Copy link

(This issue has been originally submitted as a kexec-lite issue here: antonblanchard/kexec-lite#15)

In Petitboot, we use the --dtb argument to pass a patched devicetree blob that may contain modifications caused by the boot hooks (https://github.com/open-power/petitboot/tree/master/utils/hooks). Some of those modifications may contain an adjustment of what the console device ([linux,]stdout property of the chosen/ node) should be.

The problem is that the new kexec_file_load() method apparently doesn't support this, and from a bit of research that I did (on the ARM64 implementation that I believe we share some commonalities with), it's not completely trivial to do so, because in a secure boot environment, giving complete control over the devicetree blob can be seen as a security opening (even if cmdline is as well and nobody cares about it so far).

Looks like ARM64 opted to allow the next kernel to inherit the devicetree blob from the current kernel (I think in ppc64 they all share the same memory region so that would work for us as well I guess) but before trying to change the entire architecture of how Petitboot implements dtb hooks, I was wanting to double-check that this is everyone's understanding of it as well, and what if any alternatives could be implemented.

tl;dr: kernel lockdown + kexec_file_load() broke Petitboot's ability to pass an alternative console to the next kernel, among other things.

Thanks,

-Klaus

@klauskiwi
Copy link
Author

I decided to open this issue here as well, because I believe that a Petitboot workaround could be worked in parallel with the kexec() route (which could take some time since there's apparently a lack of interest in improving that).

In other words, for the console issue (or any other setting that are both in the DTB as well as in the kernel command-line), maybe there's a way we can have Petitboot append those instructions to the kernel command line, instead of trying to pass them through a DTB?

Other suggestions and thoughts are welcome.

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

No branches or pull requests

1 participant