/security/selinux/include/ |
H A D | conditional.h | 16 int security_get_bools(int *len, char ***names, int **values); 18 int security_set_bools(int len, int *values);
|
/security/keys/ |
H A D | trusted.h | 21 int len; member in struct:tpm_buf 25 #define INIT_BUF(tb) (tb->len = 0) 87 int len; local 90 len = LOAD32(buf, TPM_SIZE_OFFSET); 91 print_hex_dump(KERN_INFO, "", DUMP_PREFIX_NONE, 16, 1, buf, len, 0); 113 buf->data[buf->len++] = value; 118 *(uint16_t *) & buf->data[buf->len] = htons(value); 119 buf->len += sizeof value; 124 *(uint32_t *) & buf->data[buf->len] = htonl(value); 125 buf->len 128 storebytes(struct tpm_buf *buf, const unsigned char *in, const int len) argument [all...] |
/security/apparmor/include/ |
H A D | crypto.h | 22 size_t len); 25 void *start, size_t len) 24 aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start, size_t len) argument
|
H A D | apparmor.h | 90 * @len: length of @sub to compare 94 static inline bool aa_strneq(const char *str, const char *sub, int len) argument 96 return !strncmp(str, sub, len) && !str[len];
|
H A D | match.h | 114 static inline size_t table_size(size_t len, size_t el_size) argument 116 return ALIGN(sizeof(struct table_header) + len * el_size, 8); 121 const char *str, int len);
|
/security/selinux/ |
H A D | netlink.c | 46 static void selnl_add_payload(struct nlmsghdr *nlh, int len, int msgtype, void *data) argument 52 memset(msg, 0, len); 60 memset(msg, 0, len); 72 int len; local 77 len = selnl_msglen(msgtype); 79 skb = nlmsg_new(len, GFP_USER); 84 nlh = nlmsg_put(skb, 0, 0, msgtype, len, 0); 87 selnl_add_payload(nlh, len, msgtype, data);
|
H A D | selinuxfs.c | 369 size_t len; member in struct:policy_load_memory 401 rc = security_read_policy(&plm->data, &plm->len); 447 ret = simple_read_from_buffer(buf, count, ppos, plm->data, plm->len); 464 if (offset >= roundup(plm->len, PAGE_SIZE)) 572 u32 sid, len; local 583 length = security_sid_to_context(sid, &canon, &len); 588 if (len > SIMPLE_TRANSACTION_LIMIT) { 590 "payload max\n", __func__, len); 594 memcpy(buf, canon, len); 595 length = len; 765 u32 len; local 865 u32 len; local 923 u32 len, nsids; local 983 u32 len; local 1229 ssize_t len; local 1498 u32 sid, len; local 1564 ssize_t len = snprintf(res, sizeof(res), "%d", sel_ino_to_class(ino)); local 1578 ssize_t len = snprintf(res, sizeof(res), "%d", sel_ino_to_perm(ino)); local [all...] |
/security/tomoyo/ |
H A D | audit.c | 28 int len; local 36 len = snprintf(buffer, tomoyo_buffer_len - 1, "argv[]={ "); 37 cp = buffer + len; 232 * @len: Buffer size needed for @fmt and @args. 241 char *tomoyo_init_log(struct tomoyo_request_info *r, int len, const char *fmt, argument 255 len += strlen(domainname) + strlen(header) + 10; 263 len += strlen(realpath) + 80 + strlen(bprm_info); 267 len += 18 + strlen(symlink); 269 len = tomoyo_round2(len); 358 tomoyo_write_log2(struct tomoyo_request_info *r, int len, const char *fmt, va_list args) argument 414 int len; local [all...] |
H A D | securityfs_if.c | 109 loff_t len = strlen(domain); local 111 if (pos >= len || !count) 113 len -= pos; 114 if (count < len) 115 len = count; 116 if (copy_to_user(buf, domain + pos, len)) 118 *ppos += len; 119 return len;
|
H A D | util.c | 394 const int len = strlen(find); local 397 if (strncmp(tmp, find, len)) 399 tmp += len; 438 * @len: Length of @string. 443 static bool tomoyo_correct_word2(const char *string, size_t len) argument 450 if (!len) 452 while (len--) { 455 if (!len--) 488 if (!len-- || !len 574 int len; local 622 int len = 0; local 664 const int len = strlen(name); local 925 const int len = pattern->const_len; local [all...] |
H A D | memory.c | 151 int len; local 156 len = strlen(name) + 1; 157 hash = full_name_hash((const unsigned char *) name, len - 1); 168 ptr = kzalloc(sizeof(*ptr) + len, GFP_NOFS); 171 memmove((char *) ptr->entry.name, name, len);
|
H A D | domain.c | 415 * @len: Length of @name. 423 (const char *name, const unsigned int len) 427 if (strncmp(name, ns->name, len) || 428 (name[len] && name[len] != ' ')) 450 unsigned int len = 0; local 452 len++; 453 ptr = tomoyo_find_namespace(domainname, len); 456 if (len >= TOMOYO_EXEC_TMPSIZE - 10 || !tomoyo_domain_def(domainname)) 458 entry = kzalloc(sizeof(*entry) + len 422 tomoyo_find_namespace(const char *name, const unsigned int len) argument 489 const int len = strlen(namespace); local [all...] |
H A D | realpath.c | 24 int len = 0; local 35 len += 2; 37 len++; 39 len += 4; 41 len++; 43 cp = kzalloc(len + 10, GFP_NOFS);
|
H A D | common.c | 190 * @len: Size of @buffer. 195 static void tomoyo_addprintf(char *buffer, int len, const char *fmt, ...) argument 200 vsnprintf(buffer + pos, len - pos - 1, fmt, args); 215 size_t len = strlen(w); local 216 if (len) { 217 if (len > head->read_user_buf_avail) 218 len = head->read_user_buf_avail; 219 if (!len) 221 if (copy_to_user(head->read_user_buf, w, len)) 223 head->read_user_buf_avail -= len; 278 size_t len; local 596 int len = 0; local 1943 int len; local 1999 int len; local 2141 size_t len = 0; local 2514 int len; local 2602 const int len = head->writebuf_size * 2; local [all...] |
/security/selinux/ss/ |
H A D | conditional.c | 226 u32 len; local 244 len = le32_to_cpu(buf[2]); 247 key = kmalloc(len + 1, GFP_KERNEL); 250 rc = next_entry(key, fp, len); 253 key[len] = '\0'; 356 u32 len; local 361 len = 0; 366 len = le32_to_cpu(buf[0]); 367 if (len == 0) 374 for (i = 0; i < len; 402 u32 len, i; local 457 u32 i, len; local 500 u32 len; local 530 u32 len; local 560 u32 len = 0; local 596 u32 len; local [all...] |
H A D | context.h | 30 u32 len; /* length of string in bytes */ member in struct:context 128 dst->len = src->len; 131 dst->len = 0; 146 c->len = 0; 152 if (c1->len && c2->len) 153 return (c1->len == c2->len && !strcmp(c1->str, c2->str)); 154 if (c1->len || c [all...] |
H A D | policydb.h | 293 size_t len; member in struct:policydb 329 size_t len; member in struct:policy_file 339 if (bytes > fp->len) 344 fp->len -= bytes; 350 size_t len = bytes * num; local 352 memcpy(fp->data, buf, len); 353 fp->data += len; 354 fp->len -= len;
|
H A D | policydb.c | 1088 static int str_read(char **strp, gfp_t flags, void *fp, u32 len) argument 1093 str = kmalloc(len + 1, flags); 1100 rc = next_entry(str, fp, len); 1104 str[len] = '\0'; 1114 u32 len; local 1125 len = le32_to_cpu(buf[0]); 1128 rc = str_read(&key, GFP_KERNEL, fp, len); 1147 u32 len, nel; local 1159 len = le32_to_cpu(buf[0]); 1168 rc = str_read(&key, GFP_KERNEL, fp, len); 1313 u32 len, len2, ncons, nel; local 1408 u32 len; local 1465 u32 len; local 1540 u32 len; local 1591 u32 len; local 1633 u32 len; local 1914 u32 nel, len; local 1995 u32 nel, nel2, len, len2; local 2108 u32 nel, len; local 2236 u32 len, nprim, nel; local 2582 size_t len; local 2610 size_t len; local 2721 size_t len; local 2745 size_t len; local 2843 size_t len, len2; local 2929 size_t items, len; local 2969 size_t items, len; local 3009 size_t items, len; local 3059 size_t nel, len; local 3156 size_t len; local 3275 u32 len; local 3336 size_t len; local [all...] |
H A D | services.c | 640 ops->len = 1; 667 ops->len = 0; 1084 ops->len = 0; 1182 if (context->len) { 1183 *scontext_len = context->len; 1435 context.len = scontext_len; 1814 u32 len; local 1819 if (!context_struct_to_string(context, &s, &len)) { 1850 u32 len; local 1867 c->len, 2000 security_load_policy(void *data, size_t len) argument 2149 size_t len; local 2459 int len; local 2572 security_get_bools(int *len, char ***names, int **values) argument 2623 security_set_bools(int len, int *values) argument 2675 int len; local 2731 u32 len; local 3422 security_read_policy(void **data, size_t *len) argument [all...] |
/security/apparmor/ |
H A D | procattr.c | 39 int len = 0, mode_len = 0, ns_len = 0, name_len; local 61 len = mode_len + ns_len + name_len + 1; /* + 1 for \n */ 62 s = str = kmalloc(len + 1, GFP_KERNEL); /* + 1 \0 */ 78 /* NOTE: len does not include \0 of string, not saved as part of file */ 79 return len;
|
H A D | crypto.c | 33 size_t len) 58 error = crypto_shash_update(&desc.shash, (u8 *) start, len); 32 aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start, size_t len) argument
|
/security/integrity/ima/ |
H A D | ima_template_lib.c | 64 field_data->len = buflen; 73 u8 *buf_ptr = field_data->data, buflen = field_data->len; 103 u32 len = (show == IMA_SHOW_BINARY_OLD_STRING_FMT) ? local 104 strlen(field_data->data) : field_data->len; 107 ima_putc(m, &len, sizeof(len)); 109 if (!len) 112 ima_putc(m, field_data->data, len);
|
H A D | ima_api.c | 56 u32 len; local 64 len = (*entry)->template_data[i].len; 65 (*entry)->template_data_len += sizeof(len); 66 (*entry)->template_data_len += len;
|
H A D | ima_queue.c | 35 .len = ATOMIC_LONG_INIT(0), 86 atomic_long_inc(&ima_htable.len);
|
/security/smack/ |
H A D | smack_access.c | 426 * @len: the maximum size, or zero if it is NULL terminated. 430 char *smk_parse_smack(const char *string, int len) argument 435 if (len <= 0) 436 len = strlen(string) + 1; 446 for (i = 0; i < len; i++) 471 int len) 483 for (cat = 1, cp = catset, byte = 0; byte < len; cp++, byte++) 501 * @len: the maximum size, or zero if it is NULL terminated. 506 struct smack_known *smk_import_entry(const char *string, int len) argument 513 smack = smk_parse_smack(string, len); 470 smk_netlbl_mls(int level, char *catset, struct netlbl_lsm_secattr *sap, int len) argument [all...] |