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

main: ignore EOVERFLOW when copying xattrs #352

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Jun 1, 2022

the kernel returns EOVERFLOW if the rootid cannot be mapped in the
current user namespace when reading the file capabilities
(security.capabilities xattr).

Signed-off-by: Giuseppe Scrivano [email protected]

the kernel returns EOVERFLOW if the rootid cannot be mapped in the
current user namespace when reading the file capabilities
(security.capabilities xattr).

Signed-off-by: Giuseppe Scrivano <[email protected]>
@@ -2699,7 +2699,11 @@ copy_xattr (int sfd, int dfd, char *buf, size_t buf_size)

s = safe_read_xattr (&v, sfd, it, 256);
if (s < 0)
return -1;
{
if (errno == EOVERFLOW)
Copy link
Contributor

@flouthoc flouthoc Jun 1, 2022

Choose a reason for hiding this comment

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

Just a small doubt/question: should this only ignore when buf contains security.capabilities and not for all the attributes since EOVERFLOW could also mean subsystem incompatibility for other xattrs.

Copy link
Member

Choose a reason for hiding this comment

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

Shoud we at least write a debug log on this situation.

Copy link
Member Author

Choose a reason for hiding this comment

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

this code is used only when we copyup a file. If a xattr cannot be accessed because of EOVERFLOW, I think we should not error out in any case.

We could add a debug message, but I don't think it is going to be very helpful. Log messages from fuse-overlayfs are lost unless it is started manually with --debug.

@rhatdan
Copy link
Member

rhatdan commented Jun 1, 2022

LGTM

@rhatdan rhatdan merged commit 878cb0c into containers:main Jun 1, 2022
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.

3 participants