-
Notifications
You must be signed in to change notification settings - Fork 35
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
erofs: Escape overlayfs features #175
Conversation
We should probably also add an escaped xattr to one of the test images. |
Yeah makes sense; moved to draft for that reason |
This escapes overlayfs xattrs and whiteouts according to the support in this patch series: https://lore.kernel.org/linux-unionfs/[email protected]/ Signed-off-by: Alexander Larsson <[email protected]>
13b27b6
to
83123d6
Compare
Patch series 4 is more or less acked, so lets get this in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane, but I didn't sanity check this versus the kernel APIs.
Also, we will clearly want some integration tests for this in the future.
|
||
if (str_has_prefix(name, "trusted.overlay.")) { | ||
cleanup_free char *renamed = | ||
str_join("trusted.overlay.overlay.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really worth carrying str_join
over just asprintf ("trusted.overlay.overlay.%s", name + strlen("trusted.overlay."))
?
|
||
lcfs_node_set_mode(node, | ||
S_IFREG | (lcfs_node_get_mode(node) & ~S_IFMT)); | ||
ret = lcfs_node_set_xattr(node, "trusted.overlay.overlay.whiteout", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional future cleanup: we could have a linux-overlayfs-internals.h
header that includes #define
s that link to the upstream source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might look at extracting this. Although we can't use the kernel headers here, the way the xattr defines are structured in the kernel is a bit weird.
Yeah, I plan to land all the outstanding stuff, and then do work on adding more tests in general. |
This escapes overlayfs xattrs and whiteouts according to the support in this patch series:
https://lore.kernel.org/linux-unionfs/[email protected]/
Note: We should probably wait with merging this until we have more feedback on the kernel list about it.
Fixes #172