Lines Matching refs:size
353 static bool is_v2header(size_t size, const struct vfs_cap_data *cap) in is_v2header() argument
355 if (size != XATTR_CAPS_SZ_2) in is_v2header()
360 static bool is_v3header(size_t size, const struct vfs_cap_data *cap) in is_v3header() argument
362 if (size != XATTR_CAPS_SZ_3) in is_v3header()
382 int size, ret; in cap_inode_getsecurity() local
399 size = sizeof(struct vfs_ns_cap_data); in cap_inode_getsecurity()
401 &tmpbuf, size, GFP_NOFS); in cap_inode_getsecurity()
405 size = ret; in cap_inode_getsecurity()
417 size = -EINVAL; in cap_inode_getsecurity()
430 size = sizeof(struct vfs_ns_cap_data); in cap_inode_getsecurity()
434 nscap = kzalloc(size, GFP_ATOMIC); in cap_inode_getsecurity()
436 size = -ENOMEM; in cap_inode_getsecurity()
456 size = -EOVERFLOW; in cap_inode_getsecurity()
461 size = sizeof(struct vfs_cap_data); in cap_inode_getsecurity()
465 cap = kzalloc(size, GFP_ATOMIC); in cap_inode_getsecurity()
467 size = -ENOMEM; in cap_inode_getsecurity()
484 return size; in cap_inode_getsecurity()
502 static kuid_t rootid_from_xattr(const void *value, size_t size, in rootid_from_xattr() argument
511 if (size == XATTR_CAPS_SZ_3) in rootid_from_xattr()
518 static bool validheader(size_t size, const struct vfs_cap_data *cap) in validheader() argument
520 return is_v2header(size, cap) || is_v3header(size, cap); in validheader()
543 const void **ivalue, size_t size) in cap_convert_nscap() argument
557 if (!validheader(size, cap)) in cap_convert_nscap()
561 if (size == XATTR_CAPS_SZ_2 && (mnt_userns == fs_ns)) in cap_convert_nscap()
564 return size; in cap_convert_nscap()
566 rootid = rootid_from_xattr(*ivalue, size, task_ns, mnt_userns, fs_ns); in cap_convert_nscap()
656 int size; in get_vfs_caps_from_disk() local
668 size = __vfs_getxattr((struct dentry *)dentry, inode, in get_vfs_caps_from_disk()
670 if (size == -ENODATA || size == -EOPNOTSUPP) in get_vfs_caps_from_disk()
674 if (size < 0) in get_vfs_caps_from_disk()
675 return size; in get_vfs_caps_from_disk()
677 if (size < sizeof(magic_etc)) in get_vfs_caps_from_disk()
685 if (size != XATTR_CAPS_SZ_1) in get_vfs_caps_from_disk()
690 if (size != XATTR_CAPS_SZ_2) in get_vfs_caps_from_disk()
695 if (size != XATTR_CAPS_SZ_3) in get_vfs_caps_from_disk()
998 const void *value, size_t size, int flags) in cap_inode_setxattr() argument