/linux-6.6.21/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 …]
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/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 …]
|
D | blake2s.c | 26 const size_t fill = BLAKE2S_BLOCK_SIZE - state->buflen; in blake2s_update() 31 memcpy(state->buf + state->buflen, in, fill); in blake2s_update() 33 state->buflen = 0; in blake2s_update() 43 memcpy(state->buf + state->buflen, in, inlen); in blake2s_update() 44 state->buflen += inlen; in blake2s_update() 52 memset(state->buf + state->buflen, 0, in blake2s_final() 53 BLAKE2S_BLOCK_SIZE - state->buflen); /* Padding */ in blake2s_final() 54 blake2s_compress(state, state->buf, 1, state->buflen); in blake2s_final()
|
/linux-6.6.21/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 …]
|
D | sm4-ce-gcm-glue.c | 80 unsigned int buflen = 0; in gcm_calculate_auth_mac() local 97 if (n + buflen < GHASH_BLOCK_SIZE) { in gcm_calculate_auth_mac() 98 memcpy(&buffer[buflen], ptr, n); in gcm_calculate_auth_mac() 99 buflen += n; in gcm_calculate_auth_mac() 103 if (buflen) { in gcm_calculate_auth_mac() 104 unsigned int l = GHASH_BLOCK_SIZE - buflen; in gcm_calculate_auth_mac() 106 memcpy(&buffer[buflen], ptr, l); in gcm_calculate_auth_mac() 121 buflen = n % GHASH_BLOCK_SIZE; in gcm_calculate_auth_mac() 122 if (buflen) in gcm_calculate_auth_mac() 123 memcpy(&buffer[0], ptr, buflen); in gcm_calculate_auth_mac() [all …]
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
D | fwil.c | 196 char *buf, u32 buflen) in brcmf_create_iovar() argument 202 if ((len + datalen) > buflen) in brcmf_create_iovar() 221 u32 buflen; in brcmf_fil_iovar_data_set() local 229 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_set() 231 if (buflen) { in brcmf_fil_iovar_data_set() 233 buflen, true); in brcmf_fil_iovar_data_set() 249 u32 buflen; in brcmf_fil_iovar_data_get() local 253 buflen = brcmf_create_iovar(name, data, len, drvr->proto_buf, in brcmf_fil_iovar_data_get() 255 if (buflen) { in brcmf_fil_iovar_data_get() 257 buflen, false); in brcmf_fil_iovar_data_get() [all …]
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/net/mac80211/ |
D | debugfs_netdev.c | 70 int buflen) \ 72 return scnprintf(buf, buflen, format_string, data->field); \ 84 char *buf, int buflen) \ 89 p += scnprintf(p, buflen + buf - p, "%.2x ", \ 92 p += scnprintf(p, buflen + buf - p, "\n"); \ 99 char *buf, int buflen) \ 101 return scnprintf(buf, buflen, "%d\n", atomic_read(&data->field));\ 107 int buflen) \ 109 return scnprintf(buf, buflen, "%pM\n", data->field); \ 115 char *buf, int buflen) \ [all …]
|
/linux-6.6.21/arch/powerpc/crypto/ |
D | poly1305-p10-glue.c | 42 dctx->buflen = 0; in crypto_poly1305_p10_init() 83 if (unlikely(dctx->buflen)) { in crypto_poly1305_p10_update() 84 bytes = min(srclen, POLY1305_BLOCK_SIZE - dctx->buflen); in crypto_poly1305_p10_update() 85 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_p10_update() 88 dctx->buflen += bytes; in crypto_poly1305_p10_update() 90 if (dctx->buflen == POLY1305_BLOCK_SIZE) { in crypto_poly1305_p10_update() 98 dctx->buflen = 0; in crypto_poly1305_p10_update() 126 dctx->buflen = srclen; in crypto_poly1305_p10_update() 140 if ((dctx->buflen)) { in crypto_poly1305_p10_final() 141 dctx->buf[dctx->buflen++] = 1; in crypto_poly1305_p10_final() [all …]
|
/linux-6.6.21/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()
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/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 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()
|
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-6.6.21/fs/ |
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-6.6.21/security/keys/ |
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-6.6.21/fs/9p/ |
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-6.6.21/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()
|
D | nhpoly1305.c | 149 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-6.6.21/include/crypto/internal/ |
D | blake2b.h | 29 const size_t fill = BLAKE2B_BLOCK_SIZE - state->buflen; in __blake2b_update() 34 memcpy(state->buf + state->buflen, in, fill); in __blake2b_update() 36 state->buflen = 0; in __blake2b_update() 47 memcpy(state->buf + state->buflen, in, inlen); in __blake2b_update() 48 state->buflen += inlen; in __blake2b_update() 57 memset(state->buf + state->buflen, 0, in __blake2b_final() 58 BLAKE2B_BLOCK_SIZE - state->buflen); /* Padding */ in __blake2b_final() 59 (*compress)(state, state->buf, 1, state->buflen); in __blake2b_final()
|
/linux-6.6.21/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | debugfs.h | 13 #define MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ argument 19 char buf[buflen] = {}; \ 28 #define _MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, buflen, argtype) \ argument 29 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \ 37 #define _MVM_DEBUGFS_WRITE_FILE_OPS(name, buflen, argtype) \ argument 38 MVM_DEBUGFS_WRITE_WRAPPER(name, buflen, argtype) \
|
/linux-6.6.21/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()
|
/linux-6.6.21/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 …]
|
/linux-6.6.21/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()
|