| /linux/net/sunrpc/ |
| H A D | addr.c | 29 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 D | fwil.c | 168 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 D | poly1305.c | 32 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 D | blake2s.c | 113 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 D | blake2b.c | 119 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/drivers/usb/storage/ |
| H A D | protocol.c | 122 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 D | realpath.c | 95 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 D | nf_nat_ftp.c | 34 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 D | nf_nat_sip.c | 38 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 D | d_path.c | 217 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 D | dh.c | 95 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/arch/arm64/crypto/ |
| H A D | sm4-ce-gcm-glue.c | 78 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/fs/9p/ |
| H A D | vfs_dir.c | 68 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/drivers/net/wireless/intel/iwlwifi/mvm/ |
| H A D | debugfs.h | 14 #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/fs/romfs/ |
| H A D | storage.c | 24 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/tools/testing/selftests/net/tcp_ao/lib/ |
| H A D | utils.c | 5 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 D | esas2r_log.c | 130 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/lib/ |
| H A D | str_error_r.c | 21 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/arch/powerpc/boot/ |
| H A D | devtree.c | 212 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 …]
|
| /linux/fs/nfs/ |
| H A D | nfs42.h | 45 void *buf, size_t buflen); 47 const void *buf, size_t buflen, int flags); 49 size_t buflen, u64 *cookiep, bool *eofp); 62 static inline u32 nfs42_listxattr_xdrsize(u32 buflen) in nfs42_listxattr_xdrsize() argument 64 u32 size = 8 * buflen / (XATTR_USER_PREFIX_LEN + 2) + 4; in nfs42_listxattr_xdrsize()
|
| /linux/drivers/md/dm-vdo/ |
| H A D | errors.c | 122 static const char *system_string_error(int errnum, char *buf, size_t buflen) in system_string_error() argument 131 snprintf(buf, buflen, "Unknown error %d", errnum) : in system_string_error() 132 snprintf(buf, buflen, "%s", error_string)); in system_string_error() 133 if (len < buflen) in system_string_error() 141 const char *uds_string_error(int errnum, char *buf, size_t buflen) in uds_string_error() argument 144 char *buf_end = buf + buflen; in uds_string_error() 178 const char *uds_string_error_name(int errnum, char *buf, size_t buflen) in uds_string_error_name() argument 181 char *buf_end = buf + buflen; in uds_string_error_name()
|
| /linux/drivers/crypto/caam/ |
| H A D | caamhash.c | 118 int buflen; member 132 int buflen; member 169 int buflen = state->buflen; in buf_map_to_sec4_sg() local 171 if (!buflen) in buf_map_to_sec4_sg() 174 state->buf_dma = dma_map_single(jrdev, state->buf, buflen, in buf_map_to_sec4_sg() 182 dma_to_sec4_sg_one(sec4_sg, state->buf_dma, buflen, 0); in buf_map_to_sec4_sg() 565 dma_unmap_single(dev, state->buf_dma, state->buflen, in ahash_unmap() 661 state->buflen = state->next_buflen; in ahash_done_switch() 665 state->buflen, 1); in ahash_done_switch() 827 int *buflen = &state->buflen; in ahash_update_ctx() local [all …]
|
| /linux/drivers/media/usb/b2c2/ |
| H A D | flexcop-usb.c | 110 u8 *pbBuffer, u32 buflen) in flexcop_usb_v8_memory_req() argument 117 if (buflen > sizeof(fc_usb->data)) { in flexcop_usb_v8_memory_req() 144 wAddress, wIndex, buflen); in flexcop_usb_v8_memory_req() 149 memcpy(fc_usb->data, pbBuffer, buflen); in flexcop_usb_v8_memory_req() 157 buflen, in flexcop_usb_v8_memory_req() 159 if (ret != buflen) in flexcop_usb_v8_memory_req() 165 memcpy(pbBuffer, fc_usb->data, buflen); in flexcop_usb_v8_memory_req() 174 #define bytes_left_to_read_on_page(paddr, buflen) \ argument 175 ((V8_MEMORY_PAGE_SIZE - (paddr & V8_MEMORY_PAGE_MASK)) > buflen \ 176 ? buflen : (V8_MEMORY_PAGE_SIZE - (paddr & V8_MEMORY_PAGE_MASK))) [all …]
|
| /linux/drivers/media/usb/uvc/ |
| H A D | uvc_driver.c | 241 const unsigned char *buffer, int buflen) in uvc_parse_frame() argument 249 n = buflen > 25 ? buffer[25] : 0; in uvc_parse_frame() 251 n = buflen > 21 ? buffer[21] : 0; in uvc_parse_frame() 255 if (buflen < 26 + 4 * n) { in uvc_parse_frame() 348 int buflen) in uvc_parse_format() argument 359 if (buflen < 4) in uvc_parse_format() 370 if (buflen < n) { in uvc_parse_format() 432 if (buflen < 11) { in uvc_parse_format() 447 if (buflen < 9) { in uvc_parse_format() 491 buflen -= buffer[0]; in uvc_parse_format() [all …]
|
| /linux/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_req.h | 574 void *buf, int buflen) in create_single_sg() argument 576 sg_set_buf(sg, buf, buflen); in create_single_sg() 592 int buflen) in create_multi_sg() argument 597 for (; buflen && from_sg; buflen -= sglen) { in create_multi_sg() 599 if (sglen > buflen) in create_multi_sg() 600 sglen = buflen; in create_multi_sg() 644 struct scatterlist *src, int buflen) in nitrox_creq_set_src_sg() argument 663 create_multi_sg(sg, src, buflen); in nitrox_creq_set_src_sg() 702 struct scatterlist *dst, int buflen) in nitrox_creq_set_dst_sg() argument 723 sg = create_multi_sg(sg, dst, buflen); in nitrox_creq_set_dst_sg()
|