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

Switch to new mount api for ovl on kernel 6.5 to fix escaping #218

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

alexlarsson
Copy link
Collaborator

This is required on kernel >= 6.5 to handle escaped commas in upper or lowerdirs due to an overlayfs change in escape handling behaviour caused by the switch to the new mount api internally.

For anything post 6.5 we fallback to the old legacy implementation which supports escaping.

This fixes #213

This is the legacy implementation, we want to also add one
based on the new mount api.

Signed-off-by: Alexander Larsson <[email protected]>
@alexlarsson alexlarsson force-pushed the overlayfs-argument-escaping branch from 21f637c to 7eb4e34 Compare October 11, 2023 14:24
@alexlarsson
Copy link
Collaborator Author

I tested this under strace with 6.5.6-200.fc38.x86_64 (successfully used new api, worked with comma in upperdir), and 6.4.15-200.fc38.x86_64 (falls back to new api both when comma in upperdir and without, both succeeding).

This is required on kernel >= 6.5 to handle escaped commas in upper or
lowerdirs due to an overlayfs change in escape handling behaviour
caused by the switch to the new mount api internally.

For anything post 6.5 we fallback to the old legacy implementation
which supports escaping.

See containers#213 for details.

Signed-off-by: Alexander Larsson <[email protected]>
@alexlarsson alexlarsson force-pushed the overlayfs-argument-escaping branch from 7eb4e34 to 2995932 Compare October 11, 2023 14:28
Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@alexlarsson alexlarsson merged commit a101a22 into containers:main Oct 12, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants