/security/integrity/ |
D | iint.c | 33 static struct integrity_iint_cache *__integrity_iint_find(struct inode *inode) in __integrity_iint_find() argument 41 if (inode < iint->inode) in __integrity_iint_find() 43 else if (inode > iint->inode) in __integrity_iint_find() 57 struct integrity_iint_cache *integrity_iint_find(struct inode *inode) in integrity_iint_find() argument 61 if (!IS_IMA(inode)) in integrity_iint_find() 65 iint = __integrity_iint_find(inode); in integrity_iint_find() 95 struct integrity_iint_cache *integrity_inode_get(struct inode *inode) in integrity_inode_get() argument 101 iint = integrity_iint_find(inode); in integrity_inode_get() 116 if (inode < test_iint->inode) in integrity_inode_get() 122 iint->inode = inode; in integrity_inode_get() [all …]
|
D | integrity_audit.c | 28 void integrity_audit_msg(int audit_msgno, struct inode *inode, in integrity_audit_msg() argument 51 if (inode) { in integrity_audit_msg() 53 audit_log_untrustedstring(ab, inode->i_sb->s_id); in integrity_audit_msg() 54 audit_log_format(ab, " ino=%lu", inode->i_ino); in integrity_audit_msg()
|
D | integrity.h | 122 struct inode *inode; /* back pointer to inode in question */ member 139 struct integrity_iint_cache *integrity_iint_find(struct inode *inode); 231 void integrity_audit_msg(int audit_msgno, struct inode *inode, 242 static inline void integrity_audit_msg(int audit_msgno, struct inode *inode, in integrity_audit_msg() argument
|
/security/ |
D | inode.c | 28 static void securityfs_free_inode(struct inode *inode) in securityfs_free_inode() argument 30 if (S_ISLNK(inode->i_mode)) in securityfs_free_inode() 31 kfree(inode->i_link); in securityfs_free_inode() 32 free_inode_nonrcu(inode); in securityfs_free_inode() 113 struct inode *dir, *inode; in securityfs_create_dentry() local 140 inode = new_inode(dir->i_sb); in securityfs_create_dentry() 141 if (!inode) { in securityfs_create_dentry() 146 inode->i_ino = get_next_ino(); in securityfs_create_dentry() 147 inode->i_mode = mode; in securityfs_create_dentry() 148 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); in securityfs_create_dentry() [all …]
|
D | lsm_audit.c | 233 struct inode *inode; in dump_common_audit_data() local 237 inode = d_backing_inode(a->u.path.dentry); in dump_common_audit_data() 238 if (inode) { in dump_common_audit_data() 240 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data() 241 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data() 246 struct inode *inode; in dump_common_audit_data() local 250 inode = file_inode(a->u.file); in dump_common_audit_data() 251 if (inode) { in dump_common_audit_data() 253 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data() 254 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data() [all …]
|
D | security.c | 549 int lsm_inode_alloc(struct inode *inode) in lsm_inode_alloc() argument 552 inode->i_security = NULL; in lsm_inode_alloc() 556 inode->i_security = kmem_cache_zalloc(lsm_inode_cache, GFP_NOFS); in lsm_inode_alloc() 557 if (inode->i_security == NULL) in lsm_inode_alloc() 913 int security_inode_alloc(struct inode *inode) in security_inode_alloc() argument 915 int rc = lsm_inode_alloc(inode); in security_inode_alloc() 919 rc = call_int_hook(inode_alloc_security, 0, inode); in security_inode_alloc() 921 security_inode_free(inode); in security_inode_alloc() 933 void security_inode_free(struct inode *inode) in security_inode_free() argument 935 integrity_inode_free(inode); in security_inode_free() [all …]
|
D | commoncap.c | 297 struct inode *inode = d_backing_inode(dentry); in cap_inode_need_killpriv() local 300 error = __vfs_getxattr(dentry, inode, XATTR_NAME_CAPS, NULL, 0, in cap_inode_need_killpriv() 370 int cap_inode_getsecurity(struct inode *inode, const char *name, void **buffer, in cap_inode_getsecurity() argument 385 dentry = d_find_any_alias(inode); in cap_inode_getsecurity() 397 fs_ns = inode->i_sb->s_user_ns; in cap_inode_getsecurity() 483 struct inode *inode = d_backing_inode(dentry); in cap_convert_nscap() local 485 *fs_ns = inode->i_sb->s_user_ns; in cap_convert_nscap() 493 if (!capable_wrt_inode_uidgid(inode, CAP_SETFCAP)) in cap_convert_nscap() 496 if (ns_capable(inode->i_sb->s_user_ns, CAP_SETFCAP)) in cap_convert_nscap() 574 struct inode *inode = d_backing_inode(dentry); in get_vfs_caps_from_disk() local [all …]
|
/security/integrity/ima/ |
D | ima_main.c | 80 struct inode *inode; in mmap_violation_check() local 85 inode = file_inode(file); in mmap_violation_check() 90 integrity_audit_msg(AUDIT_INTEGRITY_DATA, inode, *pathname, in mmap_violation_check() 113 struct inode *inode = file_inode(file); in ima_rdwr_violation_check() local 118 if (atomic_read(&inode->i_readcount) && IS_IMA(inode)) { in ima_rdwr_violation_check() 120 iint = integrity_iint_find(inode); in ima_rdwr_violation_check() 129 if (inode_is_open_for_write(inode) && must_measure) in ima_rdwr_violation_check() 147 struct inode *inode, struct file *file) in ima_check_last_writer() argument 156 if (atomic_read(&inode->i_writecount) == 1) { in ima_check_last_writer() 159 if (!IS_I_VERSION(inode) || in ima_check_last_writer() [all …]
|
D | ima_api.c | 92 int violation, struct inode *inode, in ima_store_template() argument 113 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, in ima_store_template() 121 result = ima_add_template_entry(entry, violation, op, inode, filename); in ima_store_template() 137 struct inode *inode = file_inode(file); in ima_add_violation() local 153 result = ima_store_template(entry, violation, inode, in ima_add_violation() 158 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, filename, in ima_add_violation() 184 int ima_get_action(struct inode *inode, const struct cred *cred, u32 secid, in ima_get_action() argument 192 return ima_match_policy(inode, cred, secid, func, mask, flags, pcr, in ima_get_action() 211 struct inode *inode = file_inode(file); in ima_collect_measurement() local 238 i_version = inode_query_iversion(inode); in ima_collect_measurement() [all …]
|
D | ima_appraise.c | 48 int ima_must_appraise(struct inode *inode, int mask, enum ima_hooks func) in ima_must_appraise() argument 56 return ima_match_policy(inode, current_cred(), secid, func, mask, in ima_must_appraise() 323 struct inode *inode = d_backing_inode(dentry); in ima_appraise_measurement() local 329 if (!(inode->i_opflags & IOP_XATTR) && !try_modsig) in ima_appraise_measurement() 344 (inode->i_size == 0))) in ima_appraise_measurement() 390 if ((inode->i_sb->s_iflags & SB_I_IMA_UNVERIFIABLE_SIGNATURE) && in ima_appraise_measurement() 391 ((inode->i_sb->s_iflags & SB_I_UNTRUSTED_MOUNTER) || in ima_appraise_measurement() 395 integrity_audit_msg(AUDIT_INTEGRITY_DATA, inode, filename, in ima_appraise_measurement() 407 if (inode->i_size == 0 && iint->flags & IMA_NEW_FILE && in ima_appraise_measurement() 412 integrity_audit_msg(AUDIT_INTEGRITY_DATA, inode, filename, in ima_appraise_measurement() [all …]
|
D | ima.h | 135 const char *op, struct inode *inode, 208 int ima_get_action(struct inode *inode, const struct cred *cred, u32 secid, 211 int ima_must_measure(struct inode *inode, int mask, enum ima_hooks func); 226 struct inode *inode, 232 int ima_match_policy(struct inode *inode, const struct cred *cred, u32 secid, 261 int ima_must_appraise(struct inode *inode, int mask, enum ima_hooks func); 282 static inline int ima_must_appraise(struct inode *inode, int mask, in ima_must_appraise() argument
|
D | ima_fs.c | 197 static int ima_measurements_open(struct inode *inode, struct file *file) in ima_measurements_open() argument 263 static int ima_ascii_measurements_open(struct inode *inode, struct file *file) in ima_ascii_measurements_open() argument 384 static int ima_open_policy(struct inode *inode, struct file *filp) in ima_open_policy() argument 409 static int ima_release_policy(struct inode *inode, struct file *file) in ima_release_policy() argument 414 return seq_release(inode, file); in ima_release_policy() 439 inode->i_mode &= ~S_IWUSR; in ima_release_policy()
|
D | ima_queue.c | 165 const char *op, struct inode *inode, in ima_add_template_entry() argument 203 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, filename, in ima_add_template_entry()
|
/security/integrity/evm/ |
D | evm_crypto.c | 142 static void hmac_add_misc(struct shash_desc *desc, struct inode *inode, in hmac_add_misc() argument 158 hmac_misc.ino = inode->i_ino; in hmac_add_misc() 159 hmac_misc.generation = inode->i_generation; in hmac_add_misc() 169 hmac_misc.uid = from_kuid(&init_user_ns, inode->i_uid); in hmac_add_misc() 170 hmac_misc.gid = from_kgid(&init_user_ns, inode->i_gid); in hmac_add_misc() 171 hmac_misc.mode = inode->i_mode; in hmac_add_misc() 175 crypto_shash_update(desc, (u8 *)&inode->i_sb->s_uuid, UUID_SIZE); in hmac_add_misc() 192 struct inode *inode = d_backing_inode(dentry); in evm_calc_hmac_or_hash() local 201 if (!(inode->i_opflags & IOP_XATTR) || in evm_calc_hmac_or_hash() 202 inode->i_sb->s_user_ns != &init_user_ns) in evm_calc_hmac_or_hash() [all …]
|
D | evm_main.c | 94 struct inode *inode = d_backing_inode(dentry); in evm_find_protected_xattrs() local 99 if (!(inode->i_opflags & IOP_XATTR)) in evm_find_protected_xattrs() 103 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0, in evm_find_protected_xattrs() 139 struct inode *inode; in evm_verify_hmac() local 197 inode = d_backing_inode(dentry); in evm_verify_hmac() 203 } else if (!IS_RDONLY(inode) && in evm_verify_hmac() 204 !(inode->i_sb->s_readonly_remount) && in evm_verify_hmac() 205 !IS_IMMUTABLE(inode)) { in evm_verify_hmac() 294 struct inode *inode = d_backing_inode(dentry); in evm_verify_current_integrity() local 296 if (!evm_key_loaded() || !S_ISREG(inode->i_mode) || evm_fixmode) in evm_verify_current_integrity() [all …]
|
D | evm_secfs.c | 181 struct inode *inode; in evm_write_xattrs() local 222 inode = evm_xattrs->d_inode; in evm_write_xattrs() 223 inode_lock(inode); in evm_write_xattrs() 225 inode_unlock(inode); in evm_write_xattrs()
|
D | evm.h | 63 int evm_init_hmac(struct inode *inode, const struct xattr *xattr,
|
/security/tomoyo/ |
D | realpath.c | 102 struct inode *inode = d_backing_inode(path->dentry); in tomoyo_get_absolute_path() local 104 if (inode && S_ISDIR(inode->i_mode)) { in tomoyo_get_absolute_path() 132 struct inode *inode = d_backing_inode(dentry); in tomoyo_get_dentry_path() local 134 if (inode && S_ISDIR(inode->i_mode)) { in tomoyo_get_dentry_path() 178 struct inode *inode = d_backing_inode(sb->s_root); in tomoyo_get_local_path() local 184 if (!inode->i_op->rename) in tomoyo_get_local_path() 248 struct inode *inode; in tomoyo_realpath_from_path() local 262 inode = d_backing_inode(sb->s_root); in tomoyo_realpath_from_path() 268 (!inode->i_op->rename && in tomoyo_realpath_from_path()
|
D | securityfs_if.c | 132 static int tomoyo_open(struct inode *inode, struct file *file) in tomoyo_open() argument 145 static int tomoyo_release(struct inode *inode, struct file *file) in tomoyo_release() argument
|
/security/apparmor/ |
D | apparmorfs.c | 123 static void aafs_free_inode(struct inode *inode) in aafs_free_inode() argument 125 if (S_ISLNK(inode->i_mode)) in aafs_free_inode() 126 kfree(inode->i_link); in aafs_free_inode() 127 free_inode_nonrcu(inode); in aafs_free_inode() 181 static int __aafs_setup_d_inode(struct inode *dir, struct dentry *dentry, in __aafs_setup_d_inode() 186 struct inode *inode = new_inode(dir->i_sb); in __aafs_setup_d_inode() local 191 if (!inode) in __aafs_setup_d_inode() 194 inode->i_ino = get_next_ino(); in __aafs_setup_d_inode() 195 inode->i_mode = mode; in __aafs_setup_d_inode() 196 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); in __aafs_setup_d_inode() [all …]
|
/security/selinux/ |
D | selinuxfs.c | 220 static int sel_open_handle_status(struct inode *inode, struct file *filp) in sel_open_handle_status() argument 373 static int sel_open_policy(struct inode *inode, struct file *filp) in sel_open_policy() argument 375 struct selinux_fs_info *fsi = inode->i_sb->s_fs_info; in sel_open_policy() 399 if (i_size_read(inode) != security_policydb_len(state)) { in sel_open_policy() 400 inode_lock(inode); in sel_open_policy() 401 i_size_write(inode, security_policydb_len(state)); in sel_open_policy() 402 inode_unlock(inode); in sel_open_policy() 425 static int sel_release_policy(struct inode *inode, struct file *filp) in sel_release_policy() argument 427 struct selinux_fs_info *fsi = inode->i_sb->s_fs_info; in sel_release_policy() 1157 static struct inode *sel_make_inode(struct super_block *sb, int mode) in sel_make_inode() [all …]
|
D | hooks.c | 243 static int inode_alloc_security(struct inode *inode) in inode_alloc_security() argument 245 struct inode_security_struct *isec = selinux_inode(inode); in inode_alloc_security() 250 isec->inode = inode; in inode_alloc_security() 259 static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry); 267 static int __inode_security_revalidate(struct inode *inode, in __inode_security_revalidate() argument 271 struct inode_security_struct *isec = selinux_inode(inode); in __inode_security_revalidate() 285 inode_doinit_with_dentry(inode, dentry); in __inode_security_revalidate() 290 static struct inode_security_struct *inode_security_novalidate(struct inode *inode) in inode_security_novalidate() argument 292 return selinux_inode(inode); in inode_security_novalidate() 295 static struct inode_security_struct *inode_security_rcu(struct inode *inode, bool rcu) in inode_security_rcu() argument [all …]
|
/security/smack/ |
D | smack_lsm.c | 184 static int smk_bu_inode(struct inode *inode, int mode, int rc) in smk_bu_inode() argument 187 struct inode_smack *isp = smack_inode(inode); in smk_bu_inode() 192 inode->i_sb->s_id, inode->i_ino, current->comm); in smk_bu_inode() 206 inode->i_sb->s_id, inode->i_ino, current->comm); in smk_bu_inode() 210 #define smk_bu_inode(inode, mode, RC) (RC) argument 218 struct inode *inode = file_inode(file); in smk_bu_file() local 219 struct inode_smack *isp = smack_inode(inode); in smk_bu_file() 224 inode->i_sb->s_id, inode->i_ino, current->comm); in smk_bu_file() 233 sskp->smk_known, smk_of_inode(inode)->smk_known, acc, in smk_bu_file() 234 inode->i_sb->s_id, inode->i_ino, file, in smk_bu_file() [all …]
|
D | smack.h | 360 static inline struct inode_smack *smack_inode(const struct inode *inode) in smack_inode() argument 362 return inode->i_security + smack_blob_sizes.lbs_inode; in smack_inode() 378 static inline int smk_inode_transmutable(const struct inode *isp) in smk_inode_transmutable() 387 static inline struct smack_known *smk_of_inode(const struct inode *isp) in smk_of_inode() 479 struct inode *i) in smk_ad_setfield_u_fs_inode() 481 a->a.u.inode = i; in smk_ad_setfield_u_fs_inode() 513 struct inode *i) in smk_ad_setfield_u_fs_inode()
|
/security/selinux/include/ |
D | objsec.h | 47 struct inode *inode; /* back pointer to inode object */ member 163 const struct inode *inode) in selinux_inode() argument 165 if (unlikely(!inode->i_security)) in selinux_inode() 167 return inode->i_security + selinux_blob_sizes.lbs_inode; in selinux_inode()
|