/security/apparmor/ |
D | lib.c | 88 void *buffer = NULL; in kvmalloc() local 95 buffer = kmalloc(size, GFP_NOIO | __GFP_NOWARN); in kvmalloc() 96 if (!buffer) { in kvmalloc() 102 buffer = vmalloc(size); in kvmalloc() 104 return buffer; in kvmalloc() 126 void kvfree(void *buffer) in kvfree() argument 128 if (is_vmalloc_addr(buffer)) { in kvfree() 132 struct work_struct *work = (struct work_struct *) buffer; in kvfree() 136 kfree(buffer); in kvfree()
|
D | path.c | 30 static int prepend(char **buffer, int buflen, const char *str, int namelen) in prepend() argument 35 *buffer -= namelen; in prepend() 36 memcpy(*buffer, str, namelen); in prepend() 159 static int get_name_to_buffer(struct path *path, int flags, char *buffer, in get_name_to_buffer() argument 163 int error = d_namespace_path(path, buffer, size - adjust, name, flags); in get_name_to_buffer() 170 strcpy(&buffer[size - 2], "/"); in get_name_to_buffer() 205 int aa_path_name(struct path *path, int flags, char **buffer, const char **name, in aa_path_name() argument 213 *buffer = NULL; in aa_path_name() 230 *buffer = buf; in aa_path_name()
|
D | lsm.c | 674 static int param_get_aabool(char *buffer, const struct kernel_param *kp); 682 static int param_get_aauint(char *buffer, const struct kernel_param *kp); 690 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); 698 static int param_get_audit(char *buffer, struct kernel_param *kp); 701 static int param_get_mode(char *buffer, struct kernel_param *kp); 776 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp) in param_get_aalockpolicy() argument 780 return param_get_bool(buffer, kp); in param_get_aalockpolicy() 790 static int param_get_aabool(char *buffer, const struct kernel_param *kp) in param_get_aabool() argument 794 return param_get_bool(buffer, kp); in param_get_aabool() 804 static int param_get_aauint(char *buffer, const struct kernel_param *kp) in param_get_aauint() argument [all …]
|
D | file.c | 279 char *buffer = NULL; in aa_path_perm() local 285 error = aa_path_name(path, flags, &buffer, &name, &info); in aa_path_perm() 303 kfree(buffer); in aa_path_perm() 355 char *buffer = NULL, *buffer2 = NULL; in aa_path_link() local 365 error = aa_path_name(&link, profile->path_flags, &buffer, &lname, in aa_path_link() 431 kfree(buffer); in aa_path_link()
|
D | domain.c | 348 char *buffer = NULL; in apparmor_bprm_set_creds() local 375 error = aa_path_name(&bprm->file->f_path, profile->path_flags, &buffer, in apparmor_bprm_set_creds() 529 kfree(buffer); in apparmor_bprm_set_creds()
|
/security/tomoyo/ |
D | realpath.c | 92 static char *tomoyo_get_absolute_path(struct path *path, char * const buffer, in tomoyo_get_absolute_path() argument 98 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path() 102 buffer[buflen - 2] = '/'; in tomoyo_get_absolute_path() 103 buffer[buflen - 1] = '\0'; in tomoyo_get_absolute_path() 121 static char *tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer, in tomoyo_get_dentry_path() argument 126 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path() 130 buffer[buflen - 2] = '/'; in tomoyo_get_dentry_path() 131 buffer[buflen - 1] = '\0'; in tomoyo_get_dentry_path() 147 static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer, in tomoyo_get_local_path() argument 151 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() [all …]
|
D | audit.c | 25 char *buffer = kzalloc(tomoyo_buffer_len, GFP_NOFS); in tomoyo_print_bprm() local 34 if (!buffer) in tomoyo_print_bprm() 36 len = snprintf(buffer, tomoyo_buffer_len - 1, "argv[]={ "); in tomoyo_print_bprm() 37 cp = buffer + len; in tomoyo_print_bprm() 53 if (cp >= buffer + tomoyo_buffer_len - 32) { in tomoyo_print_bprm() 101 return buffer; in tomoyo_print_bprm() 103 snprintf(buffer, tomoyo_buffer_len - 1, in tomoyo_print_bprm() 105 return buffer; in tomoyo_print_bprm() 153 char *buffer = kmalloc(tomoyo_buffer_len, GFP_NOFS); in tomoyo_print_header() local 156 if (!buffer) in tomoyo_print_header() [all …]
|
D | util.c | 236 void tomoyo_print_ulong(char *buffer, const int buffer_len, in tomoyo_print_ulong() argument 240 snprintf(buffer, buffer_len, "%lu", value); in tomoyo_print_ulong() 242 snprintf(buffer, buffer_len, "0%lo", value); in tomoyo_print_ulong() 244 snprintf(buffer, buffer_len, "0x%lX", value); in tomoyo_print_ulong() 246 snprintf(buffer, buffer_len, "type(%u)", type); in tomoyo_print_ulong() 414 void tomoyo_normalize_line(unsigned char *buffer) in tomoyo_normalize_line() argument 416 unsigned char *sp = buffer; in tomoyo_normalize_line() 417 unsigned char *dp = buffer; in tomoyo_normalize_line() 571 bool tomoyo_domain_def(const unsigned char *buffer) in tomoyo_domain_def() argument 575 if (*buffer != '<') in tomoyo_domain_def() [all …]
|
D | common.c | 195 static void tomoyo_addprintf(char *buffer, int len, const char *fmt, ...) in tomoyo_addprintf() argument 198 const int pos = strlen(buffer); in tomoyo_addprintf() 200 vsnprintf(buffer + pos, len - pos - 1, fmt, args); in tomoyo_addprintf() 434 char buffer[128]; in tomoyo_print_number_union_nospace() local 435 buffer[0] = '\0'; in tomoyo_print_number_union_nospace() 439 tomoyo_addprintf(buffer, sizeof(buffer), in tomoyo_print_number_union_nospace() 443 tomoyo_addprintf(buffer, sizeof(buffer), in tomoyo_print_number_union_nospace() 447 tomoyo_addprintf(buffer, sizeof(buffer), "%lu", in tomoyo_print_number_union_nospace() 453 tomoyo_addprintf(buffer, sizeof(buffer), "-"); in tomoyo_print_number_union_nospace() 457 tomoyo_io_printf(head, "%s", buffer); in tomoyo_print_number_union_nospace() [all …]
|
D | common.h | 926 bool tomoyo_domain_def(const unsigned char *buffer); 1016 ssize_t tomoyo_read_control(struct tomoyo_io_buffer *head, char __user *buffer, 1019 const char __user *buffer, const int buffer_len); 1046 void tomoyo_normalize_line(unsigned char *buffer); 1050 void tomoyo_print_ulong(char *buffer, const int buffer_len,
|
D | network.c | 89 static void tomoyo_print_ipv4(char *buffer, const unsigned int buffer_len, in tomoyo_print_ipv4() argument 92 snprintf(buffer, buffer_len, "%pI4%c%pI4", min_ip, in tomoyo_print_ipv4() 106 static void tomoyo_print_ipv6(char *buffer, const unsigned int buffer_len, in tomoyo_print_ipv6() argument 110 snprintf(buffer, buffer_len, "%pI6c%c%pI6c", min_ip, in tomoyo_print_ipv6()
|
D | file.c | 215 char buffer[64]; in tomoyo_audit_path_number_log() local 231 tomoyo_print_ulong(buffer, sizeof(buffer), r->param.path_number.number, in tomoyo_audit_path_number_log() 235 r->param.path_number.filename->name, buffer); in tomoyo_audit_path_number_log()
|
/security/keys/ |
D | trusted.h | 16 #define LOAD32(buffer, offset) (ntohl(*(uint32_t *)&buffer[offset])) argument 17 #define LOAD32N(buffer, offset) (*(uint32_t *)&buffer[offset]) argument 18 #define LOAD16(buffer, offset) (ntohs(*(uint16_t *)&buffer[offset])) argument
|
D | trusted.c | 174 static int TSS_checkhmac1(unsigned char *buffer, in TSS_checkhmac1() argument 195 bufsize = LOAD32(buffer, TPM_SIZE_OFFSET); in TSS_checkhmac1() 196 tag = LOAD16(buffer, 0); in TSS_checkhmac1() 198 result = LOAD32N(buffer, TPM_RETURN_OFFSET); in TSS_checkhmac1() 203 authdata = buffer + bufsize - SHA1_DIGEST_SIZE; in TSS_checkhmac1() 229 ret = crypto_shash_update(&sdesc->shash, buffer + dpos, dlen); 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() [all …]
|
D | user_defined.c | 191 long user_read(const struct key *key, char __user *buffer, size_t buflen) in user_read() argument 200 if (buffer && buflen > 0) { in user_read() 204 if (copy_to_user(buffer, upayload->data, buflen) != 0) in user_read()
|
D | keyctl.c | 501 char __user *buffer, in keyctl_describe_key() argument 553 if (buffer && buflen > 0) { in keyctl_describe_key() 557 if (copy_to_user(buffer, tmpbuf, buflen) != 0) in keyctl_describe_key() 672 long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) in keyctl_read_key() argument 712 ret = key->type->read(key, buffer, buflen); in keyctl_read_key() 938 static long copy_from_user_iovec(void *buffer, const struct iovec *iov, in copy_from_user_iovec() argument 942 if (copy_from_user(buffer, iov->iov_base, iov->iov_len) != 0) in copy_from_user_iovec() 944 buffer += iov->iov_len; in copy_from_user_iovec() 1361 char __user *buffer, in keyctl_get_security() argument 1392 if (buffer && buflen > 0 && in keyctl_get_security() [all …]
|
D | request_key_auth.c | 71 char __user *buffer, size_t buflen) in request_key_auth_read() argument 81 if (buffer && buflen > 0) { in request_key_auth_read() 85 if (copy_to_user(buffer, rka->callout_info, buflen) != 0) in request_key_auth_read()
|
D | keyring.c | 66 char __user *buffer, size_t buflen); 195 char __user *buffer, size_t buflen) in keyring_read() argument 208 if (buffer && buflen > 0) { in keyring_read() 223 if (copy_to_user(buffer, in keyring_read() 231 buffer += tmp; in keyring_read()
|
D | internal.h | 221 extern long keyctl_get_security(key_serial_t keyid, char __user *buffer,
|
/security/ |
D | min_addr.c | 32 void __user *buffer, size_t *lenp, loff_t *ppos) in mmap_min_addr_handler() argument 39 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); in mmap_min_addr_handler()
|
D | device_cgroup.c | 329 int filetype, const char *buffer) in devcgroup_update_access() argument 340 b = buffer; in devcgroup_update_access() 423 const char *buffer) in devcgroup_access_write() argument 429 cft->private, buffer); in devcgroup_access_write()
|
D | security.c | 628 int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool all… in security_inode_getsecurity() argument 632 return security_ops->inode_getsecurity(inode, name, buffer, alloc); in security_inode_getsecurity() 642 int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) in security_inode_listsecurity() argument 646 return security_ops->inode_listsecurity(inode, buffer, buffer_size); in security_inode_listsecurity()
|
/security/apparmor/include/ |
D | path.h | 29 int aa_path_name(struct path *path, int flags, char **buffer,
|
D | apparmor.h | 68 void kvfree(void *buffer);
|
/security/keys/encrypted-keys/ |
D | encrypted.c | 892 static long encrypted_read(const struct key *key, char __user *buffer, in encrypted_read() argument 911 if (!buffer || buflen < asciiblob_len) in encrypted_read() 939 if (copy_to_user(buffer, ascii_buf, asciiblob_len) != 0) in encrypted_read()
|