/security/apparmor/ |
D | policy_unpack.c | 112 static bool inbounds(struct aa_ext *e, size_t size) in inbounds() argument 114 return (size <= e->end - e->pos); in inbounds() 126 size_t size = 0; in unpack_u16_chunk() local 130 size = le16_to_cpu(get_unaligned((u16 *) e->pos)); in unpack_u16_chunk() 132 if (!inbounds(e, size)) in unpack_u16_chunk() 135 e->pos += size; in unpack_u16_chunk() 136 return size; in unpack_u16_chunk() 178 size_t size = unpack_u16_chunk(e, &tag); in unpack_nameX() local 180 if (name && (!size || strcmp(name, tag))) in unpack_nameX() 225 int size; in unpack_array() local [all …]
|
D | lib.c | 86 void *kvmalloc(size_t size) in kvmalloc() argument 90 if (size == 0) in kvmalloc() 94 if (size <= (16*PAGE_SIZE)) in kvmalloc() 95 buffer = kmalloc(size, GFP_NOIO | __GFP_NOWARN); in kvmalloc() 100 if (size < sizeof(struct work_struct)) in kvmalloc() 101 size = sizeof(struct work_struct); in kvmalloc() 102 buffer = vmalloc(size); in kvmalloc()
|
D | apparmorfs.c | 75 static ssize_t profile_load(struct file *f, const char __user *buf, size_t size, in profile_load() argument 81 data = aa_simple_write_to_buffer(OP_PROF_LOAD, buf, size, size, pos); in profile_load() 85 error = aa_replace_profiles(data, size, PROF_ADD); in profile_load() 99 size_t size, loff_t *pos) in profile_replace() argument 104 data = aa_simple_write_to_buffer(OP_PROF_REPL, buf, size, size, pos); in profile_replace() 107 error = aa_replace_profiles(data, size, PROF_REPLACE); in profile_replace() 121 size_t size, loff_t *pos) in profile_remove() argument 130 data = aa_simple_write_to_buffer(OP_PROF_RM, buf, size + 1, size, pos); in profile_remove() 134 data[size] = 0; in profile_remove() 135 error = aa_remove_profiles(data, size); in profile_remove()
|
D | path.c | 162 int size, char **name, const char **info) in get_name_to_buffer() argument 165 int error = d_namespace_path(path, buffer, size - adjust, name, flags); in get_name_to_buffer() 172 strcpy(&buffer[size - 2], "/"); in get_name_to_buffer() 211 int size = 256; in aa_path_name() local 218 buf = kmalloc(size, GFP_KERNEL); in aa_path_name() 222 error = get_name_to_buffer(path, flags, buf, size, &str, info); in aa_path_name() 227 size <<= 1; in aa_path_name() 228 if (size > aa_g_path_max) in aa_path_name()
|
D | match.c | 202 struct aa_dfa *aa_dfa_unpack(void *blob, size_t size, int flags) in aa_dfa_unpack() argument 217 if (size < sizeof(struct table_set_header)) in aa_dfa_unpack() 224 if (size < hsize) in aa_dfa_unpack() 229 size -= hsize; in aa_dfa_unpack() 231 while (size > 0) { in aa_dfa_unpack() 232 table = unpack_table(data, size); in aa_dfa_unpack() 267 size -= table_size(table->td_lolen, table->td_flags); in aa_dfa_unpack()
|
D | procattr.c | 114 int aa_setprocattr_changehat(char *args, size_t size, int test) in aa_setprocattr_changehat() argument 137 char *end = args + size; in aa_setprocattr_changehat()
|
/security/selinux/ss/ |
D | symtab.c | 14 unsigned int size; in symhash() local 19 size = strlen(keyp); in symhash() 20 for (p = keyp; (p - keyp) < size; p++) in symhash() 22 return val & (h->size - 1); in symhash() 35 int symtab_init(struct symtab *s, unsigned int size) in symtab_init() argument 37 s->table = hashtab_create(symhash, symcmp, size); in symtab_init()
|
D | hashtab.c | 13 u32 size) in hashtab_create() argument 22 p->size = size; in hashtab_create() 26 p->htable = kmalloc(sizeof(*(p->htable)) * size, GFP_KERNEL); in hashtab_create() 32 for (i = 0; i < size; i++) in hashtab_create() 101 for (i = 0; i < h->size; i++) { in hashtab_destroy() 128 for (i = 0; i < h->size; i++) { in hashtab_map() 148 for (slots_used = max_chain_len = i = 0; i < h->size; i++) { in hashtab_stat()
|
D | hashtab.h | 23 u32 size; /* number of slots in hash table */ member 44 u32 size);
|
D | symtab.h | 19 int symtab_init(struct symtab *s, unsigned int size);
|
/security/selinux/ |
D | netport.c | 49 int size; member 123 if (sel_netport_hash[idx].size == SEL_NETPORT_HASH_BKT_LIMIT) { in sel_netport_insert() 133 sel_netport_hash[idx].size++; in sel_netport_insert() 232 sel_netport_hash[idx].size = 0; in sel_netport_flush() 247 sel_netport_hash[iter].size = 0; in sel_netport_init()
|
D | netnode.c | 50 unsigned int size; member 174 if (sel_netnode_hash[idx].size == SEL_NETNODE_HASH_BKT_LIMIT) { in sel_netnode_insert() 183 sel_netnode_hash[idx].size++; in sel_netnode_insert() 296 sel_netnode_hash[idx].size = 0; in sel_netnode_flush() 311 sel_netnode_hash[iter].size = 0; in sel_netnode_init()
|
D | selinuxfs.c | 246 unsigned long size = vma->vm_end - vma->vm_start; in sel_mmap_handle_status() local 251 if (vma->vm_pgoff > 0 || size != PAGE_SIZE) in sel_mmap_handle_status() 261 size, vma->vm_page_prot); in sel_mmap_handle_status() 567 static ssize_t sel_write_context(struct file *file, char *buf, size_t size) in sel_write_context() argument 577 length = security_context_to_sid(buf, size, &sid); in sel_write_context() 657 static ssize_t sel_write_access(struct file *file, char *buf, size_t size); 658 static ssize_t sel_write_create(struct file *file, char *buf, size_t size); 659 static ssize_t sel_write_relabel(struct file *file, char *buf, size_t size); 660 static ssize_t sel_write_user(struct file *file, char *buf, size_t size); 661 static ssize_t sel_write_member(struct file *file, char *buf, size_t size); [all …]
|
/security/apparmor/include/ |
D | policy.h | 97 int size; member 192 int size; member 256 ssize_t aa_replace_profiles(void *udata, size_t size, bool noreplace); 257 ssize_t aa_remove_profiles(char *name, size_t size);
|
D | policy_unpack.h | 18 struct aa_profile *aa_unpack(void *udata, size_t size, const char **ns);
|
D | procattr.h | 22 int aa_setprocattr_changehat(char *args, size_t size, int test);
|
/security/integrity/evm/ |
D | evm_crypto.c | 138 int size; in evm_calc_hmac_or_hash() local 155 size = vfs_getxattr_alloc(dentry, *xattrname, in evm_calc_hmac_or_hash() 157 if (size == -ENOMEM) { in evm_calc_hmac_or_hash() 161 if (size < 0) in evm_calc_hmac_or_hash() 165 xattr_size = size; in evm_calc_hmac_or_hash()
|
/security/tomoyo/ |
D | memory.c | 72 void *tomoyo_commit_ok(void *data, const unsigned int size) in tomoyo_commit_ok() argument 74 void *ptr = kzalloc(size, GFP_NOFS); in tomoyo_commit_ok() 76 memmove(ptr, data, size); in tomoyo_commit_ok() 77 memset(data, 0, size); in tomoyo_commit_ok()
|
D | group.c | 184 const u8 size = is_ipv6 ? 16 : 4; in tomoyo_address_matches_group() local 191 if (memcmp(&member->address.ip[0], address, size) > 0 || in tomoyo_address_matches_group() 192 memcmp(address, &member->address.ip[1], size) > 0) in tomoyo_address_matches_group()
|
D | common.h | 650 u32 size; /* Memory size allocated for this entry. */ member 991 int size); 994 int tomoyo_update_domain(struct tomoyo_acl_info *new_entry, const int size, 1002 int tomoyo_update_policy(struct tomoyo_acl_head *new_entry, const int size, 1032 void *tomoyo_commit_ok(void *data, const unsigned int size); 1047 void tomoyo_print_ip(char *buf, const unsigned int size, 1287 static inline int tomoyo_round2(size_t size) in tomoyo_round2() argument 1289 return size; in tomoyo_round2() 1304 static inline int tomoyo_round2(size_t size) in tomoyo_round2() argument 1311 if (!size) in tomoyo_round2() [all …]
|
D | audit.c | 301 int size; member 383 entry->size = len + tomoyo_round2(sizeof(*entry)); in tomoyo_write_log2() 386 tomoyo_memory_used[TOMOYO_MEMORY_AUDIT] + entry->size >= in tomoyo_write_log2() 390 tomoyo_memory_used[TOMOYO_MEMORY_AUDIT] += entry->size; in tomoyo_write_log2() 444 tomoyo_memory_used[TOMOYO_MEMORY_AUDIT] -= ptr->size; in tomoyo_read_log()
|
D | network.c | 123 void tomoyo_print_ip(char *buf, const unsigned int size, in tomoyo_print_ip() argument 127 tomoyo_print_ipv6(buf, size, &ptr->ip[0], &ptr->ip[1]); in tomoyo_print_ip() 129 tomoyo_print_ipv4(buf, size, &ptr->ip[0].s6_addr32[0], in tomoyo_print_ip() 423 const u8 size = r->param.inet_network.is_ipv6 ? 16 : 4; in tomoyo_check_inet_acl() local 435 r->param.inet_network.address, size) <= 0 && in tomoyo_check_inet_acl() 437 &acl->address.ip[1], size) <= 0; in tomoyo_check_inet_acl() 753 int size) in tomoyo_socket_sendmsg_permission() argument
|
/security/ |
D | commoncap.c | 403 int size; in get_vfs_caps_from_disk() local 411 size = inode->i_op->getxattr((struct dentry *)dentry, XATTR_NAME_CAPS, &caps, in get_vfs_caps_from_disk() 413 if (size == -ENODATA || size == -EOPNOTSUPP) in get_vfs_caps_from_disk() 416 if (size < 0) in get_vfs_caps_from_disk() 417 return size; in get_vfs_caps_from_disk() 419 if (size < sizeof(magic_etc)) in get_vfs_caps_from_disk() 426 if (size != XATTR_CAPS_SZ_1) in get_vfs_caps_from_disk() 431 if (size != XATTR_CAPS_SZ_2) in get_vfs_caps_from_disk() 669 const void *value, size_t size, int flags) in cap_inode_setxattr() argument
|
D | security.c | 587 const void *value, size_t size, int flags) in security_inode_setxattr() argument 593 ret = security_ops->inode_setxattr(dentry, name, value, size, flags); in security_inode_setxattr() 596 ret = ima_inode_setxattr(dentry, name, value, size); in security_inode_setxattr() 599 return evm_inode_setxattr(dentry, name, value, size); in security_inode_setxattr() 603 const void *value, size_t size, int flags) in security_inode_post_setxattr() argument 607 security_ops->inode_post_setxattr(dentry, name, value, size, flags); in security_inode_post_setxattr() 608 evm_inode_post_setxattr(dentry, name, value, size); in security_inode_post_setxattr() 657 …inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) in security_inode_setsecurity() argument 661 return security_ops->inode_setsecurity(inode, name, value, size, flags); in security_inode_setsecurity() 1060 int security_setprocattr(struct task_struct *p, char *name, void *value, size_t size) in security_setprocattr() argument [all …]
|
/security/smack/ |
D | smack_lsm.c | 814 const void *value, size_t size, int flags) in smack_inode_setxattr() argument 830 if (size == 0 || size >= SMK_LONGLABEL || in smack_inode_setxattr() 831 smk_import(value, size) == NULL) in smack_inode_setxattr() 836 if (size != TRANS_TRUE_SIZE || in smack_inode_setxattr() 840 rc = cap_inode_setxattr(dentry, name, value, size, flags); in smack_inode_setxattr() 863 const void *value, size_t size, int flags) in smack_inode_post_setxattr() argument 869 nsp = smk_import(value, size); in smack_inode_post_setxattr() 875 nsp = smk_import(value, size); in smack_inode_post_setxattr() 881 nsp = smk_import(value, size); in smack_inode_post_setxattr() 1893 const void *value, size_t size, int flags) in smack_inode_setsecurity() argument [all …]
|