Home
last modified time | relevance | path

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

12345678910>>...18

/linux/net/sunrpc/
H A Daddr.c29 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
40 return snprintf(buf, buflen, "::"); in rpc_ntop6_noscopeid()
48 return snprintf(buf, buflen, "::1"); in rpc_ntop6_noscopeid()
57 return snprintf(buf, buflen, "::ffff:%pI4", in rpc_ntop6_noscopeid()
63 return snprintf(buf, buflen, "%pI6c", addr); in rpc_ntop6_noscopeid()
67 char *buf, const size_t buflen) in rpc_ntop6() argument
74 len = rpc_ntop6_noscopeid(sap, buf, buflen); in rpc_ntop6()
89 if (unlikely(len >= buflen)) in rpc_ntop6()
99 char *buf, const int buflen) in rpc_ntop6_noscopeid() argument
105 char *buf, const size_t buflen) in rpc_ntop6() argument
[all …]
/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
H A Dfwil.c168 char *buf, u32 buflen) in brcmf_create_iovar() argument
174 if ((len + datalen) > buflen) in brcmf_create_iovar()
193 u32 buflen; in brcmf_fil_iovar_data_set() local
201 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_set()
203 if (buflen) { in brcmf_fil_iovar_data_set()
205 buflen, true); in brcmf_fil_iovar_data_set()
222 u32 buflen; in brcmf_fil_iovar_data_get() local
226 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_get()
228 if (buflen) { in brcmf_fil_iovar_data_get()
230 buflen, false); in brcmf_fil_iovar_data_get()
[all …]
/linux/lib/crypto/
H A Dpoly1305.c32 desc->buflen = 0; in poly1305_init()
40 if (desc->buflen + nbytes >= POLY1305_BLOCK_SIZE) { in poly1305_update()
43 if (desc->buflen) { in poly1305_update()
44 unsigned int l = POLY1305_BLOCK_SIZE - desc->buflen; in poly1305_update()
46 memcpy(&desc->buf[desc->buflen], src, l); in poly1305_update()
52 desc->buflen = 0; in poly1305_update()
64 memcpy(&desc->buf[desc->buflen], src, nbytes); in poly1305_update()
65 desc->buflen += nbytes; in poly1305_update()
72 if (unlikely(desc->buflen)) { in poly1305_final()
73 desc->buf[desc->buflen++] = 1; in poly1305_final()
[all …]
H A Dblake2s.c113 const size_t fill = BLAKE2S_BLOCK_SIZE - ctx->buflen; in blake2s_update()
118 memcpy(ctx->buf + ctx->buflen, in, fill); in blake2s_update()
120 ctx->buflen = 0; in blake2s_update()
131 memcpy(ctx->buf + ctx->buflen, in, inlen); in blake2s_update()
132 ctx->buflen += inlen; in blake2s_update()
140 memset(ctx->buf + ctx->buflen, 0, in blake2s_final()
141 BLAKE2S_BLOCK_SIZE - ctx->buflen); /* Padding */ in blake2s_final()
142 blake2s_compress(ctx, ctx->buf, 1, ctx->buflen); in blake2s_final()
H A Dblake2b.c119 const size_t fill = BLAKE2B_BLOCK_SIZE - ctx->buflen; in blake2b_update()
124 memcpy(ctx->buf + ctx->buflen, in, fill); in blake2b_update()
126 ctx->buflen = 0; in blake2b_update()
137 memcpy(ctx->buf + ctx->buflen, in, inlen); in blake2b_update()
138 ctx->buflen += inlen; in blake2b_update()
146 memset(ctx->buf + ctx->buflen, 0, in blake2b_final()
147 BLAKE2B_BLOCK_SIZE - ctx->buflen); /* Padding */ in blake2b_final()
148 blake2b_compress(ctx, ctx->buf, 1, ctx->buflen); in blake2b_final()
/linux/block/partitions/
H A Dldm.c619 static int ldm_relative(const u8 *buffer, int buflen, int base, int offset) in ldm_relative() argument
623 if (!buffer || offset < 0 || base > buflen) { in ldm_relative()
628 if (base > buflen) in ldm_relative()
629 ldm_error("base (%d) > buflen (%d)", base, buflen); in ldm_relative()
632 if (base + buffer[base] >= buflen) { in ldm_relative()
634 buffer[base], buflen); in ldm_relative()
690 static int ldm_get_vstr (const u8 *block, u8 *buffer, int buflen) in ldm_get_vstr() argument
697 if (length >= buflen) { in ldm_get_vstr()
698 ldm_error ("Truncating string %d -> %d.", length, buflen); in ldm_get_vstr()
699 length = buflen - 1; in ldm_get_vstr()
[all …]
/linux/net/mac80211/
H A Ddebugfs_netdev.c173 int buflen) \
175 return scnprintf(buf, buflen, format_string, data->field); \
187 char *buf, int buflen) \
192 p += scnprintf(p, buflen + buf - p, "%.2x ", \
195 p += scnprintf(p, buflen + buf - p, "\n"); \
202 char *buf, int buflen) \
204 return scnprintf(buf, buflen, "%d\n", atomic_read(&data->field));\
210 int buflen) \
212 return scnprintf(buf, buflen, "%pM\n", data->field); \
218 char *buf, int buflen) \
[all …]
/linux/drivers/usb/storage/
H A Dprotocol.c122 unsigned int buflen, struct scsi_cmnd *srb, struct scatterlist **sgptr, in usb_stor_access_xfer_buf() argument
141 while (sg_miter_next(&miter) && cnt < buflen) { in usb_stor_access_xfer_buf()
142 unsigned int len = min(miter.length, buflen - cnt); in usb_stor_access_xfer_buf()
169 unsigned int buflen, struct scsi_cmnd *srb) in usb_stor_set_xfer_buf() argument
174 buflen = min(buflen, scsi_bufflen(srb)); in usb_stor_set_xfer_buf()
175 buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, in usb_stor_set_xfer_buf()
177 if (buflen < scsi_bufflen(srb)) in usb_stor_set_xfer_buf()
178 scsi_set_resid(srb, scsi_bufflen(srb) - buflen); in usb_stor_set_xfer_buf()
/linux/security/tomoyo/
H A Drealpath.c95 const int buflen) in tomoyo_get_absolute_path() argument
99 if (buflen >= 256) { in tomoyo_get_absolute_path()
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()
126 const int buflen) in tomoyo_get_dentry_path() argument
130 if (buflen >= 256) { in tomoyo_get_dentry_path()
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()
[all …]
/linux/fs/
H A Dd_path.c217 char *buf, int buflen) in __d_path() argument
219 DECLARE_BUFFER(b, buf, buflen); in __d_path()
228 char *buf, int buflen) in d_absolute_path() argument
231 DECLARE_BUFFER(b, buf, buflen); in d_absolute_path()
265 char *d_path(const struct path *path, char *buf, int buflen) in d_path() argument
267 DECLARE_BUFFER(b, buf, buflen); in d_path()
283 return path->dentry->d_op->d_dname(path->dentry, buf, buflen); in d_path()
301 char *dynamic_dname(char *buffer, int buflen, const char *fmt, ...) in dynamic_dname() argument
311 if (sz > sizeof(temp) || sz > buflen) in dynamic_dname()
314 buffer += buflen - sz; in dynamic_dname()
[all …]
/linux/net/netfilter/
H A Dnf_nat_ftp.c34 char *buffer, size_t buflen, in nf_nat_ftp_fmt_cmd() argument
40 return snprintf(buffer, buflen, "%u,%u,%u,%u,%u,%u", in nf_nat_ftp_fmt_cmd()
49 return snprintf(buffer, buflen, "|1|%pI4|%u|", in nf_nat_ftp_fmt_cmd()
52 return snprintf(buffer, buflen, "|2|%pI6|%u|", in nf_nat_ftp_fmt_cmd()
55 return snprintf(buffer, buflen, "|||%u|", port); in nf_nat_ftp_fmt_cmd()
76 unsigned int buflen; in nf_nat_ftp() local
95 buflen = nf_nat_ftp_fmt_cmd(ct, type, buffer, sizeof(buffer), in nf_nat_ftp()
97 if (!buflen) in nf_nat_ftp()
103 matchlen, buffer, buflen)) in nf_nat_ftp()
H A Dnf_nat_sip.c38 const char *buffer, unsigned int buflen) in mangle_packet() argument
52 buffer, buflen, false)) in mangle_packet()
60 buffer, buflen)) in mangle_packet()
66 *datalen += buflen - matchlen; in mangle_packet()
103 unsigned int buflen; in map_addr() local
122 buflen = sip_sprintf_addr_port(ct, buffer, &newaddr, ntohs(newport)); in map_addr()
124 matchoff, matchlen, buffer, buflen); in map_addr()
182 unsigned int olen, matchend, poff, plen, buflen, n; in nf_nat_sip() local
215 buflen = sip_sprintf_addr(ct, buffer, in nf_nat_sip()
219 poff, plen, buffer, buflen)) { in nf_nat_sip()
[all …]
/linux/arch/arm64/crypto/
H A Dsm4-ce-gcm-glue.c78 unsigned int buflen = 0; in gcm_calculate_auth_mac() local
90 if (n + buflen < GHASH_BLOCK_SIZE) { in gcm_calculate_auth_mac()
91 memcpy(&buffer[buflen], p, n); in gcm_calculate_auth_mac()
92 buflen += n; in gcm_calculate_auth_mac()
96 if (buflen) { in gcm_calculate_auth_mac()
97 unsigned int l = GHASH_BLOCK_SIZE - buflen; in gcm_calculate_auth_mac()
99 memcpy(&buffer[buflen], p, l); in gcm_calculate_auth_mac()
114 buflen = n % GHASH_BLOCK_SIZE; in gcm_calculate_auth_mac()
115 if (buflen) in gcm_calculate_auth_mac()
116 memcpy(&buffer[0], p, buflen); in gcm_calculate_auth_mac()
[all …]
/linux/security/keys/
H A Ddh.c95 char __user *buffer, size_t buflen, in keyctl_dh_compute_kdf() argument
101 size_t outbuf_len = roundup(buflen, crypto_shash_digestsize(hash)); in keyctl_dh_compute_kdf()
113 ret = buflen; in keyctl_dh_compute_kdf()
114 if (copy_to_user(buffer, outbuf, buflen) != 0) in keyctl_dh_compute_kdf()
123 char __user *buffer, size_t buflen, in __keyctl_dh_compute() argument
140 if (!params || (!buffer && buflen)) { in __keyctl_dh_compute()
157 if (buflen > KEYCTL_KDF_MAX_OUTPUT_LEN || in __keyctl_dh_compute()
227 if (buflen == 0) { in __keyctl_dh_compute()
230 } else if (outlen > buflen) { in __keyctl_dh_compute()
277 ret = keyctl_dh_compute_kdf(hash, buffer, buflen, outbuf, in __keyctl_dh_compute()
[all …]
/linux/fs/9p/
H A Dvfs_dir.c68 static struct p9_rdir *v9fs_alloc_rdir_buf(struct file *filp, int buflen) in v9fs_alloc_rdir_buf() argument
73 fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL); in v9fs_alloc_rdir_buf()
90 int buflen; in v9fs_dir_readdir() local
97 buflen = fid->clnt->msize - P9_IOHDRSZ; in v9fs_dir_readdir()
99 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir()
103 kvec.iov_len = buflen; in v9fs_dir_readdir()
110 iov_iter_kvec(&to, ITER_DEST, &kvec, 1, buflen); in v9fs_dir_readdir()
151 int buflen; in v9fs_dir_readdir_dotl() local
158 buflen = fid->clnt->msize - P9_READDIRHDRSZ; in v9fs_dir_readdir_dotl()
160 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir_dotl()
[all …]
/linux/arch/s390/crypto/
H A Dhmac_s390.c77 u64 buflen[2]; member
191 ctx->buflen[0] = 0; in s390_hmac_sha2_init()
192 ctx->buflen[1] = 0; in s390_hmac_sha2_init()
221 ctx->buflen[0] += n; in s390_hmac_sha2_update()
222 if (ctx->buflen[0] < n) in s390_hmac_sha2_update()
223 ctx->buflen[1]++; in s390_hmac_sha2_update()
237 ctx->buflen[0] += len; in s390_hmac_sha2_finup()
238 if (ctx->buflen[0] < len) in s390_hmac_sha2_finup()
239 ctx->buflen[1]++; in s390_hmac_sha2_finup()
242 kmac_sha2_set_imbl(ctx->param, ctx->buflen[0], ctx->buflen[1], bs); in s390_hmac_sha2_finup()
[all …]
/linux/security/apparmor/
H A Dpath.c25 static int prepend(char **buffer, int buflen, const char *str, int namelen) in prepend() argument
27 buflen -= namelen; in prepend()
28 if (buflen < 0) in prepend()
95 int buflen = aa_g_path_max - isdir; in d_namespace_path() local
99 res = dentry_path(path->dentry, buf, buflen); in d_namespace_path()
122 res = __d_path(path, &root, buf, buflen); in d_namespace_path()
125 res = d_absolute_path(path, buf, buflen); in d_namespace_path()
140 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path()
/linux/fs/romfs/
H A Dstorage.c24 void *buf, size_t buflen) in romfs_mtd_read() argument
29 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read()
30 return (ret < 0 || rlen != buflen) ? -EIO : 0; in romfs_mtd_read()
104 void *buf, size_t buflen) in romfs_blk_read() argument
111 while (buflen > 0) { in romfs_blk_read()
113 segment = min_t(size_t, buflen, ROMBSIZE - offset); in romfs_blk_read()
120 buflen -= segment; in romfs_blk_read()
215 void *buf, size_t buflen) in romfs_dev_read() argument
220 if (pos >= limit || buflen > limit - pos) in romfs_dev_read()
225 return romfs_mtd_read(sb, pos, buf, buflen); in romfs_dev_read()
[all …]
/linux/drivers/net/wireless/intel/iwlwifi/mvm/
H A Ddebugfs.h14 #define MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ argument
20 char buf[buflen] = {}; \
29 #define _MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen, argtype) \ argument
30 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
38 #define _MVM_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \ argument
39 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
/linux/include/crypto/internal/
H A Dblockhash.h16 buf, buflen) \ argument
20 unsigned int _buflen = (buflen); \
47 #define BLOCK_HASH_UPDATE(block, state, src, nbytes, bs, buf, buflen) \ argument
48 BLOCK_HASH_UPDATE_BASE(block, state, src, nbytes, bs, 1, buf, buflen)
49 #define BLOCK_HASH_UPDATE_BLOCKS(block, state, src, nbytes, bs, buf, buflen) \ argument
50 BLOCK_HASH_UPDATE_BASE(block, state, src, nbytes, bs, bs, buf, buflen)
/linux/fs/proc/
H A Dkcore.c334 size_t buflen = iov_iter_count(iter); in read_kcore_iter() local
335 size_t orig_buflen = buflen; in read_kcore_iter()
349 if (buflen && *fpos < sizeof(struct elfhdr)) { in read_kcore_iter()
371 tsz = min_t(size_t, buflen, sizeof(struct elfhdr) - *fpos); in read_kcore_iter()
377 buflen -= tsz; in read_kcore_iter()
382 if (buflen && *fpos < phdrs_offset + kcore_phdrs_len) { in read_kcore_iter()
413 tsz = min_t(size_t, buflen, in read_kcore_iter()
423 buflen -= tsz; in read_kcore_iter()
428 if (buflen && *fpos < notes_offset + kcore_notes_len) { in read_kcore_iter()
463 tsz = min_t(size_t, buflen, in read_kcore_iter()
[all …]
/linux/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/
H A Dtrans-gen2.c287 size_t buflen = sizeof(trans_pcie->rf_name); in iwl_pcie_get_rf_name() local
296 pos = scnprintf(buf, buflen, "JF"); in iwl_pcie_get_rf_name()
299 pos = scnprintf(buf, buflen, "GF"); in iwl_pcie_get_rf_name()
302 pos = scnprintf(buf, buflen, "GF4"); in iwl_pcie_get_rf_name()
305 pos = scnprintf(buf, buflen, "HR"); in iwl_pcie_get_rf_name()
308 pos = scnprintf(buf, buflen, "HR1"); in iwl_pcie_get_rf_name()
311 pos = scnprintf(buf, buflen, "HRCDB"); in iwl_pcie_get_rf_name()
314 pos = scnprintf(buf, buflen, "FM"); in iwl_pcie_get_rf_name()
319 pos = scnprintf(buf, buflen, "WHTC"); in iwl_pcie_get_rf_name()
321 pos = scnprintf(buf, buflen, "WH"); in iwl_pcie_get_rf_name()
[all …]
/linux/tools/testing/selftests/net/tcp_ao/lib/
H A Dutils.c5 void randomize_buffer(void *buf, size_t buflen) in randomize_buffer() argument
8 size_t words = buflen / sizeof(int); in randomize_buffer()
9 size_t leftover = buflen % sizeof(int); in randomize_buffer()
11 if (!buflen) in randomize_buffer()
20 memcpy(buf + buflen - leftover, &tmp, leftover); in randomize_buffer()
/linux/drivers/scsi/esas2r/
H A Desas2r_log.c130 size_t buflen = EVENT_LOG_BUFF_SIZE; in esas2r_log_master() local
138 memset(buffer, 0, buflen); in esas2r_log_master()
147 snprintf(buffer, buflen, fmt_nodev, slevel, in esas2r_log_master()
150 snprintf(buffer, buflen, fmt_dev, slevel, in esas2r_log_master()
158 buflen -= strlen(event_buffer); in esas2r_log_master()
160 retval = vsnprintf(buffer, buflen, format, args); in esas2r_log_master()
/linux/arch/powerpc/boot/
H A Ddevtree.c212 int naddr, int nsize, int buflen) in find_range() argument
217 for (i = 0; i + nrange <= buflen; i += nrange) { in find_range()
245 int buflen, offset; in dt_xlate() local
280 buflen = getprop(node, "ranges", prop_buf, in dt_xlate()
282 if (buflen == 0) in dt_xlate()
284 if (buflen < 0 || buflen > sizeof(prop_buf)) in dt_xlate()
288 naddr, prev_nsize, buflen / 4); in dt_xlate()
327 int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr) in dt_xlate_addr() argument
330 if (buflen > sizeof(prop_buf)) in dt_xlate_addr()
333 memcpy(prop_buf, buf, buflen); in dt_xlate_addr()
[all …]

12345678910>>...18