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 …]
/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/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()
143 buflen - cnt); in usb_stor_access_xfer_buf()
170 unsigned int buflen, struct scsi_cmnd *srb) in usb_stor_set_xfer_buf() argument
175 buflen = min(buflen, scsi_bufflen(srb)); in usb_stor_set_xfer_buf()
176 buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, in usb_stor_set_xfer_buf()
178 if (buflen < scsi_bufflen(srb)) in usb_stor_set_xfer_buf()
179 scsi_set_resid(srb, scsi_bufflen(srb) - buflen); in usb_stor_set_xfer_buf()
/linux/net/mac80211/
H A Ddebugfs_netdev.c172 int buflen) \
174 return scnprintf(buf, buflen, format_string, data->field); \
186 char *buf, int buflen) \
191 p += scnprintf(p, buflen + buf - p, "%.2x ", \
194 p += scnprintf(p, buflen + buf - p, "\n"); \
201 char *buf, int buflen) \
203 return scnprintf(buf, buflen, "%d\n", atomic_read(&data->field));\
209 int buflen) \
211 return scnprintf(buf, buflen, "%pM\n", data->field); \
217 char *buf, int buflen) \
[all …]
/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/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/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/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/arm64/crypto/
H A Dsm4-ce-gcm-glue.c80 unsigned int buflen = 0; in gcm_calculate_auth_mac() local
92 if (n + buflen < GHASH_BLOCK_SIZE) { in gcm_calculate_auth_mac()
93 memcpy(&buffer[buflen], p, n); in gcm_calculate_auth_mac()
94 buflen += n; in gcm_calculate_auth_mac()
98 if (buflen) { in gcm_calculate_auth_mac()
99 unsigned int l = GHASH_BLOCK_SIZE - buflen; in gcm_calculate_auth_mac()
101 memcpy(&buffer[buflen], p, l); in gcm_calculate_auth_mac()
116 buflen = n % GHASH_BLOCK_SIZE; in gcm_calculate_auth_mac()
117 if (buflen) in gcm_calculate_auth_mac()
118 memcpy(&buffer[0], p, buflen); in gcm_calculate_auth_mac()
[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/arch/s390/crypto/
H A Dhmac_s390.c78 u64 buflen[2]; member
192 ctx->buflen[0] = 0; in s390_hmac_sha2_init()
193 ctx->buflen[1] = 0; in s390_hmac_sha2_init()
222 ctx->buflen[0] += n; in s390_hmac_sha2_update()
223 if (ctx->buflen[0] < n) in s390_hmac_sha2_update()
224 ctx->buflen[1]++; in s390_hmac_sha2_update()
238 ctx->buflen[0] += len; in s390_hmac_sha2_finup()
239 if (ctx->buflen[0] < len) in s390_hmac_sha2_finup()
240 ctx->buflen[1]++; in s390_hmac_sha2_finup()
243 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/drivers/media/test-drivers/visl/
H A Dvisl-dec.c45 static void visl_print_ts_idx(u8 **buf, __kernel_size_t *buflen, const char *name, in visl_print_ts_idx() argument
51 len = scnprintf(*buf, *buflen, "%s: %lld, vb2_idx: %d\n", name, in visl_print_ts_idx()
54 len = scnprintf(*buf, *buflen, "%s: %lld\n", name, ts); in visl_print_ts_idx()
58 *buflen -= len; in visl_print_ts_idx()
62 __kernel_size_t buflen, struct visl_run *run) in visl_get_ref_frames() argument
69 len = scnprintf(buf, buflen, header); in visl_get_ref_frames()
71 buflen -= len; in visl_get_ref_frames()
82 visl_print_ts_idx(&buf, &buflen, "backwards_ref_ts", in visl_get_ref_frames()
95 visl_print_ts_idx(&buf, &buflen, "backward_ref_ts", in visl_get_ref_frames()
97 visl_print_ts_idx(&buf, &buflen, "forward_ref_ts", in visl_get_ref_frames()
[all …]
/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/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/crypto/
H A Dnhpoly1305.c149 state->buflen = 0; in crypto_nhpoly1305_init()
163 if (state->buflen) { in crypto_nhpoly1305_update_helper()
164 bytes = min(srclen, (int)NH_MESSAGE_UNIT - state->buflen); in crypto_nhpoly1305_update_helper()
165 memcpy(&state->buffer[state->buflen], src, bytes); in crypto_nhpoly1305_update_helper()
166 state->buflen += bytes; in crypto_nhpoly1305_update_helper()
167 if (state->buflen < NH_MESSAGE_UNIT) in crypto_nhpoly1305_update_helper()
171 state->buflen = 0; in crypto_nhpoly1305_update_helper()
185 state->buflen = srclen; in crypto_nhpoly1305_update_helper()
203 if (state->buflen) { in crypto_nhpoly1305_final_helper()
204 memset(&state->buffer[state->buflen], 0, in crypto_nhpoly1305_final_helper()
[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/tools/lib/
H A Dstr_error_r.c21 char *str_error_r(int errnum, char *buf, size_t buflen) in str_error_r() argument
23 int err = strerror_r(errnum, buf, buflen); in str_error_r()
25 snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, [buf], %zd)=%d", errnum, buflen, err); in str_error_r()
/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/tools/include/nolibc/sys/
H A Drandom.h23 ssize_t sys_getrandom(void *buf, size_t buflen, unsigned int flags) in sys_getrandom() argument
25 return my_syscall3(__NR_getrandom, buf, buflen, flags); in sys_getrandom()
29 ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) in getrandom() argument
31 return __sysret(sys_getrandom(buf, buflen, flags)); in getrandom()
/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 …]

12345678910>>...18