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

Check for overlay kernel module #62

Merged
merged 4 commits into from
Oct 15, 2021
Merged

Check for overlay kernel module #62

merged 4 commits into from
Oct 15, 2021

Conversation

staticfloat
Copy link
Collaborator

If a user has a kernel with CONFIG_OVERLAY_FS=m set, we need to ensure
that the overlay module is actually loaded.

Closes #61

If a user has a kernel with `CONFIG_OVERLAY_FS=m` set, we need to ensure
that the `overlay` module is actually loaded.
@staticfloat
Copy link
Collaborator Author

@vchuravy can you check to ensure that this actually works on your system? It should give you a warning if your module is not loaded.

@vchuravy
Copy link

Thanks! After sudo rmmod overlay

┌ Warning: Could not find loaded `overlay` module, try `sudo modprobe overlay`?
└ @ Sandbox ~/.julia/packages/Sandbox/k7x0e/src/UserNamespaces.jl:114

What if the kernel was built with CONFIG_OVERLAY_FS=Y I don't think it will be listed in the modules, right?

@staticfloat
Copy link
Collaborator Author

I haven't been able to find a machine with that set to try it out with. :P

@staticfloat
Copy link
Collaborator Author

Okay, I checked by building myself a new kernel, and using the VERY COOL virtme project to quickly boot up a shell and see what /proc/modules shows on such a system, which is, as Valentin predicted, exactly nothing. I have therefore built an escape hatch for this (apparently quite unusual) situation, so users who know they can mount overlayfs filesystems can bypass the check.

@staticfloat staticfloat merged commit 44ca510 into main Oct 15, 2021
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.

Provide better error if overlayfs module is not loaded
2 participants