Searched defs:buffer (Results 1 - 25 of 27) sorted by relevance

12

/security/apparmor/
H A Dlib.c84 * Return: allocated buffer or NULL if failed
91 void *buffer = NULL; local
98 buffer = kmalloc(size, flags | GFP_NOIO | __GFP_NOWARN);
99 if (!buffer) {
101 buffer = vzalloc(size);
103 buffer = vmalloc(size);
105 return buffer;
H A Dpath.c30 static int prepend(char **buffer, int buflen, const char *str, int namelen) argument
35 *buffer -= namelen;
36 memcpy(*buffer, str, namelen);
45 * @buf: buffer to store path to (NOT NULL)
152 * get_name_to_buffer - get the pathname to a buffer ensure dir / is appended
155 * @buffer: buffer to put name in (NOT NULL)
156 * @size: size of buffer
157 * @name: Returns - contains position of path name in @buffer (NOT NULL)
161 static int get_name_to_buffer(struct path *path, int flags, char *buffer, argument
207 aa_path_name(struct path *path, int flags, char **buffer, const char **name, const char **info) argument
[all...]
H A Dfile.c27 * @buffer: buffer to write string to (NOT NULL)
281 char *buffer = NULL; local
287 error = aa_path_name(path, flags, &buffer, &name, &info);
305 kfree(buffer);
357 char *buffer = NULL, *buffer2 = NULL; local
366 /* buffer freed below, lname is pointer in buffer */
367 error = aa_path_name(&link, profile->path_flags, &buffer, &lname,
433 kfree(buffer);
[all...]
H A Ddomain.c342 char *buffer = NULL; local
368 /* buffer freed below, name is pointer into buffer */
369 error = aa_path_name(&bprm->file->f_path, profile->path_flags, &buffer,
521 kfree(buffer);
H A Dlsm.c542 /* args points to a PAGE_SIZE buffer, AppArmor requires that
543 * the buffer must be null terminated or have size <= PAGE_SIZE -1
668 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) argument
776 return param_get_bool(buffer, kp);
786 static int param_get_aabool(char *buffer, cons argument
800 param_get_aauint(char *buffer, const struct kernel_param *kp) argument
807 param_get_audit(char *buffer, struct kernel_param *kp) argument
840 param_get_mode(char *buffer, struct kernel_param *kp) argument
[all...]
/security/
H A Dmin_addr.c32 void __user *buffer, size_t *lenp, loff_t *ppos)
39 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
31 mmap_min_addr_handler(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) argument
H A Ddevice_cgroup.c604 int filetype, char *buffer)
616 b = buffer;
603 devcgroup_update_access(struct dev_cgroup *devcgroup, int filetype, char *buffer) argument
H A Dcapability.c246 void **buffer, bool alloc)
257 static int cap_inode_listsecurity(struct inode *inode, char *buffer, argument
245 cap_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc) argument
H A Dsecurity.c679 int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc) argument
683 return security_ops->inode_getsecurity(inode, name, buffer, alloc);
693 int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) argument
697 return security_ops->inode_listsecurity(inode, buffer, buffer_size);
/security/keys/
H A Dbig_key.c92 /* Just store the data in a buffer */
169 long big_key_read(const struct key *key, char __user *buffer, size_t buflen) argument
174 if (!buffer || buflen < datalen)
187 ret = vfs_read(file, buffer, datalen, &pos);
193 if (copy_to_user(buffer, key->payload.data, datalen) != 0)
H A Duser_defined.c184 long user_read(const struct key *key, char __user *buffer, size_t buflen) argument
193 if (buffer && buflen > 0) {
197 if (copy_to_user(buffer, upayload->data, buflen) != 0)
H A Drequest_key_auth.c85 char __user *buffer, size_t buflen)
95 if (buffer && buflen > 0) {
99 if (copy_to_user(buffer, rka->callout_info, buflen) != 0)
84 request_key_auth_read(const struct key *key, char __user *buffer, size_t buflen) argument
H A Dkeyctl.c553 * If there's a buffer, we place up to buflen bytes of data into it formatted
559 * of how much we may have copied into the buffer.
562 char __user *buffer,
609 if (buffer && buflen >= ret) {
610 if (copy_to_user(buffer, infobuf, infolen) != 0 ||
611 copy_to_user(buffer + infolen, key->description,
723 * If successful, we place up to buflen bytes of data into the buffer, if one
725 * irrespective of how much we copied into the buffer.
727 long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen) argument
767 ret = key->type->read(key, buffer, bufle
561 keyctl_describe_key(key_serial_t keyid, char __user *buffer, size_t buflen) argument
1003 copy_from_user_iovec(void *buffer, const struct iovec *iov, unsigned ioc) argument
1425 keyctl_get_security(key_serial_t keyid, char __user *buffer, size_t buflen) argument
[all...]
H A Dkeyring.c84 char __user *buffer, size_t buflen);
421 key_serial_t __user *buffer; member in struct:keyring_read_iterator_context
436 ret = put_user(key->serial, ctx->buffer);
439 ctx->buffer++;
452 char __user *buffer, size_t buflen)
470 if (!buffer || !buflen)
476 /* Copy the IDs of the subscribed keys into the buffer */
477 ctx.buffer = (key_serial_t __user *)buffer;
451 keyring_read(const struct key *keyring, char __user *buffer, size_t buflen) argument
H A Dtrusted.c174 static int TSS_checkhmac1(unsigned char *buffer, argument
195 bufsize = LOAD32(buffer, TPM_SIZE_OFFSET);
196 tag = LOAD16(buffer, 0);
198 result = LOAD32N(buffer, TPM_RETURN_OFFSET);
203 authdata = buffer + bufsize - SHA1_DIGEST_SIZE;
229 ret = crypto_shash_update(&sdesc->shash, buffer + dpos, dlen);
255 static int TSS_checkhmac2(unsigned char *buffer, argument
282 bufsize = LOAD32(buffer, TPM_SIZE_OFFSET);
283 tag = LOAD16(buffer, 0);
285 result = LOAD32N(buffer, TPM_RETURN_OFFSE
1054 trusted_read(const struct key *key, char __user *buffer, size_t buflen) argument
[all...]
/security/tomoyo/
H A Drealpath.c85 * @buffer: Pointer to buffer to return value in.
86 * @buflen: Sizeof @buffer.
88 * Returns the buffer on success, an error code otherwise.
92 static char *tomoyo_get_absolute_path(struct path *path, char * const buffer, argument
98 pos = d_absolute_path(path, buffer, buflen - 1);
102 buffer[buflen - 2] = '/';
103 buffer[buflen - 1] = '\0';
114 * @buffer: Pointer to buffer t
121 tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer, const int buflen) argument
147 tomoyo_get_local_path(struct dentry *dentry, char * const buffer, const int buflen) argument
219 tomoyo_get_socket_name(struct path *path, char * const buffer, const int buflen) argument
[all...]
H A Daudit.c25 char *buffer = kzalloc(tomoyo_buffer_len, GFP_NOFS); local
34 if (!buffer)
36 len = snprintf(buffer, tomoyo_buffer_len - 1, "argv[]={ ");
37 cp = buffer + len;
53 if (cp >= buffer + tomoyo_buffer_len - 32) {
101 return buffer;
103 snprintf(buffer, tomoyo_buffer_len - 1,
105 return buffer;
153 char *buffer = kmalloc(tomoyo_buffer_len, GFP_NOFS); local
156 if (!buffer)
[all...]
H A Dfile.c215 char buffer[64]; local
231 tomoyo_print_ulong(buffer, sizeof(buffer), r->param.path_number.number,
235 r->param.path_number.filename->name, buffer);
H A Dnetwork.c82 * @buffer: Buffer to write to.
83 * @buffer_len: Size of @buffer.
89 static void tomoyo_print_ipv4(char *buffer, const unsigned int buffer_len, argument
92 snprintf(buffer, buffer_len, "%pI4%c%pI4", min_ip,
99 * @buffer: Buffer to write to.
100 * @buffer_len: Size of @buffer.
106 static void tomoyo_print_ipv6(char *buffer, const unsigned int buffer_len, argument
110 snprintf(buffer, buffer_len, "%pI6c%c%pI6c", min_ip,
H A Dutil.c229 * @buffer: Pointer to buffer.
230 * @buffer_len: Size of @buffer.
236 void tomoyo_print_ulong(char *buffer, const int buffer_len, argument
240 snprintf(buffer, buffer_len, "%lu", value);
242 snprintf(buffer, buffer_len, "0%lo", value);
244 snprintf(buffer, buffer_len, "0x%lX", value);
246 snprintf(buffer, buffer_len, "type(%u)", type);
407 * @buffer: The line to normalize.
414 void tomoyo_normalize_line(unsigned char *buffer) argument
571 tomoyo_domain_def(const unsigned char *buffer) argument
[all...]
H A Dcommon.c189 * @buffer: Buffer to write to. Must be '\0'-terminated.
190 * @len: Size of @buffer.
195 static void tomoyo_addprintf(char *buffer, int len, const char *fmt, ...) argument
198 const int pos = strlen(buffer);
200 vsnprintf(buffer + pos, len - pos - 1, fmt, args);
205 * tomoyo_flush - Flush queued string to userspace's buffer.
434 char buffer[128]; local
435 buffer[0] = '\0';
439 tomoyo_addprintf(buffer, sizeof(buffer),
1771 char buffer[128]; local
1938 char *buffer; local
2511 tomoyo_read_control(struct tomoyo_io_buffer *head, char __user *buffer, const int buffer_len) argument
2583 tomoyo_write_control(struct tomoyo_io_buffer *head, const char __user *buffer, const int buffer_len) argument
[all...]
/security/integrity/ima/
H A Dima_template_lib.c169 u8 buffer[CRYPTO_MAX_ALG_NAME + 2 + IMA_MAX_DIGEST_SIZE] = { 0 }; local
175 offset += snprintf(buffer, CRYPTO_MAX_ALG_NAME + 1, "%s",
177 buffer[offset] = ':';
182 memcpy(buffer + offset, digest, digestsize);
191 return ima_write_template_field_data(buffer, offset + digestsize,
H A Dima_crypto.c65 MODULE_PARM_DESC(ahash_bufsize, "Maximum ahash buffer size");
192 * @size: Size of allocated buffer.
299 /* Only allocate one buffer if that is enough. */
302 * Try to allocate secondary buffer. If that fails fallback to
325 /* read buffer */
506 u8 buffer[IMA_EVENT_NAME_LEN_MAX + 1] = { 0 }; local
517 memcpy(buffer, data_to_hash, datalen);
518 data_to_hash = buffer;
/security/yama/
H A Dyama_lsm.c380 void __user *buffer, size_t *lenp, loff_t *ppos)
387 rc = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
379 yama_dointvec_minmax(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) argument
/security/keys/encrypted-keys/
H A Dencrypted.c894 static long encrypted_read(const struct key *key, char __user *buffer, argument
913 if (!buffer || buflen < asciiblob_len)
941 if (copy_to_user(buffer, ascii_buf, asciiblob_len) != 0)

Completed in 1724 milliseconds

12