Lines Matching defs:inode
201 * The inode blob gets an rcu_head in addition to
342 init_debug("inode blob size = %d\n", blob_sizes.lbs_inode);
581 * lsm_inode_alloc - allocate a composite inode blob
582 * @inode: the inode that needs a blob
584 * Allocate the inode blob for all the modules
588 int lsm_inode_alloc(struct inode *inode)
591 inode->i_security = NULL;
595 inode->i_security = kmem_cache_zalloc(lsm_inode_cache, GFP_NOFS);
596 if (inode->i_security == NULL)
1031 int security_inode_alloc(struct inode *inode)
1033 int rc = lsm_inode_alloc(inode);
1037 rc = call_int_hook(inode_alloc_security, 0, inode);
1039 security_inode_free(inode);
1046 * The rcu head is at the start of the inode blob
1051 void security_inode_free(struct inode *inode)
1053 integrity_inode_free(inode);
1054 call_void_hook(inode_free_security, inode);
1056 * The inode may still be referenced in a path walk and
1061 * leave the current inode->i_security pointer intact.
1062 * The inode will be freed after the RCU grace period too.
1064 if (inode->i_security)
1065 call_rcu((struct rcu_head *)inode->i_security,
1087 int security_inode_init_security(struct inode *inode, struct inode *dir,
1095 if (unlikely(IS_PRIVATE(inode)))
1099 return call_int_hook(inode_init_security, -EOPNOTSUPP, inode,
1103 ret = call_int_hook(inode_init_security, -EOPNOTSUPP, inode, dir, qstr,
1111 ret = evm_inode_init_security(inode, lsm_xattr, evm_xattr);
1114 ret = initxattrs(inode, new_xattrs, fs_data);
1122 int security_inode_init_security_anon(struct inode *inode,
1124 const struct inode *context_inode)
1126 return call_int_hook(inode_init_security_anon, 0, inode, name,
1130 int security_old_inode_init_security(struct inode *inode, struct inode *dir,
1134 if (unlikely(IS_PRIVATE(inode)))
1136 return call_int_hook(inode_init_security, -EOPNOTSUPP, inode, dir,
1237 int security_inode_create(struct inode *dir, struct dentry *dentry, umode_t mode)
1245 int security_inode_link(struct dentry *old_dentry, struct inode *dir,
1253 int security_inode_unlink(struct inode *dir, struct dentry *dentry)
1260 int security_inode_symlink(struct inode *dir, struct dentry *dentry,
1268 int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
1276 int security_inode_rmdir(struct inode *dir, struct dentry *dentry)
1283 int security_inode_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
1290 int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry,
1291 struct inode *new_dir, struct dentry *new_dentry,
1316 int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
1319 if (unlikely(IS_PRIVATE(inode)))
1321 return call_int_hook(inode_follow_link, 0, dentry, inode, rcu);
1324 int security_inode_permission(struct inode *inode, int mask)
1326 if (unlikely(IS_PRIVATE(inode)))
1328 return call_int_hook(inode_permission, 0, inode, mask);
1433 struct inode *inode, const char *name,
1439 if (unlikely(IS_PRIVATE(inode)))
1445 rc = hp->hook.inode_getsecurity(mnt_userns, inode, name, buffer, alloc);
1452 int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags)
1457 if (unlikely(IS_PRIVATE(inode)))
1463 rc = hp->hook.inode_setsecurity(inode, name, value, size,
1471 int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size)
1473 if (unlikely(IS_PRIVATE(inode)))
1475 return call_int_hook(inode_listsecurity, 0, inode, buffer, buffer_size);
1479 void security_inode_getsecid(struct inode *inode, u32 *secid)
1481 call_void_hook(inode_getsecid, inode, secid);
1753 int security_kernel_create_files_as(struct cred *new, struct inode *inode)
1755 return call_int_hook(kernel_create_files_as, 0, new, inode);
1924 void security_task_to_inode(struct task_struct *p, struct inode *inode)
1926 call_void_hook(task_to_inode, p, inode);
2069 void security_d_instantiate(struct dentry *dentry, struct inode *inode)
2071 if (unlikely(inode && IS_PRIVATE(inode)))
2073 call_void_hook(d_instantiate, dentry, inode);
2146 void security_inode_invalidate_secctx(struct inode *inode)
2148 call_void_hook(inode_invalidate_secctx, inode);
2152 int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen)
2154 return call_int_hook(inode_notifysecctx, 0, inode, ctx, ctxlen);
2164 int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen)
2173 rc = hp->hook.inode_getsecctx(inode, ctx, ctxlen);