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

the system calls getxattr("security.capability") on every FUSE write()! #205

Open
jti-lanl opened this issue Jul 25, 2018 · 1 comment
Open

Comments

@jti-lanl
Copy link
Contributor

We could probably gain some FUSE write performance by short-circuiting this behavior.

See this discussion:
https://sourceforge.net/p/fuse/mailman/fuse-devel/thread/[email protected]/

Assuming we don't want (a) to prevent users from using xattrs, or (b) to do this:

In other words, another option is to disable "File POSIX
Capabilities" (under Security options in menuconfig) or
CONFIG_SECURITY_FILE_CAPABILITIES in your kernel configuration.

... then the next-best option (assuming this xattr might be set on any file we manage) is to go ahead and let the query run, the first time it happens on a given filehandle, and cache the result/errno (per filehandle). All subsequent queries can just return the cached result/errno. [Don't forget to clear the cache in setxattr()]

Or (if we are willing to say we'll never have a file with this xattr) we could at least have getxattr test the key, and always return ENODATA for this case. [Don't forget to have setxattr() refuse to set this key.] Or we could provide a build-option to enable this behavior.

@shanegoff
Copy link
Contributor

We should reinvestigate these solutions for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants