Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 31) sorted by relevance

12

/security/tomoyo/
Drealpath.c92 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 …]
Daudit.c25 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 …]
Dutil.c236 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 …]
Dcommon.c195 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 …]
Dcommon.h925 bool tomoyo_domain_def(const unsigned char *buffer);
1015 ssize_t tomoyo_read_control(struct tomoyo_io_buffer *head, char __user *buffer,
1018 const char __user *buffer, const int buffer_len);
1045 void tomoyo_normalize_line(unsigned char *buffer);
1049 void tomoyo_print_ulong(char *buffer, const int buffer_len,
Dnetwork.c89 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()
Dfile.c215 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/apparmor/
Dpath.c30 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()
161 static int get_name_to_buffer(struct path *path, int flags, char *buffer, 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()
207 int aa_path_name(struct path *path, int flags, char **buffer, const char **name, in aa_path_name() argument
215 *buffer = NULL; in aa_path_name()
232 *buffer = buf; in aa_path_name()
Dlib.c91 void *buffer = NULL; in __aa_kvmalloc() local
98 buffer = kmalloc(size, flags | GFP_NOIO | __GFP_NOWARN); in __aa_kvmalloc()
99 if (!buffer) { in __aa_kvmalloc()
101 buffer = vzalloc(size); in __aa_kvmalloc()
103 buffer = vmalloc(size); in __aa_kvmalloc()
105 return buffer; in __aa_kvmalloc()
Dlsm.c668 static int param_get_aabool(char *buffer, const struct kernel_param *kp);
677 static int param_get_aauint(char *buffer, const struct kernel_param *kp);
685 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
694 static int param_get_audit(char *buffer, struct kernel_param *kp);
697 static int param_get_mode(char *buffer, struct kernel_param *kp);
772 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp) in param_get_aalockpolicy() argument
776 return param_get_bool(buffer, kp); in param_get_aalockpolicy()
786 static int param_get_aabool(char *buffer, const struct kernel_param *kp) in param_get_aabool() argument
790 return param_get_bool(buffer, kp); in param_get_aabool()
800 static int param_get_aauint(char *buffer, const struct kernel_param *kp) in param_get_aauint() argument
[all …]
Dfile.c281 char *buffer = NULL; in aa_path_perm() local
287 error = aa_path_name(path, flags, &buffer, &name, &info); in aa_path_perm()
305 kfree(buffer); in aa_path_perm()
357 char *buffer = NULL, *buffer2 = NULL; in aa_path_link() local
367 error = aa_path_name(&link, profile->path_flags, &buffer, &lname, in aa_path_link()
433 kfree(buffer); in aa_path_link()
Ddomain.c342 char *buffer = NULL; in apparmor_bprm_set_creds() local
369 error = aa_path_name(&bprm->file->f_path, profile->path_flags, &buffer, in apparmor_bprm_set_creds()
521 kfree(buffer); in apparmor_bprm_set_creds()
/security/keys/
Dtrusted.h16 #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
Dbig_key.c169 long big_key_read(const struct key *key, char __user *buffer, size_t buflen) in big_key_read() argument
174 if (!buffer || buflen < datalen) in big_key_read()
187 ret = vfs_read(file, buffer, datalen, &pos); in big_key_read()
193 if (copy_to_user(buffer, key->payload.data, datalen) != 0) in big_key_read()
Dtrusted.c174 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 …]
Duser_defined.c187 long user_read(const struct key *key, char __user *buffer, size_t buflen) in user_read() argument
196 if (buffer && buflen > 0) { in user_read()
200 if (copy_to_user(buffer, upayload->data, buflen) != 0) in user_read()
Dkeyctl.c567 char __user *buffer, in keyctl_describe_key() argument
614 if (buffer && buflen >= ret) { in keyctl_describe_key()
615 if (copy_to_user(buffer, infobuf, infolen) != 0 || in keyctl_describe_key()
616 copy_to_user(buffer + infolen, key->description, in keyctl_describe_key()
732 long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) in keyctl_read_key() argument
778 ret = key->type->read(key, buffer, buflen); in keyctl_read_key()
1013 static long copy_from_user_iovec(void *buffer, const struct iovec *iov, in copy_from_user_iovec() argument
1017 if (copy_from_user(buffer, iov->iov_base, iov->iov_len) != 0) in copy_from_user_iovec()
1019 buffer += iov->iov_len; in copy_from_user_iovec()
1433 char __user *buffer, in keyctl_get_security() argument
[all …]
Drequest_key_auth.c85 char __user *buffer, size_t buflen) in request_key_auth_read() argument
95 if (buffer && buflen > 0) { in request_key_auth_read()
99 if (copy_to_user(buffer, rka->callout_info, buflen) != 0) in request_key_auth_read()
Dkeyring.c84 char __user *buffer, size_t buflen);
421 key_serial_t __user *buffer; member
436 ret = put_user(key->serial, ctx->buffer); in keyring_read_iterator()
439 ctx->buffer++; in keyring_read_iterator()
452 char __user *buffer, size_t buflen) in keyring_read() argument
463 if (buffer && buflen) { in keyring_read()
464 ctx.buffer = (key_serial_t __user *)buffer; in keyring_read()
/security/
Dmin_addr.c32 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()
/security/integrity/ima/
Dima_template_lib.c170 u8 buffer[CRYPTO_MAX_ALG_NAME + 2 + IMA_MAX_DIGEST_SIZE] = { 0 }; in ima_eventdigest_init_common() local
176 offset += snprintf(buffer, CRYPTO_MAX_ALG_NAME + 1, "%s", in ima_eventdigest_init_common()
178 buffer[offset] = ':'; in ima_eventdigest_init_common()
183 memcpy(buffer + offset, digest, digestsize); in ima_eventdigest_init_common()
192 return ima_write_template_field_data(buffer, offset + digestsize, in ima_eventdigest_init_common()
Dima_crypto.c506 u8 buffer[IMA_EVENT_NAME_LEN_MAX + 1] = { 0 }; in ima_calc_field_array_hash_tfm() local
517 memcpy(buffer, data_to_hash, datalen); in ima_calc_field_array_hash_tfm()
518 data_to_hash = buffer; in ima_calc_field_array_hash_tfm()
/security/apparmor/include/
Dpath.h29 int aa_path_name(struct path *path, int flags, char **buffer,
/security/yama/
Dyama_lsm.c380 void __user *buffer, size_t *lenp, loff_t *ppos) in yama_dointvec_minmax() argument
387 rc = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in yama_dointvec_minmax()
/security/smack/
Dsmack_lsm.c212 char *buffer; in smk_fetch() local
218 buffer = kzalloc(SMK_LONGLABEL, GFP_KERNEL); in smk_fetch()
219 if (buffer == NULL) in smk_fetch()
222 rc = ip->i_op->getxattr(dp, name, buffer, SMK_LONGLABEL); in smk_fetch()
224 skp = smk_import_entry(buffer, rc); in smk_fetch()
226 kfree(buffer); in smk_fetch()
1237 const char *name, void **buffer, in smack_inode_getsecurity() argument
1271 *buffer = kstrdup(isp->smk_known, GFP_KERNEL); in smack_inode_getsecurity()
1272 if (*buffer == NULL) in smack_inode_getsecurity()
1288 static int smack_inode_listsecurity(struct inode *inode, char *buffer, in smack_inode_listsecurity() argument
[all …]

12