mirror_zfs/module/os/linux/zfs
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
..
abd_os.c Adding ZERO_PAGE detection 2022-03-14 12:37:39 -07:00
arc_os.c Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
Makefile.in Restore FreeBSD resource usage accounting 2021-02-19 22:34:33 -08:00
mmp_os.c Add zfs_multihost_interval tunable handler for FreeBSD 2020-06-23 13:32:42 -07:00
policy.c Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
qat_compress.c Modify checksum obtain method of QAT 2021-08-03 11:46:33 -06:00
qat_crypt.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
qat.c QAT related bug fixes 2019-09-12 13:33:44 -07:00
spa_misc_os.c Add spa _os() hooks 2022-02-15 15:54:25 -08:00
trace.c Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
vdev_disk.c Linux 5.18 compat: 4-argument bio_alloc() 2022-03-28 09:51:59 -07:00
vdev_file.c module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_acl.c Linux optimize access checks when ACL is trivial 2022-04-01 09:53:54 -07:00
zfs_ctldir.c zfs_ctldir: fix incorrect argument type of rw_destroy 2022-03-30 15:40:31 -07:00
zfs_debug.c module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zfs_dir.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zfs_file_os.c file reference counts can get corrupted 2021-07-10 19:00:37 -06:00
zfs_ioctl_os.c libzfs: On FreeBSD, use MNT_NOWAIT with getfsstat 2021-06-08 07:36:43 -06:00
zfs_racct.c module: zfs: fix unused, remove argsused 2021-12-23 09:42:47 -08:00
zfs_sysfs.c Vdev Properties Feature 2021-11-30 07:46:25 -07:00
zfs_uio.c Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h> 2022-03-15 15:13:48 -07:00
zfs_vfsops.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zfs_vnops_os.c Linux optimize access checks when ACL is trivial 2022-04-01 09:53:54 -07:00
zfs_znode.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zio_crypt.c Remove bcopy(), bzero(), bcmp() 2022-03-15 15:13:42 -07:00
zpl_ctldir.c module: mark arguments used 2022-02-18 09:34:03 -08:00
zpl_export.c Return required size when encode_fh size too small 2021-05-07 15:08:16 -07:00
zpl_file.c Expose additional file level attributes 2022-03-07 17:52:03 -08:00
zpl_inode.c Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
zpl_super.c Linux: Fix ZFS_ENTER/ZFS_EXIT/ZFS_VERFY_ZP usage 2020-11-14 10:19:00 -08:00
zpl_xattr.c Fix ACL checks for NFS kernel server 2022-03-18 06:47:57 -06:00
zvol_os.c zvol_os: suppress compiler warning for zvol_open_timeout_ms 2022-03-30 15:39:55 -07:00