zfs/module
Andrew eebfd28e9d
Linux optimize access checks when ACL is trivial
Bypass check of ZFS aces if the ACL is trivial. When an ACL is
trivial its permissions are represented by the mode without any
loss of information. In this case, it is safe to convert the
access request into equivalent mode and then pass desired mask
and inode to generic_permission(). This has the added benefit
of also checking whether entries in a POSIX ACL on the file grant
the desired access.

This commit also skips the ACL check on looking up the xattr dir
since such restrictions don't exist in Linux kernel and it makes
xattr lookup behavior inconsistent between SA and file-based
xattrs. We also don't want to perform a POSIX ACL check while
looking up the POSIX ACL if for some reason it is located in
the xattr dir rather than an SA.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Andrew Walker <awalker@ixsystems.com>
Closes #13237
2022-04-01 09:53:54 -07:00
..
avl Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
icp Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h> 2022-03-15 15:13:48 -07:00
lua Switch from _Noreturn to __attribute__((noreturn)) 2022-03-23 08:51:00 -07:00
nvpair Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h> 2022-03-15 15:13:48 -07:00
os Linux optimize access checks when ACL is trivial 2022-04-01 09:53:54 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h> 2022-03-15 15:13:48 -07:00
zcommon Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h> 2022-03-15 15:13:48 -07:00
zfs module: zfs: dsl_bookmark: silence false-positive maybe-uninitialised 2022-03-28 10:03:13 -07:00
zstd module: zstd: check we don't leak symbols; regenerate symbol map 2022-03-15 16:10:10 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
Makefile.in Re-apply 6ba2e72b, silence lint 2022-03-01 13:56:00 -08:00