Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 116) sorted by relevance

12345

/linux-4.19.296/fs/
Dd_path.c11 static int prepend(char **buffer, int *buflen, const char *str, int namelen) in prepend() argument
13 *buflen -= namelen; in prepend()
14 if (*buflen < 0) in prepend()
38 static int prepend_name(char **buffer, int *buflen, const struct qstr *name) in prepend_name() argument
44 *buflen -= dlen + 1; in prepend_name()
45 if (*buflen < 0) in prepend_name()
77 char **buffer, int *buflen) in prepend_path() argument
94 blen = *buflen; in prepend_path()
108 blen = *buflen; in prepend_path()
154 *buflen = blen; in prepend_path()
[all …]
/linux-4.19.296/lib/crypto/
Dblake2s.c24 const size_t fill = BLAKE2S_BLOCK_SIZE - state->buflen; in blake2s_update()
29 memcpy(state->buf + state->buflen, in, fill); in blake2s_update()
32 state->buflen = 0; in blake2s_update()
44 memcpy(state->buf + state->buflen, in, inlen); in blake2s_update()
45 state->buflen += inlen; in blake2s_update()
53 memset(state->buf + state->buflen, 0, in blake2s_final()
54 BLAKE2S_BLOCK_SIZE - state->buflen); /* Padding */ in blake2s_final()
55 blake2s_compress_generic(state, state->buf, 1, state->buflen); in blake2s_final()
/linux-4.19.296/block/partitions/
Dldm.c635 static int ldm_relative(const u8 *buffer, int buflen, int base, int offset) in ldm_relative() argument
639 if (!buffer || offset < 0 || base > buflen) { in ldm_relative()
644 if (base > buflen) in ldm_relative()
645 ldm_error("base (%d) > buflen (%d)", base, buflen); in ldm_relative()
648 if (base + buffer[base] >= buflen) { in ldm_relative()
650 buffer[base], buflen); in ldm_relative()
706 static int ldm_get_vstr (const u8 *block, u8 *buffer, int buflen) in ldm_get_vstr() argument
713 if (length >= buflen) { in ldm_get_vstr()
714 ldm_error ("Truncating string %d -> %d.", length, buflen); in ldm_get_vstr()
715 length = buflen - 1; in ldm_get_vstr()
[all …]
/linux-4.19.296/fs/9p/
Dvfs_dir.c86 static struct p9_rdir *v9fs_alloc_rdir_buf(struct file *filp, int buflen) in v9fs_alloc_rdir_buf() argument
90 fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL); in v9fs_alloc_rdir_buf()
107 int buflen; in v9fs_dir_readdir() local
114 buflen = fid->clnt->msize - P9_IOHDRSZ; in v9fs_dir_readdir()
116 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir()
120 kvec.iov_len = buflen; in v9fs_dir_readdir()
126 iov_iter_kvec(&to, READ | ITER_KVEC, &kvec, 1, buflen); in v9fs_dir_readdir()
167 int buflen; in v9fs_dir_readdir_dotl() local
174 buflen = fid->clnt->msize - P9_READDIRHDRSZ; in v9fs_dir_readdir_dotl()
176 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir_dotl()
[all …]
/linux-4.19.296/fs/afs/
Dcache.c17 uint16_t buflen,
46 uint16_t buflen, in afs_vnode_cache_check_aux() argument
54 buffer, buflen); in afs_vnode_cache_check_aux()
59 if (buflen != sizeof(aux)) { in afs_vnode_cache_check_aux()
60 _leave(" = OBSOLETE [len %hx != %zx]", buflen, sizeof(aux)); in afs_vnode_cache_check_aux()
/linux-4.19.296/fs/romfs/
Dstorage.c28 void *buf, size_t buflen) in romfs_mtd_read() argument
33 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read()
34 return (ret < 0 || rlen != buflen) ? -EIO : 0; in romfs_mtd_read()
108 void *buf, size_t buflen) in romfs_blk_read() argument
115 while (buflen > 0) { in romfs_blk_read()
117 segment = min_t(size_t, buflen, ROMBSIZE - offset); in romfs_blk_read()
124 buflen -= segment; in romfs_blk_read()
219 void *buf, size_t buflen) in romfs_dev_read() argument
224 if (pos >= limit || buflen > limit - pos) in romfs_dev_read()
229 return romfs_mtd_read(sb, pos, buf, buflen); in romfs_dev_read()
[all …]
/linux-4.19.296/fs/proc/
Dkcore.c313 read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) in read_kcore() argument
322 size_t orig_buflen = buflen; in read_kcore()
332 if (buflen && *fpos < sizeof(struct elfhdr)) { in read_kcore()
354 tsz = min_t(size_t, buflen, sizeof(struct elfhdr) - *fpos); in read_kcore()
361 buflen -= tsz; in read_kcore()
366 if (buflen && *fpos < phdrs_offset + phdrs_len) { in read_kcore()
399 tsz = min_t(size_t, buflen, phdrs_offset + phdrs_len - *fpos); in read_kcore()
409 buflen -= tsz; in read_kcore()
414 if (buflen && *fpos < notes_offset + notes_len) { in read_kcore()
449 tsz = min_t(size_t, buflen, notes_offset + notes_len - *fpos); in read_kcore()
[all …]
Dvmcore.c285 static ssize_t __read_vmcore(char *buffer, size_t buflen, loff_t *fpos, in __read_vmcore() argument
293 if (buflen == 0 || *fpos >= vmcore_size) in __read_vmcore()
297 if (buflen > vmcore_size - *fpos) in __read_vmcore()
298 buflen = vmcore_size - *fpos; in __read_vmcore()
302 tsz = min(elfcorebuf_sz - (size_t)*fpos, buflen); in __read_vmcore()
305 buflen -= tsz; in __read_vmcore()
311 if (buflen == 0) in __read_vmcore()
332 (size_t)*fpos, buflen); in __read_vmcore()
337 buflen -= tsz; in __read_vmcore()
343 if (!buflen) in __read_vmcore()
[all …]
/linux-4.19.296/fs/nfs/
Dnamespace.c58 ssize_t buflen; in nfs_path() local
61 buflen = buflen_in; in nfs_path()
63 end = buffer+buflen; in nfs_path()
65 buflen--; in nfs_path()
74 buflen -= namelen + 1; in nfs_path()
75 if (buflen < 0) in nfs_path()
89 if (--buflen < 0) { in nfs_path()
110 buflen -= namelen; in nfs_path()
111 if (buflen < 0) { in nfs_path()
Dnfs4namespace.c34 char *buffer, ssize_t buflen) in nfs4_pathname_string() argument
36 char *end = buffer + buflen; in nfs4_pathname_string()
40 buflen--; in nfs4_pathname_string()
45 buflen -= component->len + 1; in nfs4_pathname_string()
46 if (buflen < 0) in nfs4_pathname_string()
84 static char *nfs4_path(struct dentry *dentry, char *buffer, ssize_t buflen) in nfs4_path() argument
87 char *path = nfs_path(&limit, dentry, buffer, buflen, in nfs4_path()
Dnfs4idmap.c172 static int nfs_map_numeric_to_string(__u32 id, char *buf, size_t buflen) in nfs_map_numeric_to_string() argument
174 return snprintf(buf, buflen, "%u", id); in nfs_map_numeric_to_string()
341 size_t buflen, struct idmap *idmap) in nfs_idmap_lookup_name() argument
348 ret = nfs_idmap_get_key(id_str, id_len, type, buf, buflen, idmap); in nfs_idmap_lookup_name()
765 int nfs_map_uid_to_name(const struct nfs_server *server, kuid_t uid, char *buf, size_t buflen) in nfs_map_uid_to_name() argument
773 ret = nfs_idmap_lookup_name(id, "user", buf, buflen, idmap); in nfs_map_uid_to_name()
775 ret = nfs_map_numeric_to_string(id, buf, buflen); in nfs_map_uid_to_name()
779 int nfs_map_gid_to_group(const struct nfs_server *server, kgid_t gid, char *buf, size_t buflen) in nfs_map_gid_to_group() argument
787 ret = nfs_idmap_lookup_name(id, "group", buf, buflen, idmap); in nfs_map_gid_to_group()
789 ret = nfs_map_numeric_to_string(id, buf, buflen); in nfs_map_gid_to_group()
/linux-4.19.296/crypto/
Dpoly1305_generic.c42 dctx->buflen = 0; in crypto_poly1305_init()
175 if (unlikely(dctx->buflen)) { in crypto_poly1305_update()
176 bytes = min(srclen, POLY1305_BLOCK_SIZE - dctx->buflen); in crypto_poly1305_update()
177 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_update()
180 dctx->buflen += bytes; in crypto_poly1305_update()
182 if (dctx->buflen == POLY1305_BLOCK_SIZE) { in crypto_poly1305_update()
185 dctx->buflen = 0; in crypto_poly1305_update()
196 dctx->buflen = srclen; in crypto_poly1305_update()
215 if (unlikely(dctx->buflen)) { in crypto_poly1305_final()
216 dctx->buf[dctx->buflen++] = 1; in crypto_poly1305_final()
[all …]
Ddrbg.c594 unsigned char *buf, unsigned int buflen, in drbg_ctr_generate() argument
598 int len = min_t(int, buflen, INT_MAX); in drbg_ctr_generate()
707 unsigned int buflen, in drbg_hmac_generate() argument
724 while (len < buflen) { in drbg_hmac_generate()
730 outlen = (drbg_blocklen(drbg) < (buflen - len)) ? in drbg_hmac_generate()
731 drbg_blocklen(drbg) : (buflen - len); in drbg_hmac_generate()
936 unsigned int buflen) in drbg_hash_hashgen() argument
950 while (len < buflen) { in drbg_hash_hashgen()
958 outlen = (drbg_blocklen(drbg) < (buflen - len)) ? in drbg_hash_hashgen()
959 drbg_blocklen(drbg) : (buflen - len); in drbg_hash_hashgen()
[all …]
/linux-4.19.296/lib/
Dscatterlist.c140 void sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) in sg_init_one() argument
143 sg_set_buf(sg, buf, buflen); in sg_init_one()
807 size_t buflen, off_t skip, bool to_buffer) in sg_copy_buffer() argument
823 while ((offset < buflen) && sg_miter_next(&miter)) { in sg_copy_buffer()
826 len = min(miter.length, buflen - offset); in sg_copy_buffer()
853 const void *buf, size_t buflen) in sg_copy_from_buffer() argument
855 return sg_copy_buffer(sgl, nents, (void *)buf, buflen, 0, false); in sg_copy_from_buffer()
870 void *buf, size_t buflen) in sg_copy_to_buffer() argument
872 return sg_copy_buffer(sgl, nents, buf, buflen, 0, true); in sg_copy_to_buffer()
888 const void *buf, size_t buflen, off_t skip) in sg_pcopy_from_buffer() argument
[all …]
Dtest_hexdump.c160 static void __init test_hexdump_overflow(size_t buflen, size_t len, in test_hexdump_overflow() argument
174 r = hex_dump_to_buffer(data_b, len, rs, gs, buf, buflen, ascii); in test_hexdump_overflow()
188 f = min_t(int, e + 1, buflen); in test_hexdump_overflow()
189 if (buflen) { in test_hexdump_overflow()
201 len, buflen, strnlen(buf, sizeof(buf))); in test_hexdump_overflow()
208 static void __init test_hexdump_overflow_set(size_t buflen, bool ascii) in test_hexdump_overflow_set() argument
217 test_hexdump_overflow(buflen, rounddown(len, gs), rs, gs, ascii); in test_hexdump_overflow_set()
Dkobject_uevent.c253 int buffer_size = sizeof(env->buf) - env->buflen; in init_uevent_argv()
256 len = strlcpy(&env->buf[env->buflen], subsystem, buffer_size); in init_uevent_argv()
264 env->argv[1] = &env->buf[env->buflen]; in init_uevent_argv()
267 env->buflen += len + 1; in init_uevent_argv()
289 skb = alloc_skb(len + env->buflen, GFP_KERNEL); in alloc_uevent_skb()
297 skb_put_data(skb, env->buf, env->buflen); in alloc_uevent_skb()
434 env->buflen - len); in zap_modalias_env()
441 env->buflen -= len; in zap_modalias_env()
663 len = vsnprintf(&env->buf[env->buflen], in add_uevent_var()
664 sizeof(env->buf) - env->buflen, in add_uevent_var()
[all …]
Dbitmap.c361 int __bitmap_parse(const char *buf, unsigned int buflen, in __bitmap_parse() argument
377 while (buflen) { in __bitmap_parse()
385 buflen--; in __bitmap_parse()
426 } while (buflen && c == ','); in __bitmap_parse()
513 static int __bitmap_parselist(const char *buf, unsigned int buflen, in __bitmap_parselist() argument
535 while (buflen) { in __bitmap_parselist()
542 buflen--; in __bitmap_parselist()
619 } while (buflen && c == ','); in __bitmap_parselist()
/linux-4.19.296/include/linux/
Dscatterlist.h140 unsigned int buflen) in sg_set_buf() argument
145 sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); in sg_set_buf()
294 size_t buflen, off_t skip, bool to_buffer);
297 const void *buf, size_t buflen);
299 void *buf, size_t buflen);
302 const void *buf, size_t buflen, off_t skip);
304 void *buf, size_t buflen, off_t skip);
306 size_t buflen, off_t skip);
Dcgroup.h118 int task_cgroup_path(struct task_struct *task, char *buf, size_t buflen);
653 static inline int cgroup_name(struct cgroup *cgrp, char *buf, size_t buflen) in cgroup_name() argument
655 return kernfs_name(cgrp->kn, buf, buflen); in cgroup_name()
658 static inline int cgroup_path(struct cgroup *cgrp, char *buf, size_t buflen) in cgroup_path() argument
660 return kernfs_path(cgrp->kn, buf, buflen); in cgroup_path()
698 char *buf, size_t buflen);
734 char *buf, size_t buflen) {} in cgroup_path_from_kernfs_id() argument
863 int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen,
Dkernfs.h305 int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen);
307 char *buf, size_t buflen);
377 static inline int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen) in kernfs_name() argument
382 char *buf, size_t buflen) in kernfs_path_from_node() argument
486 static inline int kernfs_path(struct kernfs_node *kn, char *buf, size_t buflen) in kernfs_path() argument
488 return kernfs_path_from_node(kn, NULL, buf, buflen); in kernfs_path()
/linux-4.19.296/drivers/cdrom/
Dcdrom.c379 int ret, buflen; in cdrom_get_disc_info() local
384 cgc.cmd[8] = cgc.buflen = 2; in cdrom_get_disc_info()
394 buflen = be16_to_cpu(di->disc_information_length) + in cdrom_get_disc_info()
397 if (buflen > sizeof(disc_information)) in cdrom_get_disc_info()
398 buflen = sizeof(disc_information); in cdrom_get_disc_info()
400 cgc.cmd[8] = cgc.buflen = buflen; in cdrom_get_disc_info()
406 return buflen; in cdrom_get_disc_info()
567 cgc.buflen = sizeof(buffer); in cdrom_mrw_set_lba_space()
578 cgc.buflen = size; in cdrom_mrw_set_lba_space()
832 cgc.buflen = 255; in mo_open_write()
[all …]
Dgdrom.c194 static void gdrom_spicommand(void *spi_string, int buflen) in gdrom_spicommand() argument
202 __raw_writeb(buflen & 0xFF, GDROM_BCL_REG); in gdrom_spicommand()
203 __raw_writeb((buflen >> 8) & 0xFF, GDROM_BCH_REG); in gdrom_spicommand()
255 spin_command->buflen = 0; in gdrom_preparedisk_cmd()
292 toc_command->buflen = tocsize; in gdrom_readtoc_cmd()
421 gdrom_spicommand(&command->cmd, command->buflen); in gdrom_packetcommand()
443 sense_command->buflen = 10; in gdrom_getsense()
456 insw(GDROM_DATA_REG, &sense, sense_command->buflen/2); in gdrom_getsense()
/linux-4.19.296/include/scsi/
Dscsi_cmnd.h230 const void *buf, int buflen) in scsi_sg_copy_from_buffer() argument
233 buf, buflen); in scsi_sg_copy_from_buffer()
237 void *buf, int buflen) in scsi_sg_copy_to_buffer() argument
240 buf, buflen); in scsi_sg_copy_to_buffer()
/linux-4.19.296/fs/kernfs/
Ddir.c51 static int kernfs_name_locked(struct kernfs_node *kn, char *buf, size_t buflen) in kernfs_name_locked() argument
54 return strlcpy(buf, "(null)", buflen); in kernfs_name_locked()
56 return strlcpy(buf, kn->parent ? kn->name : "/", buflen); in kernfs_name_locked()
133 char *buf, size_t buflen) in kernfs_path_from_node_locked() argument
141 return strlcpy(buf, "(null)", buflen); in kernfs_path_from_node_locked()
147 return strlcpy(buf, "/", buflen); in kernfs_path_from_node_locked()
161 len < buflen ? buflen - len : 0); in kernfs_path_from_node_locked()
168 len < buflen ? buflen - len : 0); in kernfs_path_from_node_locked()
170 len < buflen ? buflen - len : 0); in kernfs_path_from_node_locked()
190 int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen) in kernfs_name() argument
[all …]
/linux-4.19.296/drivers/of/
Ddevice.c344 sl = of_device_get_modalias(dev, &env->buf[env->buflen-1], in of_device_uevent_modalias()
345 sizeof(env->buf) - env->buflen); in of_device_uevent_modalias()
346 if (sl >= (sizeof(env->buf) - env->buflen)) in of_device_uevent_modalias()
348 env->buflen += sl; in of_device_uevent_modalias()

12345