Lines Matching refs:name__str
99 static bool match_security_bpf_prefix(const char *name__str)
101 return !strncmp(name__str, XATTR_NAME_BPF_LSM, XATTR_NAME_BPF_LSM_LEN);
120 * @name__str: name of the xattr
123 * Get xattr *name__str* of *dentry* and store the output in *value_ptr*.
125 * For security reasons, only *name__str* with prefixes "user." or
130 __bpf_kfunc int bpf_get_dentry_xattr(struct dentry *dentry, const char *name__str,
144 ret = bpf_xattr_read_permission(name__str, inode);
147 return __vfs_getxattr(dentry, inode, name__str, value, value_len);
153 * @name__str: name of the xattr
156 * Get xattr *name__str* of *file* and store the output in *value_ptr*.
158 * For security reasons, only *name__str* with prefixes "user." or
163 __bpf_kfunc int bpf_get_file_xattr(struct file *file, const char *name__str,
169 return bpf_get_dentry_xattr(dentry, name__str, value_p);
189 * @name__str: name of the xattr
193 * Set xattr *name__str* of *dentry* to the value in *value_ptr*.
195 * For security reasons, only *name__str* with prefix "security.bpf."
202 int bpf_set_dentry_xattr_locked(struct dentry *dentry, const char *name__str,
217 ret = bpf_xattr_write_permission(name__str, inode);
221 ret = __vfs_setxattr(&nop_mnt_idmap, dentry, inode, name__str,
239 * @name__str: name of the xattr
241 * Rmove xattr *name__str* of *dentry*.
243 * For security reasons, only *name__str* with prefix "security.bpf."
250 int bpf_remove_dentry_xattr_locked(struct dentry *dentry, const char *name__str)
255 ret = bpf_xattr_write_permission(name__str, inode);
259 ret = __vfs_removexattr(&nop_mnt_idmap, dentry, name__str);
276 * @name__str: name of the xattr
280 * Set xattr *name__str* of *dentry* to the value in *value_ptr*.
282 * For security reasons, only *name__str* with prefix "security.bpf."
289 __bpf_kfunc int bpf_set_dentry_xattr(struct dentry *dentry, const char *name__str,
296 ret = bpf_set_dentry_xattr_locked(dentry, name__str, value_p, flags);
304 * @name__str: name of the xattr
306 * Rmove xattr *name__str* of *dentry*.
308 * For security reasons, only *name__str* with prefix "security.bpf."
315 __bpf_kfunc int bpf_remove_dentry_xattr(struct dentry *dentry, const char *name__str)
321 ret = bpf_remove_dentry_xattr_locked(dentry, name__str);
330 * @name__str: name of the xattr
333 * Get xattr *name__str* of *cgroup* and store the output in *value_ptr*.
335 * For security reasons, only *name__str* with prefix "user." is allowed.
339 __bpf_kfunc int bpf_cgroup_read_xattr(struct cgroup *cgroup, const char *name__str,
347 if (strncmp(name__str, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN))
355 return kernfs_xattr_get(cgroup->kn, name__str, value, value_len);