/kernel/linux/linux-5.10/fs/ |
D | d_path.c | 11 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() 110 blen = *buflen; in prepend_path() 160 *buflen = blen; in prepend_path() [all …]
|
/kernel/linux/linux-5.10/net/sunrpc/ |
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 …]
|
/kernel/linux/linux-5.10/arch/mips/crypto/ |
D | poly1305-glue.c | 27 dctx->buflen = 0; in poly1305_init_arch() 35 dctx->buflen = 0; in mips_poly1305_init() 75 if (unlikely(dctx->buflen)) { in mips_poly1305_update() 76 u32 bytes = min(len, POLY1305_BLOCK_SIZE - dctx->buflen); in mips_poly1305_update() 78 memcpy(dctx->buf + dctx->buflen, src, bytes); in mips_poly1305_update() 81 dctx->buflen += bytes; in mips_poly1305_update() 83 if (dctx->buflen == POLY1305_BLOCK_SIZE) { in mips_poly1305_update() 85 dctx->buflen = 0; in mips_poly1305_update() 96 dctx->buflen = len; in mips_poly1305_update() 105 if (unlikely(dctx->buflen)) { in poly1305_update_arch() [all …]
|
/kernel/linux/linux-5.10/lib/crypto/ |
D | poly1305.c | 24 desc->buflen = 0; in poly1305_init_generic() 35 if (unlikely(desc->buflen)) { in poly1305_update_generic() 36 bytes = min(nbytes, POLY1305_BLOCK_SIZE - desc->buflen); in poly1305_update_generic() 37 memcpy(desc->buf + desc->buflen, src, bytes); in poly1305_update_generic() 40 desc->buflen += bytes; in poly1305_update_generic() 42 if (desc->buflen == POLY1305_BLOCK_SIZE) { in poly1305_update_generic() 45 desc->buflen = 0; in poly1305_update_generic() 57 desc->buflen = nbytes; in poly1305_update_generic() 65 if (unlikely(desc->buflen)) { in poly1305_final_generic() 66 desc->buf[desc->buflen++] = 1; in poly1305_final_generic() [all …]
|
/kernel/linux/linux-5.10/arch/arm64/crypto/ |
D | poly1305-glue.c | 35 dctx->buflen = 0; in poly1305_init_arch() 43 dctx->buflen = 0; in neon_poly1305_init() 84 if (unlikely(dctx->buflen)) { in neon_poly1305_do_update() 85 u32 bytes = min(len, POLY1305_BLOCK_SIZE - dctx->buflen); in neon_poly1305_do_update() 87 memcpy(dctx->buf + dctx->buflen, src, bytes); in neon_poly1305_do_update() 90 dctx->buflen += bytes; in neon_poly1305_do_update() 92 if (dctx->buflen == POLY1305_BLOCK_SIZE) { in neon_poly1305_do_update() 95 dctx->buflen = 0; in neon_poly1305_do_update() 106 dctx->buflen = len; in neon_poly1305_do_update() 128 if (unlikely(dctx->buflen)) { in poly1305_update_arch() [all …]
|
/kernel/linux/linux-5.10/arch/arm/crypto/ |
D | poly1305-glue.c | 39 dctx->buflen = 0; in poly1305_init_arch() 47 dctx->buflen = 0; in arm_poly1305_init() 88 if (unlikely(dctx->buflen)) { in arm_poly1305_do_update() 89 u32 bytes = min(len, POLY1305_BLOCK_SIZE - dctx->buflen); in arm_poly1305_do_update() 91 memcpy(dctx->buf + dctx->buflen, src, bytes); in arm_poly1305_do_update() 94 dctx->buflen += bytes; in arm_poly1305_do_update() 96 if (dctx->buflen == POLY1305_BLOCK_SIZE) { in arm_poly1305_do_update() 99 dctx->buflen = 0; in arm_poly1305_do_update() 110 dctx->buflen = len; in arm_poly1305_do_update() 145 if (unlikely(dctx->buflen)) { in poly1305_update_arch() [all …]
|
/kernel/linux/linux-5.10/net/mac80211/ |
D | debugfs_netdev.c | 71 int buflen) \ 73 return scnprintf(buf, buflen, format_string, sdata->field); \ 87 char *buf, int buflen) \ 92 p += scnprintf(p, buflen + buf - p, "%.2x ", \ 95 p += scnprintf(p, buflen + buf - p, "\n"); \ 102 char *buf, int buflen) \ 104 return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\ 110 int buflen) \ 112 return scnprintf(buf, buflen, "%pM\n", sdata->field); \ 118 char *buf, int buflen) \ [all …]
|
/kernel/linux/linux-5.10/drivers/usb/storage/ |
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() 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()
|
/kernel/linux/linux-5.10/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | fwil.c | 194 char *buf, u32 buflen) in brcmf_create_iovar() argument 200 if ((len + datalen) > buflen) in brcmf_create_iovar() 219 u32 buflen; in brcmf_fil_iovar_data_set() local 227 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_set() 229 if (buflen) { in brcmf_fil_iovar_data_set() 231 buflen, true); in brcmf_fil_iovar_data_set() 247 u32 buflen; in brcmf_fil_iovar_data_get() local 251 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_get() 253 if (buflen) { in brcmf_fil_iovar_data_get() 255 buflen, false); in brcmf_fil_iovar_data_get() [all …]
|
/kernel/linux/linux-5.10/block/partitions/ |
D | ldm.c | 621 static int ldm_relative(const u8 *buffer, int buflen, int base, int offset) in ldm_relative() argument 625 if (!buffer || offset < 0 || base > buflen) { in ldm_relative() 630 if (base > buflen) in ldm_relative() 631 ldm_error("base (%d) > buflen (%d)", base, buflen); in ldm_relative() 634 if (base + buffer[base] >= buflen) { in ldm_relative() 636 buffer[base], buflen); in ldm_relative() 692 static int ldm_get_vstr (const u8 *block, u8 *buffer, int buflen) in ldm_get_vstr() argument 699 if (length >= buflen) { in ldm_get_vstr() 700 ldm_error ("Truncating string %d -> %d.", length, buflen); in ldm_get_vstr() 701 length = buflen - 1; in ldm_get_vstr() [all …]
|
/kernel/liteos_a/drivers/char/perf/src/ |
D | perf.c | 60 static ssize_t PerfRead(struct file *filep, char *buffer, size_t buflen) in PerfRead() argument 67 char *records = LOS_MemAlloc(m_aucSysMem0, buflen); in PerfRead() 72 realLen = LOS_PerfDataRead(records, buflen); /* get sample data */ in PerfRead() 79 ret = LOS_CopyFromKernel((void *)buffer, buflen, (void *)records, realLen); in PerfRead() 91 static ssize_t PerfConfig(struct file *filep, const char *buffer, size_t buflen) in PerfConfig() argument 98 if (buflen != attrlen) { in PerfConfig() 99 PRINT_ERR("PerfConfigAttr is %d bytes not %d\n", attrlen, buflen); in PerfConfig() 103 ret = LOS_CopyToKernel(&attr, attrlen, buffer, buflen); in PerfConfig()
|
/kernel/liteos_a/drivers/char/trace/src/ |
D | trace.c | 62 static ssize_t TraceRead(struct file *filep, char *buffer, size_t buflen) in TraceRead() argument 65 ssize_t len = buflen; in TraceRead() 81 realLen = buflen < records->totalLen ? buflen : records->totalLen; in TraceRead() 82 ret = LOS_CopyFromKernel((void *)buffer, buflen, (void *)records, realLen); in TraceRead() 90 static ssize_t TraceWrite(struct file *filep, const char *buffer, size_t buflen) in TraceWrite() argument 97 if (buflen != infoLen) { in TraceWrite() 108 ret = LOS_CopyToKernel(info, infoLen, buffer, buflen); in TraceWrite()
|
/kernel/linux/linux-5.10/fs/9p/ |
D | vfs_dir.c | 71 static struct p9_rdir *v9fs_alloc_rdir_buf(struct file *filp, int buflen) in v9fs_alloc_rdir_buf() argument 75 fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL); in v9fs_alloc_rdir_buf() 92 int buflen; in v9fs_dir_readdir() local 99 buflen = fid->clnt->msize - P9_IOHDRSZ; in v9fs_dir_readdir() 101 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir() 105 kvec.iov_len = buflen; in v9fs_dir_readdir() 111 iov_iter_kvec(&to, READ, &kvec, 1, buflen); in v9fs_dir_readdir() 152 int buflen; in v9fs_dir_readdir_dotl() local 159 buflen = fid->clnt->msize - P9_READDIRHDRSZ; in v9fs_dir_readdir_dotl() 161 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir_dotl() [all …]
|
/kernel/linux/linux-5.10/net/netfilter/ |
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 108 buflen = nf_nat_ftp_fmt_cmd(ct, type, buffer, sizeof(buffer), in nf_nat_ftp() 110 if (!buflen) in nf_nat_ftp() 116 matchlen, buffer, buflen)) in nf_nat_ftp()
|
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 …]
|
/kernel/linux/linux-5.10/security/tomoyo/ |
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 …]
|
/kernel/liteos_a/fs/vfs/operation/ |
D | vfs_readv.c | 45 size_t buflen = 0; in pread_buf_and_check() local 54 if (SSIZE_MAX - buflen < iov[i].iov_len) { in pread_buf_and_check() 58 buflen += iov[i].iov_len; in pread_buf_and_check() 61 if (buflen == 0) { in pread_buf_and_check() 67 buf = (char *)LOS_VMalloc(buflen * sizeof(char)); in pread_buf_and_check() 69 buf = (char *)malloc(buflen * sizeof(char)); in pread_buf_and_check() 77 *totalbytesread = (offset == NULL) ? read(fd, buf, buflen) in pread_buf_and_check() 78 : pread(fd, buf, buflen, *offset); in pread_buf_and_check()
|
/kernel/linux/linux-5.10/include/crypto/internal/ |
D | blake2s.h | 33 const size_t fill = BLAKE2S_BLOCK_SIZE - state->buflen; in __blake2s_update() 38 memcpy(state->buf + state->buflen, in, fill); in __blake2s_update() 45 state->buflen = 0; in __blake2s_update() 61 memcpy(state->buf + state->buflen, in, inlen); in __blake2s_update() 62 state->buflen += inlen; in __blake2s_update() 69 memset(state->buf + state->buflen, 0, in __blake2s_final() 70 BLAKE2S_BLOCK_SIZE - state->buflen); /* Padding */ in __blake2s_final() 72 blake2s_compress_generic(state, state->buf, 1, state->buflen); in __blake2s_final() 74 blake2s_compress(state, state->buf, 1, state->buflen); in __blake2s_final()
|
/kernel/linux/linux-5.10/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | debugfs.h | 68 #define MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ argument 74 char buf[buflen] = {}; \ 83 #define _MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen, argtype) \ argument 84 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ 92 #define _MVM_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \ argument 93 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
|
/kernel/linux/linux-5.10/crypto/ |
D | poly1305_generic.c | 27 dctx->buflen = 0; in crypto_poly1305_init() 78 if (unlikely(dctx->buflen)) { in crypto_poly1305_update() 79 bytes = min(srclen, POLY1305_BLOCK_SIZE - dctx->buflen); in crypto_poly1305_update() 80 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_update() 83 dctx->buflen += bytes; in crypto_poly1305_update() 85 if (dctx->buflen == POLY1305_BLOCK_SIZE) { in crypto_poly1305_update() 88 dctx->buflen = 0; in crypto_poly1305_update() 99 dctx->buflen = srclen; in crypto_poly1305_update()
|
/kernel/linux/linux-5.10/tools/lib/traceevent/ |
D | tep_strerror.c | 30 enum tep_errno errnum, char *buf, size_t buflen) in tep_strerror() argument 35 if (!buflen) in tep_strerror() 39 int err = strerror_r(errnum, buf, buflen); in tep_strerror() 40 buf[buflen - 1] = 0; in tep_strerror() 50 snprintf(buf, buflen, "%s", msg); in tep_strerror()
|
/kernel/linux/linux-5.10/security/apparmor/ |
D | path.c | 25 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()
|
/kernel/linux/linux-5.10/fs/romfs/ |
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 …]
|
/kernel/linux/linux-5.10/fs/afs/ |
D | cache.c | 13 uint16_t buflen, 42 uint16_t buflen, in afs_vnode_cache_check_aux() argument 50 buffer, buflen); in afs_vnode_cache_check_aux() 55 if (buflen != sizeof(aux)) { in afs_vnode_cache_check_aux() 56 _leave(" = OBSOLETE [len %hx != %zx]", buflen, sizeof(aux)); in afs_vnode_cache_check_aux()
|
/kernel/linux/linux-5.10/tools/lib/ |
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()
|