/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() 55 struct integrity_iint_cache *integrity_iint_find(struct inode *inode) in integrity_iint_find() argument 59 if (!IS_IMA(inode)) in integrity_iint_find() 63 iint = __integrity_iint_find(inode); in integrity_iint_find() 78 struct inode *inode) in iint_lockdep_annotate() argument 83 int depth = inode->i_sb->s_stack_depth; in iint_lockdep_annotate() 93 struct inode *inode) in iint_init_always() argument 107 iint_lockdep_annotate(iint, inode); in iint_init_always() [all …]
|
D | integrity_audit.c | 28 void integrity_audit_msg(int audit_msgno, struct inode *inode, in integrity_audit_msg() argument 32 integrity_audit_message(audit_msgno, inode, fname, op, cause, in integrity_audit_msg() 36 void integrity_audit_message(int audit_msgno, struct inode *inode, in integrity_audit_message() argument 62 if (inode) { in integrity_audit_message() 64 audit_log_untrustedstring(ab, inode->i_sb->s_id); in integrity_audit_message() 65 audit_log_format(ab, " ino=%lu", inode->i_ino); in integrity_audit_message()
|
D | integrity.h | 129 struct inode *inode; /* back pointer to inode in question */ member 148 struct integrity_iint_cache *integrity_iint_find(struct inode *inode); 240 void integrity_audit_msg(int audit_msgno, struct inode *inode, 244 void integrity_audit_message(int audit_msgno, struct inode *inode, 256 static inline void integrity_audit_msg(int audit_msgno, struct inode *inode, in integrity_audit_msg() argument 264 struct inode *inode, in integrity_audit_message() 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 | 588 int lsm_inode_alloc(struct inode *inode) in lsm_inode_alloc() argument 591 inode->i_security = NULL; in lsm_inode_alloc() 595 inode->i_security = kmem_cache_zalloc(lsm_inode_cache, GFP_NOFS); in lsm_inode_alloc() 596 if (inode->i_security == NULL) in lsm_inode_alloc() 1031 int security_inode_alloc(struct inode *inode) in security_inode_alloc() argument 1033 int rc = lsm_inode_alloc(inode); in security_inode_alloc() 1037 rc = call_int_hook(inode_alloc_security, 0, inode); in security_inode_alloc() 1039 security_inode_free(inode); in security_inode_alloc() 1051 void security_inode_free(struct inode *inode) in security_inode_free() argument 1053 integrity_inode_free(inode); in security_inode_free() [all …]
|
D | commoncap.c | 298 struct inode *inode = d_backing_inode(dentry); in cap_inode_need_killpriv() local 301 error = __vfs_getxattr(dentry, inode, XATTR_NAME_CAPS, NULL, 0); in cap_inode_need_killpriv() 379 struct inode *inode, const char *name, void **buffer, in cap_inode_getsecurity() argument 395 dentry = d_find_any_alias(inode); in cap_inode_getsecurity() 409 fs_ns = inode->i_sb->s_user_ns; in cap_inode_getsecurity() 549 struct inode *inode = d_backing_inode(dentry); in cap_convert_nscap() local 551 *fs_ns = inode->i_sb->s_user_ns; in cap_convert_nscap() 559 if (!capable_wrt_inode_uidgid(mnt_userns, inode, CAP_SETFCAP)) in cap_convert_nscap() 562 if (ns_capable(inode->i_sb->s_user_ns, CAP_SETFCAP)) in cap_convert_nscap() 653 struct inode *inode = d_backing_inode(dentry); in get_vfs_caps_from_disk() local [all …]
|
/security/integrity/ima/ |
D | ima_main.c | 90 struct inode *inode; in mmap_violation_check() local 95 inode = file_inode(file); in mmap_violation_check() 100 integrity_audit_msg(AUDIT_INTEGRITY_DATA, inode, *pathname, in mmap_violation_check() 123 struct inode *inode = file_inode(file); in ima_rdwr_violation_check() local 128 if (atomic_read(&inode->i_readcount) && IS_IMA(inode)) { in ima_rdwr_violation_check() 130 iint = integrity_iint_find(inode); in ima_rdwr_violation_check() 139 if (inode_is_open_for_write(inode) && must_measure) in ima_rdwr_violation_check() 157 struct inode *inode, struct file *file) in ima_check_last_writer() argument 166 if (atomic_read(&inode->i_writecount) == 1) { in ima_check_last_writer() 169 if (!IS_I_VERSION(inode) || in ima_check_last_writer() [all …]
|
D | ima_api.c | 103 int violation, struct inode *inode, in ima_store_template() argument 115 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, in ima_store_template() 122 result = ima_add_template_entry(entry, violation, op, inode, filename); in ima_store_template() 138 struct inode *inode = file_inode(file); in ima_add_violation() local 154 result = ima_store_template(entry, violation, inode, in ima_add_violation() 159 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, filename, in ima_add_violation() 188 int ima_get_action(struct user_namespace *mnt_userns, struct inode *inode, in ima_get_action() argument 198 return ima_match_policy(mnt_userns, inode, cred, secid, func, mask, in ima_get_action() 218 struct inode *inode = file_inode(file); in ima_collect_measurement() local 219 struct inode *real_inode = d_real_inode(file_dentry(file)); in ima_collect_measurement() [all …]
|
D | ima_appraise.c | 71 int ima_must_appraise(struct user_namespace *mnt_userns, struct inode *inode, in ima_must_appraise() argument 80 return ima_match_policy(mnt_userns, inode, current_cred(), secid, in ima_must_appraise() 385 struct inode *inode = d_backing_inode(dentry); in ima_appraise_measurement() local 391 if (!(inode->i_opflags & IOP_XATTR) && !try_modsig) in ima_appraise_measurement() 406 (inode->i_size == 0))) in ima_appraise_measurement() 457 if ((inode->i_sb->s_iflags & SB_I_IMA_UNVERIFIABLE_SIGNATURE) && in ima_appraise_measurement() 458 ((inode->i_sb->s_iflags & SB_I_UNTRUSTED_MOUNTER) || in ima_appraise_measurement() 462 integrity_audit_msg(AUDIT_INTEGRITY_DATA, inode, filename, in ima_appraise_measurement() 477 if (inode->i_size == 0 && iint->flags & IMA_NEW_FILE && in ima_appraise_measurement() 482 integrity_audit_msg(AUDIT_INTEGRITY_DATA, inode, filename, in ima_appraise_measurement() [all …]
|
D | ima.h | 140 const char *op, struct inode *inode, 257 int ima_get_action(struct user_namespace *mnt_userns, struct inode *inode, 262 int ima_must_measure(struct inode *inode, int mask, enum ima_hooks func); 272 struct inode *inode, const void *buf, int size, 282 struct inode *inode, 288 int ima_match_policy(struct user_namespace *mnt_userns, struct inode *inode, 321 int ima_must_appraise(struct user_namespace *mnt_userns, struct inode *inode, 350 struct inode *inode, int mask, in ima_must_appraise() argument
|
D | ima_fs.c | 196 static int ima_measurements_open(struct inode *inode, struct file *file) in ima_measurements_open() argument 262 static int ima_ascii_measurements_open(struct inode *inode, struct file *file) in ima_ascii_measurements_open() argument 385 static int ima_open_policy(struct inode *inode, struct file *filp) in ima_open_policy() argument 410 static int ima_release_policy(struct inode *inode, struct file *file) in ima_release_policy() argument 415 return seq_release(inode, file); in ima_release_policy() 440 inode->i_mode &= ~S_IWUSR; in ima_release_policy()
|
/security/landlock/ |
D | fs.c | 45 struct inode *const inode = object->underobj; in release_inode() local 48 if (!inode) { in release_inode() 62 sb = inode->i_sb; in release_inode() 71 rcu_assign_pointer(landlock_inode(inode)->object, NULL); in release_inode() 76 iput(inode); in release_inode() 87 static struct landlock_object *get_inode_object(struct inode *const inode) in get_inode_object() argument 90 struct landlock_inode_security *inode_sec = landlock_inode(inode); in get_inode_object() 114 new_object = landlock_create_object(&landlock_fs_underops, inode); in get_inode_object() 122 spin_lock(&inode->i_lock); in get_inode_object() 125 spin_unlock(&inode->i_lock); in get_inode_object() [all …]
|
D | fs.h | 54 landlock_inode(const struct inode *const inode) in landlock_inode() argument 56 return inode->i_security + landlock_blob_sizes.lbs_inode; in landlock_inode()
|
/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() 216 struct inode *inode = d_backing_inode(dentry); in evm_calc_hmac_or_hash() local 225 if (!(inode->i_opflags & IOP_XATTR) || in evm_calc_hmac_or_hash() 226 inode->i_sb->s_user_ns != &init_user_ns) in evm_calc_hmac_or_hash() [all …]
|
D | evm_main.c | 139 struct inode *inode = d_backing_inode(dentry); in evm_find_protected_xattrs() local 144 if (!(inode->i_opflags & IOP_XATTR)) in evm_find_protected_xattrs() 148 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0); in evm_find_protected_xattrs() 183 struct inode *inode; in evm_verify_hmac() local 249 inode = d_backing_inode(dentry); in evm_verify_hmac() 255 } else if (!IS_RDONLY(inode) && in evm_verify_hmac() 256 !(inode->i_sb->s_readonly_remount) && in evm_verify_hmac() 257 !IS_IMMUTABLE(inode)) { in evm_verify_hmac() 436 struct inode *inode = d_backing_inode(dentry); in evm_verify_current_integrity() local 438 if (!evm_key_loaded() || !S_ISREG(inode->i_mode) || evm_fixmode) in evm_verify_current_integrity() [all …]
|
D | evm_secfs.c | 187 struct inode *inode; in evm_write_xattrs() local 229 inode = evm_xattrs->d_inode; in evm_write_xattrs() 230 inode_lock(inode); in evm_write_xattrs() 232 inode_unlock(inode); in evm_write_xattrs()
|
/security/tomoyo/ |
D | realpath.c | 103 struct inode *inode = d_backing_inode(path->dentry); in tomoyo_get_absolute_path() local 105 if (inode && S_ISDIR(inode->i_mode)) { in tomoyo_get_absolute_path() 133 struct inode *inode = d_backing_inode(dentry); in tomoyo_get_dentry_path() local 135 if (inode && S_ISDIR(inode->i_mode)) { in tomoyo_get_dentry_path() 180 struct inode *inode = d_backing_inode(sb->s_root); in tomoyo_get_local_path() local 186 if (!inode->i_op->rename) in tomoyo_get_local_path() 250 struct inode *inode; in tomoyo_realpath_from_path() local 264 inode = d_backing_inode(sb->s_root); in tomoyo_realpath_from_path() 270 (!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 146 static int tomoyo_release(struct inode *inode, struct file *file) in tomoyo_release() argument
|
/security/apparmor/ |
D | apparmorfs.c | 153 static void aafs_free_inode(struct inode *inode) in aafs_free_inode() argument 155 if (S_ISLNK(inode->i_mode)) in aafs_free_inode() 156 kfree(inode->i_link); in aafs_free_inode() 157 free_inode_nonrcu(inode); in aafs_free_inode() 211 static int __aafs_setup_d_inode(struct inode *dir, struct dentry *dentry, in __aafs_setup_d_inode() 216 struct inode *inode = new_inode(dir->i_sb); in __aafs_setup_d_inode() local 221 if (!inode) in __aafs_setup_d_inode() 224 inode->i_ino = get_next_ino(); in __aafs_setup_d_inode() 225 inode->i_mode = mode; in __aafs_setup_d_inode() 226 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); in __aafs_setup_d_inode() [all …]
|
/security/selinux/ |
D | selinuxfs.c | 225 static int sel_open_handle_status(struct inode *inode, struct file *filp) in sel_open_handle_status() argument 395 static int sel_open_policy(struct inode *inode, struct file *filp) in sel_open_policy() argument 397 struct selinux_fs_info *fsi = inode->i_sb->s_fs_info; in sel_open_policy() 425 if ((size_t)i_size_read(inode) != plm->len) { in sel_open_policy() 426 inode_lock(inode); in sel_open_policy() 427 i_size_write(inode, plm->len); in sel_open_policy() 428 inode_unlock(inode); in sel_open_policy() 447 static int sel_release_policy(struct inode *inode, struct file *filp) in sel_release_policy() argument 449 struct selinux_fs_info *fsi = inode->i_sb->s_fs_info; in sel_release_policy() 1253 static struct inode *sel_make_inode(struct super_block *sb, int mode) in sel_make_inode() [all …]
|
D | hooks.c | 258 static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry); 266 static int __inode_security_revalidate(struct inode *inode, in __inode_security_revalidate() argument 270 struct inode_security_struct *isec = selinux_inode(inode); in __inode_security_revalidate() 284 inode_doinit_with_dentry(inode, dentry); in __inode_security_revalidate() 289 static struct inode_security_struct *inode_security_novalidate(struct inode *inode) in inode_security_novalidate() argument 291 return selinux_inode(inode); in inode_security_novalidate() 294 static struct inode_security_struct *inode_security_rcu(struct inode *inode, bool rcu) in inode_security_rcu() argument 298 error = __inode_security_revalidate(inode, NULL, !rcu); in inode_security_rcu() 301 return selinux_inode(inode); in inode_security_rcu() 307 static struct inode_security_struct *inode_security(struct inode *inode) in inode_security() argument [all …]
|
/security/smack/ |
D | smack_lsm.c | 181 static int smk_bu_inode(struct inode *inode, int mode, int rc) in smk_bu_inode() argument 184 struct inode_smack *isp = smack_inode(inode); in smk_bu_inode() 189 inode->i_sb->s_id, inode->i_ino, current->comm); in smk_bu_inode() 203 inode->i_sb->s_id, inode->i_ino, current->comm); in smk_bu_inode() 207 #define smk_bu_inode(inode, mode, RC) (RC) argument 215 struct inode *inode = file_inode(file); in smk_bu_file() local 216 struct inode_smack *isp = smack_inode(inode); in smk_bu_file() 221 inode->i_sb->s_id, inode->i_ino, current->comm); in smk_bu_file() 230 sskp->smk_known, smk_of_inode(inode)->smk_known, acc, in smk_bu_file() 231 inode->i_sb->s_id, inode->i_ino, file, in smk_bu_file() [all …]
|
D | smack.h | 346 static inline struct inode_smack *smack_inode(const struct inode *inode) in smack_inode() argument 348 return inode->i_security + smack_blob_sizes.lbs_inode; in smack_inode() 370 static inline int smk_inode_transmutable(const struct inode *isp) in smk_inode_transmutable() 379 static inline struct smack_known *smk_of_inode(const struct inode *isp) in smk_of_inode() 487 struct inode *i) in smk_ad_setfield_u_fs_inode() 489 a->a.u.inode = i; in smk_ad_setfield_u_fs_inode() 517 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 162 const struct inode *inode) in selinux_inode() argument 164 if (unlikely(!inode->i_security)) in selinux_inode() 166 return inode->i_security + selinux_blob_sizes.lbs_inode; in selinux_inode()
|