Home
last modified time | relevance | path

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

12

/security/apparmor/
Dmount.c317 const struct path *mntpath, char *buffer, in match_mnt_path_str() argument
328 AA_BUG(!buffer); in match_mnt_path_str()
333 error = aa_path_name(mntpath, path_flags(profile, mntpath), buffer, in match_mnt_path_str()
374 char *buffer, const struct path *devpath, char *devbuffer, in match_mnt() argument
395 return match_mnt_path_str(profile, path, buffer, devname, type, flags, in match_mnt()
403 char *buffer = NULL; in aa_remount() local
412 buffer = aa_get_buffer(false); in aa_remount()
413 if (!buffer) in aa_remount()
416 match_mnt(profile, path, buffer, NULL, NULL, NULL, in aa_remount()
418 aa_put_buffer(buffer); in aa_remount()
[all …]
Dfile.c158 const struct path *path, int flags, char *buffer, in path_name() argument
165 error = aa_path_name(path, flags, buffer, name, &info, in path_name()
285 const struct path *path, char *buffer, u32 request, in profile_path_perm() argument
296 flags | profile->path_flags, buffer, &name, cond, in profile_path_perm()
321 char *buffer = NULL; in aa_path_perm() local
326 buffer = aa_get_buffer(false); in aa_path_perm()
327 if (!buffer) in aa_path_perm()
330 profile_path_perm(op, profile, path, buffer, request, in aa_path_perm()
333 aa_put_buffer(buffer); in aa_path_perm()
359 const struct path *link, char *buffer, in profile_path_link() argument
[all …]
Dpath.c25 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()
Dlsm.c49 char buffer[1]; member
1277 static int param_get_aabool(char *buffer, const struct kernel_param *kp);
1286 static int param_get_aauint(char *buffer, const struct kernel_param *kp);
1295 static int param_get_aacompressionlevel(char *buffer,
1304 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
1313 static int param_get_audit(char *buffer, const struct kernel_param *kp);
1316 static int param_get_mode(char *buffer, const struct kernel_param *kp);
1378 static int param_get_aaintbool(char *buffer, const struct kernel_param *kp);
1410 static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp) in param_get_aalockpolicy() argument
1416 return param_get_bool(buffer, kp); in param_get_aalockpolicy()
[all …]
Ddomain.c626 char *buffer, struct path_cond *cond, in profile_transition() argument
638 AA_BUG(!buffer); in profile_transition()
640 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer, in profile_transition()
724 char *buffer, struct path_cond *cond, in profile_onexec() argument
735 AA_BUG(!buffer); in profile_onexec()
747 error = aa_path_name(&bprm->file->f_path, profile->path_flags, buffer, in profile_onexec()
797 char *buffer, struct path_cond *cond, in handle_onexec() argument
807 AA_BUG(!buffer); in handle_onexec()
812 bprm, buffer, cond, unsafe)); in handle_onexec()
817 profile_transition(profile, bprm, buffer, in handle_onexec()
[all …]
Dnet.c113 __be16 buffer[2]; in aa_profile_af_perm() local
124 buffer[0] = cpu_to_be16(family); in aa_profile_af_perm()
125 buffer[1] = cpu_to_be16((u16) type); in aa_profile_af_perm()
126 state = aa_dfa_match_len(profile->policy.dfa, state, (char *) &buffer, in aa_profile_af_perm()
/security/tomoyo/
Drealpath.c94 static char *tomoyo_get_absolute_path(const struct path *path, char * const buffer, in tomoyo_get_absolute_path() argument
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()
125 static char *tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer, in tomoyo_get_dentry_path() argument
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()
[all …]
Daudit.c26 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 …]
Dutil.c226 void tomoyo_print_ulong(char *buffer, const int buffer_len, in tomoyo_print_ulong() argument
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()
406 void tomoyo_normalize_line(unsigned char *buffer) in tomoyo_normalize_line() argument
408 unsigned char *sp = buffer; in tomoyo_normalize_line()
409 unsigned char *dp = buffer; in tomoyo_normalize_line()
585 bool tomoyo_domain_def(const unsigned char *buffer) in tomoyo_domain_def() argument
590 if (*buffer != '<') in tomoyo_domain_def()
[all …]
Dcommon.c196 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 …]
/security/keys/
Dcompat_dh.c17 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()
Ddh.c200 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()
Dbig_key.c228 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()
269 memcpy(buffer, buf, datalen); in big_key_read()
277 memcpy(buffer, key->payload.data[big_key_data], datalen); in big_key_read()
Duser_defined.c171 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()
Dkeyctl.c645 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()
803 static long __keyctl_read_key(struct key *key, char *buffer, size_t buflen) in __keyctl_read_key() argument
810 ret = key->type->read(key, buffer, buflen); in __keyctl_read_key()
825 long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) in keyctl_read_key() argument
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
[all …]
Dinternal.h266 extern long keyctl_get_security(key_serial_t keyid, char __user *buffer,
294 char __user *buffer, size_t buflen,
301 char __user *buffer, size_t buflen, in keyctl_dh_compute() argument
310 char __user *buffer, size_t buflen, in compat_keyctl_dh_compute() argument
Drequest_key_auth.c83 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/
Dima_template_lib.c278 u8 buffer[CRYPTO_MAX_ALG_NAME + 2 + IMA_MAX_DIGEST_SIZE] = { 0 }; in ima_eventdigest_init_common() local
284 offset += snprintf(buffer, CRYPTO_MAX_ALG_NAME + 1, "%s", in ima_eventdigest_init_common()
286 buffer[offset] = ':'; in ima_eventdigest_init_common()
291 memcpy(buffer + offset, digest, digestsize); in ima_eventdigest_init_common()
300 return ima_write_template_field_data(buffer, offset + digestsize, in ima_eventdigest_init_common()
630 u8 *buffer = NULL; in ima_eventinodexattrs_init_common() local
641 buffer = kmalloc(rc, GFP_KERNEL); in ima_eventinodexattrs_init_common()
642 if (!buffer) in ima_eventinodexattrs_init_common()
645 rc = evm_read_protected_xattrs(file_dentry(event_data->file), buffer, in ima_eventinodexattrs_init_common()
652 rc = ima_write_template_field_data((char *)buffer, rc, DATA_FMT_HEX, in ima_eventinodexattrs_init_common()
[all …]
Dima_kexec.c18 static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer, in ima_dump_measurement_list() argument
69 *buffer = file.buf; in ima_dump_measurement_list()
118 kbuf.buffer = kexec_buffer; in ima_add_kexec_buffer()
/security/
Dmin_addr.c33 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/integrity/evm/
Devm_main.c338 int evm_read_protected_xattrs(struct dentry *dentry, u8 *buffer, in evm_read_protected_xattrs() argument
355 if (buffer) { in evm_read_protected_xattrs()
357 *(buffer + total_size - 1) = '|'; in evm_read_protected_xattrs()
359 memcpy(buffer + total_size, xattr->name, size); in evm_read_protected_xattrs()
364 if (buffer) { in evm_read_protected_xattrs()
368 *(u32 *)(buffer + total_size) = rc; in evm_read_protected_xattrs()
373 if (buffer) { in evm_read_protected_xattrs()
376 buffer + total_size, in evm_read_protected_xattrs()
/security/keys/trusted-keys/
Dtrusted_tpm1.c170 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()
228 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 …]
Dtrusted_tpm2.c153 char buffer[50]; in tpm2_key_type() local
155 sprint_oid(value, vlen, buffer, sizeof(buffer)); in tpm2_key_type()
157 buffer); in tpm2_key_type()
Dtrusted_core.c282 static long trusted_read(const struct key *key, char *buffer, in trusted_read() argument
293 if (buffer && buflen >= 2 * p->blob_len) { in trusted_read()
294 bufp = buffer; in trusted_read()
/security/apparmor/include/
Dpath.h24 int aa_path_name(const struct path *path, int flags, char *buffer,

12