/security/apparmor/ |
D | mount.c | 316 const struct path *mntpath, char *buffer, in match_mnt_path_str() argument 327 AA_BUG(!buffer); in match_mnt_path_str() 332 error = aa_path_name(mntpath, path_flags(profile, mntpath), buffer, in match_mnt_path_str() 373 char *buffer, struct path *devpath, char *devbuffer, in match_mnt() argument 394 return match_mnt_path_str(profile, path, buffer, devname, type, flags, in match_mnt() 402 char *buffer = NULL; in aa_remount() local 411 get_buffers(buffer); in aa_remount() 413 match_mnt(profile, path, buffer, NULL, NULL, NULL, in aa_remount() 415 put_buffers(buffer); in aa_remount() 424 char *buffer = NULL, *old_buffer = NULL; in aa_bind_mount() local [all …]
|
D | file.c | 167 const struct path *path, int flags, char *buffer, in path_name() argument 174 error = aa_path_name(path, flags, buffer, name, &info, in path_name() 294 const struct path *path, char *buffer, u32 request, in profile_path_perm() argument 305 flags | profile->path_flags, buffer, &name, cond, in profile_path_perm() 330 char *buffer = NULL; in aa_path_perm() local 335 get_buffers(buffer); in aa_path_perm() 337 profile_path_perm(op, profile, path, buffer, request, in aa_path_perm() 340 put_buffers(buffer); in aa_path_perm() 366 const struct path *link, char *buffer, in profile_path_link() argument 378 buffer, &lname, cond, AA_MAY_LINK); in profile_path_link() [all …]
|
D | path.c | 25 static int prepend(char **buffer, int buflen, const char *str, int namelen) in prepend() argument 30 *buffer -= namelen; in prepend() 31 memcpy(*buffer, str, namelen); in prepend() 197 int aa_path_name(const struct path *path, int flags, char *buffer, in aa_path_name() argument 201 int error = d_namespace_path(path, buffer, &str, flags, disconnected); in aa_path_name()
|
D | lsm.c | 1249 static int param_get_aabool(char *buffer, const struct kernel_param *kp); 1258 static int param_get_aauint(char *buffer, const struct kernel_param *kp); 1266 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); 1275 static int param_get_audit(char *buffer, const struct kernel_param *kp); 1278 static int param_get_mode(char *buffer, const struct kernel_param *kp); 1335 static int param_get_aaintbool(char *buffer, const struct kernel_param *kp); 1367 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp) in param_get_aalockpolicy() argument 1373 return param_get_bool(buffer, kp); in param_get_aalockpolicy() 1385 static int param_get_aabool(char *buffer, const struct kernel_param *kp) in param_get_aabool() argument 1391 return param_get_bool(buffer, kp); in param_get_aabool() [all …]
|
D | domain.c | 619 char *buffer, struct path_cond *cond, in profile_transition() argument 633 AA_BUG(!buffer); in profile_transition() 635 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer, in profile_transition() 696 long pos = name - buffer; in profile_transition() 698 put_buffers(buffer); in profile_transition() 701 get_buffers(buffer); in profile_transition() 702 name = buffer + pos; in profile_transition() 745 char *buffer, struct path_cond *cond, in profile_onexec() argument 756 AA_BUG(!buffer); in profile_onexec() 768 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer, in profile_onexec() [all …]
|
D | net.c | 111 __be16 buffer[2]; in aa_profile_af_perm() local 122 buffer[0] = cpu_to_be16(family); in aa_profile_af_perm() 123 buffer[1] = cpu_to_be16((u16) type); in aa_profile_af_perm() 124 state = aa_dfa_match_len(profile->policy.dfa, state, (char *) &buffer, in aa_profile_af_perm()
|
/security/tomoyo/ |
D | realpath.c | 93 static char *tomoyo_get_absolute_path(const struct path *path, char * const buffer, in tomoyo_get_absolute_path() argument 100 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path() 105 buffer[buflen - 2] = '/'; in tomoyo_get_absolute_path() 106 buffer[buflen - 1] = '\0'; in tomoyo_get_absolute_path() 124 static char *tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer, in tomoyo_get_dentry_path() argument 130 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path() 135 buffer[buflen - 2] = '/'; in tomoyo_get_dentry_path() 136 buffer[buflen - 1] = '\0'; in tomoyo_get_dentry_path() 152 static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer, in tomoyo_get_local_path() argument 156 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() [all …]
|
D | audit.c | 26 char *buffer = kzalloc(tomoyo_buffer_len, GFP_NOFS); in tomoyo_print_bprm() local 36 if (!buffer) in tomoyo_print_bprm() 38 len = snprintf(buffer, tomoyo_buffer_len - 1, "argv[]={ "); in tomoyo_print_bprm() 39 cp = buffer + len; in tomoyo_print_bprm() 56 if (cp >= buffer + tomoyo_buffer_len - 32) { in tomoyo_print_bprm() 104 return buffer; in tomoyo_print_bprm() 106 snprintf(buffer, tomoyo_buffer_len - 1, in tomoyo_print_bprm() 108 return buffer; in tomoyo_print_bprm() 156 char *buffer = kmalloc(tomoyo_buffer_len, GFP_NOFS); in tomoyo_print_header() local 160 if (!buffer) in tomoyo_print_header() [all …]
|
D | util.c | 224 void tomoyo_print_ulong(char *buffer, const int buffer_len, in tomoyo_print_ulong() argument 228 snprintf(buffer, buffer_len, "%lu", value); in tomoyo_print_ulong() 230 snprintf(buffer, buffer_len, "0%lo", value); in tomoyo_print_ulong() 232 snprintf(buffer, buffer_len, "0x%lX", value); in tomoyo_print_ulong() 234 snprintf(buffer, buffer_len, "type(%u)", type); in tomoyo_print_ulong() 404 void tomoyo_normalize_line(unsigned char *buffer) in tomoyo_normalize_line() argument 406 unsigned char *sp = buffer; in tomoyo_normalize_line() 407 unsigned char *dp = buffer; in tomoyo_normalize_line() 563 bool tomoyo_domain_def(const unsigned char *buffer) in tomoyo_domain_def() argument 568 if (*buffer != '<') in tomoyo_domain_def() [all …]
|
D | common.c | 196 static void tomoyo_addprintf(char *buffer, int len, const char *fmt, ...) in tomoyo_addprintf() argument 199 const int pos = strlen(buffer); in tomoyo_addprintf() 202 vsnprintf(buffer + pos, len - pos - 1, fmt, args); in tomoyo_addprintf() 439 char buffer[128]; in tomoyo_print_number_union_nospace() local 441 buffer[0] = '\0'; in tomoyo_print_number_union_nospace() 445 tomoyo_addprintf(buffer, sizeof(buffer), in tomoyo_print_number_union_nospace() 449 tomoyo_addprintf(buffer, sizeof(buffer), in tomoyo_print_number_union_nospace() 453 tomoyo_addprintf(buffer, sizeof(buffer), "%lu", in tomoyo_print_number_union_nospace() 459 tomoyo_addprintf(buffer, sizeof(buffer), "-"); in tomoyo_print_number_union_nospace() 463 tomoyo_io_printf(head, "%s", buffer); in tomoyo_print_number_union_nospace() [all …]
|
D | common.h | 936 bool tomoyo_domain_def(const unsigned char *buffer); 1026 ssize_t tomoyo_read_control(struct tomoyo_io_buffer *head, char __user *buffer, 1029 const char __user *buffer, const int buffer_len); 1057 void tomoyo_normalize_line(unsigned char *buffer); 1061 void tomoyo_print_ulong(char *buffer, const int buffer_len,
|
D | network.c | 90 static void tomoyo_print_ipv4(char *buffer, const unsigned int buffer_len, in tomoyo_print_ipv4() argument 93 snprintf(buffer, buffer_len, "%pI4%c%pI4", min_ip, in tomoyo_print_ipv4() 107 static void tomoyo_print_ipv6(char *buffer, const unsigned int buffer_len, in tomoyo_print_ipv6() argument 111 snprintf(buffer, buffer_len, "%pI6c%c%pI6c", min_ip, in tomoyo_print_ipv6()
|
/security/keys/ |
D | compat_dh.c | 17 char __user *buffer, size_t buflen, in compat_keyctl_dh_compute() argument 24 return __keyctl_dh_compute(params, buffer, buflen, NULL); in compat_keyctl_dh_compute() 35 return __keyctl_dh_compute(params, buffer, buflen, &kdfcopy); in compat_keyctl_dh_compute()
|
D | dh.c | 200 char __user *buffer, size_t buflen, in keyctl_dh_compute_kdf() argument 219 if (copy_to_user(buffer, outbuf, buflen) != 0) in keyctl_dh_compute_kdf() 228 char __user *buffer, size_t buflen, in __keyctl_dh_compute() argument 245 if (!params || (!buffer && buflen)) { in __keyctl_dh_compute() 386 ret = keyctl_dh_compute_kdf(sdesc, buffer, buflen, outbuf, in __keyctl_dh_compute() 389 } else if (copy_to_user(buffer, outbuf, req->dst_len) == 0) { in __keyctl_dh_compute() 411 char __user *buffer, size_t buflen, in keyctl_dh_compute() argument 417 return __keyctl_dh_compute(params, buffer, buflen, NULL); in keyctl_dh_compute() 422 return __keyctl_dh_compute(params, buffer, buflen, &kdfcopy); in keyctl_dh_compute()
|
D | trusted.c | 177 int TSS_checkhmac1(unsigned char *buffer, in TSS_checkhmac1() argument 201 bufsize = LOAD32(buffer, TPM_SIZE_OFFSET); in TSS_checkhmac1() 202 tag = LOAD16(buffer, 0); in TSS_checkhmac1() 204 result = LOAD32N(buffer, TPM_RETURN_OFFSET); in TSS_checkhmac1() 209 authdata = buffer + bufsize - SHA1_DIGEST_SIZE; in TSS_checkhmac1() 235 ret = crypto_shash_update(&sdesc->shash, buffer + dpos, dlen); in TSS_checkhmac1() 262 static int TSS_checkhmac2(unsigned char *buffer, in TSS_checkhmac2() argument 289 bufsize = LOAD32(buffer, TPM_SIZE_OFFSET); in TSS_checkhmac2() 290 tag = LOAD16(buffer, 0); in TSS_checkhmac2() 292 result = LOAD32N(buffer, TPM_RETURN_OFFSET); in TSS_checkhmac2() [all …]
|
D | user_defined.c | 171 long user_read(const struct key *key, char __user *buffer, size_t buflen) in user_read() argument 180 if (buffer && buflen > 0) { in user_read() 184 if (copy_to_user(buffer, upayload->data, buflen) != 0) in user_read()
|
D | internal.h | 236 extern long keyctl_get_security(key_serial_t keyid, char __user *buffer, 269 char __user *buffer, size_t buflen, 276 char __user *buffer, size_t buflen, in keyctl_dh_compute() argument 285 char __user *buffer, size_t buflen, in compat_keyctl_dh_compute() argument
|
D | request_key_auth.c | 83 char __user *buffer, size_t buflen) in request_key_auth_read() argument 96 if (buffer && buflen > 0) { in request_key_auth_read() 100 if (copy_to_user(buffer, rka->callout_info, buflen) != 0) in request_key_auth_read()
|
D | big_key.c | 355 long big_key_read(const struct key *key, char __user *buffer, size_t buflen) in big_key_read() argument 360 if (!buffer || buflen < datalen) in big_key_read() 395 if (copy_to_user(buffer, buf->virt, datalen) != 0) in big_key_read() 404 if (copy_to_user(buffer, key->payload.data[big_key_data], in big_key_read()
|
D | keyctl.c | 645 char __user *buffer, in keyctl_describe_key() argument 692 if (buffer && buflen >= ret) { in keyctl_describe_key() 693 if (copy_to_user(buffer, infobuf, infolen) != 0 || in keyctl_describe_key() 694 copy_to_user(buffer + infolen, key->description, in keyctl_describe_key() 810 long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) in keyctl_read_key() argument 855 ret = key->type->read(key, buffer, buflen); in keyctl_read_key() 1487 char __user *buffer, in keyctl_get_security() argument 1518 if (buffer && buflen > 0 && in keyctl_get_security() 1519 copy_to_user(buffer, "", 1) != 0) in keyctl_get_security() 1523 if (buffer && buflen > 0) { in keyctl_get_security() [all …]
|
D | keyring.c | 82 char __user *buffer, size_t buflen); 455 key_serial_t __user *buffer; member 470 ret = put_user(key->serial, ctx->buffer); in keyring_read_iterator() 473 ctx->buffer++; in keyring_read_iterator() 486 char __user *buffer, size_t buflen) in keyring_read() argument 497 if (buffer && buflen) { in keyring_read() 498 ctx.buffer = (key_serial_t __user *)buffer; in keyring_read()
|
/security/ |
D | min_addr.c | 33 void __user *buffer, size_t *lenp, loff_t *ppos) in mmap_min_addr_handler() argument 40 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); in mmap_min_addr_handler()
|
D | commoncap.c | 370 int cap_inode_getsecurity(struct inode *inode, const char *name, void **buffer, in cap_inode_getsecurity() argument 403 *buffer = tmpbuf; in cap_inode_getsecurity() 421 *buffer = tmpbuf; in cap_inode_getsecurity() 436 *buffer = kmalloc(size, GFP_ATOMIC); in cap_inode_getsecurity() 437 if (*buffer) { in cap_inode_getsecurity() 438 struct vfs_cap_data *cap = *buffer; in cap_inode_getsecurity()
|
/security/integrity/ima/ |
D | ima_kexec.c | 17 static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer, in ima_dump_measurement_list() argument 68 *buffer = file.buf; in ima_dump_measurement_list() 117 kbuf.buffer = kexec_buffer; in ima_add_kexec_buffer()
|
D | ima_template_lib.c | 239 u8 buffer[CRYPTO_MAX_ALG_NAME + 2 + IMA_MAX_DIGEST_SIZE] = { 0 }; in ima_eventdigest_init_common() local 245 offset += snprintf(buffer, CRYPTO_MAX_ALG_NAME + 1, "%s", in ima_eventdigest_init_common() 247 buffer[offset] = ':'; in ima_eventdigest_init_common() 252 memcpy(buffer + offset, digest, digestsize); in ima_eventdigest_init_common() 261 return ima_write_template_field_data(buffer, offset + digestsize, in ima_eventdigest_init_common()
|