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

Best way to demand mount efivarfs and link libefivar #266

Open
schallee opened this issue May 29, 2024 · 0 comments
Open

Best way to demand mount efivarfs and link libefivar #266

schallee opened this issue May 29, 2024 · 0 comments

Comments

@schallee
Copy link
Contributor

Greetings,

I'm working on a project that references EFI variables through efivarfs. It can run in a early user space environment where efivarfs is not mounted. My current code checks for efivarfs being mounted and if it isn't mounted, it mounts it before utilizing efivar.

Unfortunately, this doesn't work as libefivar actually probes for efivarfs when the library is loaded and not after my code mounts efivarfs if needed.

I can think of two methods to get around this:

  1. dlopen libefivar instead of linking against it after efivarfs is mounted
  2. If efivarfs isn't mounted, mount it and rexec myself

Neither of these is particularly attractive. Are there other methods I'm not aware of? If not would it be worth my implementing such?

Thanks in advance!

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