| /security/tomoyo/ |
| A D | realpath.c | 101 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path() 106 buffer[buflen - 2] = '/'; in tomoyo_get_absolute_path() 107 buffer[buflen - 1] = '\0'; in tomoyo_get_absolute_path() 131 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path() 136 buffer[buflen - 2] = '/'; in tomoyo_get_dentry_path() 137 buffer[buflen - 1] = '\0'; in tomoyo_get_dentry_path() 153 static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer, in tomoyo_get_local_path() argument 157 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() 170 if (pos < buffer) in tomoyo_get_local_path() 200 if (pos < buffer) in tomoyo_get_local_path() [all …]
|
| A D | audit.c | 36 if (!buffer) 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() 160 if (!buffer) in tomoyo_print_header() 196 pos += snprintf(buffer + pos, in tomoyo_print_header() 216 pos += snprintf(buffer + pos, in tomoyo_print_header() 226 return buffer; in tomoyo_print_header() [all …]
|
| A D | util.c | 230 snprintf(buffer, buffer_len, "%lu", value); in tomoyo_print_ulong() 232 snprintf(buffer, buffer_len, "0%lo", value); in tomoyo_print_ulong() 234 snprintf(buffer, buffer_len, "0x%lX", value); in tomoyo_print_ulong() 236 snprintf(buffer, buffer_len, "type(%u)", type); in tomoyo_print_ulong() 408 unsigned char *sp = buffer; in tomoyo_normalize_line() 409 unsigned char *dp = buffer; in tomoyo_normalize_line() 590 if (*buffer != '<') in tomoyo_domain_def() 592 cp = strchr(buffer, ' '); in tomoyo_domain_def() 594 len = strlen(buffer); in tomoyo_domain_def() 596 len = cp - buffer; in tomoyo_domain_def() [all …]
|
| A D | common.c | 431 char buffer[128]; in tomoyo_print_number_union_nospace() local 433 buffer[0] = '\0'; in tomoyo_print_number_union_nospace() 437 tomoyo_addprintf(buffer, sizeof(buffer), in tomoyo_print_number_union_nospace() 441 tomoyo_addprintf(buffer, sizeof(buffer), in tomoyo_print_number_union_nospace() 445 tomoyo_addprintf(buffer, sizeof(buffer), "%lu", in tomoyo_print_number_union_nospace() 451 tomoyo_addprintf(buffer, sizeof(buffer), "-"); in tomoyo_print_number_union_nospace() 1826 tomoyo_print_ip(buffer, sizeof(buffer), in tomoyo_read_group() 2101 char *buffer; in tomoyo_add_entry() local 2133 if (!buffer) in tomoyo_add_entry() 2146 kfree(buffer); in tomoyo_add_entry() [all …]
|
| /security/apparmor/ |
| A D | mount.c | 319 AA_BUG(!buffer); in match_mnt_path_str() 399 char *buffer = NULL; in aa_remount() local 409 if (!buffer) in aa_remount() 415 aa_put_buffer(buffer); in aa_remount() 463 char *buffer = NULL; in aa_mount_change_type() local 474 if (!buffer) in aa_mount_change_type() 571 if (!buffer) { in aa_new_mount() 588 buffer, dev_name, in aa_new_mount() 603 char *buffer) in profile_umount() argument 639 char *buffer = NULL; in aa_umount() local [all …]
|
| A D | file.c | 282 char *buffer = NULL; in aa_path_perm() local 287 buffer = aa_get_buffer(false); in aa_path_perm() 288 if (!buffer) in aa_path_perm() 294 aa_put_buffer(buffer); in aa_path_perm() 442 buffer = aa_get_buffer(false); in aa_path_link() 445 if (!buffer || !buffer2) in aa_path_link() 452 aa_put_buffer(buffer); in aa_path_link() 491 char *buffer; in __file_path_perm() local 501 if (!buffer) in __file_path_perm() 507 &file->f_path, buffer, in __file_path_perm() [all …]
|
| A 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()
|
| A D | lsm.c | 51 DECLARE_FLEX_ARRAY(char, buffer); 1932 return param_get_bool(buffer, kp); in param_get_aalockpolicy() 1950 return param_get_bool(buffer, kp); in param_get_aabool() 1976 return param_get_uint(buffer, kp); in param_get_aauint() 2016 return param_get_bool(buffer, &kp_local); in param_get_aaintbool() 2046 return param_get_int(buffer, kp); in param_get_aacompressionlevel() 2055 return aa_print_debug_params(buffer); in param_get_debug() 2150 return &aa_buf->buffer[0]; in aa_get_buffer() 2171 return aa_buf->buffer; in aa_get_buffer() 2195 return aa_buf->buffer; in aa_get_buffer() [all …]
|
| A D | domain.c | 676 AA_BUG(!buffer); in profile_transition() 807 AA_BUG(!buffer); in profile_onexec() 881 AA_BUG(!buffer); in handle_onexec() 886 bprm, buffer, cond, unsafe)); in handle_onexec() 895 buffer, cond, unsafe)); in handle_onexec() 923 char *buffer = NULL; in apparmor_bprm_creds_for_exec() local 953 buffer = aa_get_buffer(false); in apparmor_bprm_creds_for_exec() 954 if (!buffer) { in apparmor_bprm_creds_for_exec() 962 bprm, buffer, &cond, &unsafe); in apparmor_bprm_creds_for_exec() 966 buffer, in apparmor_bprm_creds_for_exec() [all …]
|
| /security/landlock/ |
| A D | domain.c | 46 char *buffer __free(kfree) = NULL; in get_current_exe() 57 buffer = kmalloc(buffer_size, GFP_KERNEL); in get_current_exe() 58 if (!buffer) in get_current_exe() 61 exe = d_path(&file->f_path, buffer, buffer_size); in get_current_exe() 66 size = buffer + buffer_size - exe; in get_current_exe() 72 return no_free_ptr(buffer); in get_current_exe() 85 const void *buffer __free(kfree) = NULL; in get_current_details() 88 buffer = get_current_exe(&path_str, &path_size); in get_current_details() 89 if (IS_ERR(buffer)) in get_current_details() 90 return ERR_CAST(buffer); in get_current_details()
|
| /security/keys/ |
| A D | dh.c | 95 char __user *buffer, size_t buflen, in keyctl_dh_compute_kdf() argument 114 if (copy_to_user(buffer, outbuf, buflen) != 0) in keyctl_dh_compute_kdf() 123 char __user *buffer, size_t buflen, in __keyctl_dh_compute() argument 140 if (!params || (!buffer && buflen)) { in __keyctl_dh_compute() 277 ret = keyctl_dh_compute_kdf(hash, buffer, buflen, outbuf, in __keyctl_dh_compute() 279 } else if (copy_to_user(buffer, outbuf, req->dst_len) == 0) { in __keyctl_dh_compute() 301 char __user *buffer, size_t buflen, in keyctl_dh_compute() argument 307 return __keyctl_dh_compute(params, buffer, buflen, NULL); in keyctl_dh_compute() 312 return __keyctl_dh_compute(params, buffer, buflen, &kdfcopy); in keyctl_dh_compute()
|
| A 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()
|
| A D | user_defined.c | 171 long user_read(const struct key *key, char *buffer, size_t buflen) in user_read() argument 180 if (buffer && buflen > 0) { in user_read() 184 memcpy(buffer, upayload->data, buflen); in user_read()
|
| A D | big_key.c | 227 long big_key_read(const struct key *key, char *buffer, size_t buflen) in big_key_read() argument 233 if (!buffer || buflen < datalen) in big_key_read() 268 memcpy(buffer, buf, datalen); in big_key_read() 276 memcpy(buffer, payload->data, datalen); in big_key_read()
|
| A 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() 810 ret = key->type->read(key, buffer, buflen); in __keyctl_read_key() 869 if (!buffer || !buflen) { in keyctl_read_key() 922 if (copy_to_user(buffer, key_data, ret)) in keyctl_read_key() 1562 char __user *buffer, in keyctl_get_security() argument 1594 if (buffer && buflen > 0 && in keyctl_get_security() 1595 copy_to_user(buffer, "", 1) != 0) in keyctl_get_security() 1599 if (buffer && buflen > 0) { in keyctl_get_security() [all …]
|
| A D | internal.h | 257 extern long keyctl_get_security(key_serial_t keyid, char __user *buffer, 285 char __user *buffer, size_t buflen, 292 char __user *buffer, size_t buflen, in keyctl_dh_compute() argument 301 char __user *buffer, size_t buflen, in compat_keyctl_dh_compute() argument
|
| A D | request_key_auth.c | 83 char *buffer, size_t buflen) in request_key_auth_read() argument 96 if (buffer && buflen > 0) { in request_key_auth_read() 100 memcpy(buffer, rka->callout_info, buflen); in request_key_auth_read()
|
| /security/integrity/ima/ |
| A D | ima_template_lib.c | 305 u8 buffer[DIGEST_TYPE_NAME_LEN_MAX + CRYPTO_MAX_ALG_NAME + 2 + in ima_eventdigest_init_common() local 312 offset += 1 + sprintf(buffer, "%s:%s:", in ima_eventdigest_init_common() 317 offset += 1 + sprintf(buffer, "%s:", in ima_eventdigest_init_common() 322 memcpy(buffer + offset, digest, digestsize); in ima_eventdigest_init_common() 337 return ima_write_template_field_data(buffer, offset + digestsize, in ima_eventdigest_init_common() 707 u8 *buffer = NULL; in ima_eventinodexattrs_init_common() local 718 buffer = kmalloc(rc, GFP_KERNEL); in ima_eventinodexattrs_init_common() 719 if (!buffer) in ima_eventinodexattrs_init_common() 722 rc = evm_read_protected_xattrs(file_dentry(event_data->file), buffer, in ima_eventinodexattrs_init_common() 729 rc = ima_write_template_field_data((char *)buffer, rc, DATA_FMT_HEX, in ima_eventinodexattrs_init_common() [all …]
|
| A D | ima_kexec.c | 81 static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer, in ima_dump_measurement_list() argument 125 *buffer = ima_kexec_file.buf; in ima_dump_measurement_list() 179 kbuf.buffer = kexec_buffer; in ima_add_kexec_buffer()
|
| /security/ |
| A D | min_addr.c | 33 void *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()
|
| /security/keys/trusted-keys/ |
| A D | trusted_tpm1.c | 170 int TSS_checkhmac1(unsigned char *buffer, in TSS_checkhmac1() argument 194 bufsize = LOAD32(buffer, TPM_SIZE_OFFSET); in TSS_checkhmac1() 195 tag = LOAD16(buffer, 0); in TSS_checkhmac1() 197 result = LOAD32N(buffer, TPM_RETURN_OFFSET); in TSS_checkhmac1() 202 authdata = buffer + bufsize - SHA1_DIGEST_SIZE; in TSS_checkhmac1() 255 static int TSS_checkhmac2(unsigned char *buffer, in TSS_checkhmac2() argument 282 bufsize = LOAD32(buffer, TPM_SIZE_OFFSET); in TSS_checkhmac2() 283 tag = LOAD16(buffer, 0); in TSS_checkhmac2() 285 result = LOAD32N(buffer, TPM_RETURN_OFFSET); in TSS_checkhmac2() 291 authdata1 = buffer + bufsize - (SHA1_DIGEST_SIZE + 1 in TSS_checkhmac2() [all …]
|
| A D | trusted_core.c | 290 static long trusted_read(const struct key *key, char *buffer, in trusted_read() argument 301 if (buffer && buflen >= 2 * p->blob_len) { in trusted_read() 302 bufp = buffer; in trusted_read()
|
| /security/integrity/evm/ |
| A D | evm_main.c | 351 int evm_read_protected_xattrs(struct dentry *dentry, u8 *buffer, in evm_read_protected_xattrs() argument 368 if (buffer) { in evm_read_protected_xattrs() 370 *(buffer + total_size - 1) = '|'; in evm_read_protected_xattrs() 372 memcpy(buffer + total_size, xattr->name, size); in evm_read_protected_xattrs() 377 if (buffer) { in evm_read_protected_xattrs() 381 *(u32 *)(buffer + total_size) = rc; in evm_read_protected_xattrs() 386 if (buffer) { in evm_read_protected_xattrs() 389 buffer + total_size, in evm_read_protected_xattrs()
|
| /security/ipe/ |
| A D | policy_fs.c | 168 char buffer[MAX_VERSION_SIZE] = { 0 }; in read_version() local 183 strsize = scnprintf(buffer, ARRAY_SIZE(buffer), "%hu.%hu.%hu", in read_version() 187 rc = simple_read_from_buffer(data, len, offset, buffer, strsize); in read_version()
|
| /security/apparmor/include/ |
| A D | path.h | 25 int aa_path_name(const struct path *path, int flags, char *buffer,
|