Home
last modified time | relevance | path

Searched refs:nbytes (Results 1 – 25 of 425) sorted by relevance

12345678910>>...17

/linux-5.15/arch/x86/crypto/
A Dsm4_aesni_avx_glue.c44 unsigned int nbytes; in ecb_do_crypt() local
49 while ((nbytes = walk.nbytes) > 0) { in ecb_do_crypt()
54 while (nbytes >= SM4_CRYPT8_BLOCK_SIZE) { in ecb_do_crypt()
58 nbytes -= SM4_CRYPT8_BLOCK_SIZE; in ecb_do_crypt()
60 while (nbytes >= SM4_BLOCK_SIZE) { in ecb_do_crypt()
61 unsigned int nblocks = min(nbytes >> 4, 4u); in ecb_do_crypt()
65 nbytes -= nblocks * SM4_BLOCK_SIZE; in ecb_do_crypt()
69 err = skcipher_walk_done(&walk, nbytes); in ecb_do_crypt()
98 unsigned int nbytes; in sm4_cbc_encrypt() local
103 while ((nbytes = walk.nbytes) > 0) { in sm4_cbc_encrypt()
[all …]
H A Dblowfish_glue.c77 unsigned int nbytes; in ecb_crypt() local
82 while ((nbytes = walk.nbytes)) { in ecb_crypt()
87 if (nbytes >= bsize * 4) { in ecb_crypt()
93 nbytes -= bsize * 4; in ecb_crypt()
94 } while (nbytes >= bsize * 4); in ecb_crypt()
96 if (nbytes < bsize) in ecb_crypt()
106 nbytes -= bsize; in ecb_crypt()
107 } while (nbytes >= bsize); in ecb_crypt()
110 err = skcipher_walk_done(&walk, nbytes); in ecb_crypt()
130 unsigned int nbytes = walk->nbytes; in __cbc_encrypt() local
[all …]
A Ddes3_ede_glue.c78 unsigned int nbytes; in ecb_crypt() local
83 while ((nbytes = walk.nbytes)) { in ecb_crypt()
88 if (nbytes >= bsize * 3) { in ecb_crypt()
95 nbytes -= bsize * 3; in ecb_crypt()
96 } while (nbytes >= bsize * 3); in ecb_crypt()
98 if (nbytes < bsize) in ecb_crypt()
108 nbytes -= bsize; in ecb_crypt()
109 } while (nbytes >= bsize); in ecb_crypt()
112 err = skcipher_walk_done(&walk, nbytes); in ecb_crypt()
138 unsigned int nbytes = walk->nbytes; in __cbc_encrypt() local
[all …]
H A Daesni-intel_glue.c283 unsigned int nbytes; in ecb_encrypt() local
288 while ((nbytes = walk.nbytes)) { in ecb_encrypt()
291 nbytes & AES_BLOCK_MASK); in ecb_encrypt()
293 nbytes &= AES_BLOCK_SIZE - 1; in ecb_encrypt()
294 err = skcipher_walk_done(&walk, nbytes); in ecb_encrypt()
305 unsigned int nbytes; in ecb_decrypt() local
310 while ((nbytes = walk.nbytes)) { in ecb_decrypt()
313 nbytes & AES_BLOCK_MASK); in ecb_decrypt()
315 nbytes &= AES_BLOCK_SIZE - 1; in ecb_decrypt()
316 err = skcipher_walk_done(&walk, nbytes); in ecb_decrypt()
[all …]
/linux-5.15/drivers/media/test-drivers/vidtv/
A Dvidtv_ts.c53 u32 nbytes = 0; in vidtv_ts_null_write_into() local
62 nbytes += vidtv_memcpy(args.dest_buf, in vidtv_ts_null_write_into()
63 args.dest_offset + nbytes, in vidtv_ts_null_write_into()
71 nbytes += vidtv_memset(args.dest_buf, in vidtv_ts_null_write_into()
72 args.dest_offset + nbytes, in vidtv_ts_null_write_into()
75 TS_PACKET_LEN - nbytes); in vidtv_ts_null_write_into()
78 if (nbytes != TS_PACKET_LEN) in vidtv_ts_null_write_into()
81 nbytes); in vidtv_ts_null_write_into()
83 return nbytes; in vidtv_ts_null_write_into()
88 u32 nbytes = 0; in vidtv_ts_pcr_write_into() local
[all …]
A Dvidtv_pes.c82 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_pts_dts() local
122 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_pts_dts()
123 args->dest_offset + nbytes, in vidtv_pes_write_pts_dts()
128 return nbytes; in vidtv_pes_write_pts_dts()
133 u32 nbytes = 0; /* the number of bytes written by this function */ in vidtv_pes_write_h() local
158 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h()
159 args->dest_offset + nbytes, in vidtv_pes_write_h()
165 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_pes_write_h()
166 args->dest_offset + nbytes, in vidtv_pes_write_h()
173 pts_dts_args.dest_offset = args->dest_offset + nbytes; in vidtv_pes_write_h()
[all …]
A Dvidtv_psi.c178 u32 nbytes = 0; in vidtv_psi_ts_psi_write_into() local
190 nbytes += vidtv_memset(args->dest_buf, in vidtv_psi_ts_psi_write_into()
191 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into()
198 nbytes_past_boundary = (args->dest_offset + nbytes) % TS_PACKET_LEN; in vidtv_psi_ts_psi_write_into()
205 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_psi_ts_psi_write_into()
206 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into()
219 nbytes += vidtv_memset(args->dest_buf, in vidtv_psi_ts_psi_write_into()
220 args->dest_offset + nbytes, in vidtv_psi_ts_psi_write_into()
226 nbytes_past_boundary = (args->dest_offset + nbytes) % TS_PACKET_LEN; in vidtv_psi_ts_psi_write_into()
229 nbytes += vidtv_memcpy(args->dest_buf, in vidtv_psi_ts_psi_write_into()
[all …]
A Dvidtv_mux.c164 u32 nbytes; in vidtv_mux_push_si() local
214 nbytes = m->mux_buf_offset - initial_offset; in vidtv_mux_push_si()
218 return nbytes; in vidtv_mux_push_si()
225 u32 nbytes = 0; in vidtv_mux_push_pcr() local
236 nbytes += vidtv_ts_pcr_write_into(args); in vidtv_mux_push_pcr()
237 m->mux_buf_offset += nbytes; in vidtv_mux_push_pcr()
241 return nbytes; in vidtv_mux_push_pcr()
287 u32 nbytes = 0; in vidtv_mux_packetize_access_units() local
302 args.access_unit_len = au->nbytes; in vidtv_mux_packetize_access_units()
318 nbytes = m->mux_buf_offset - initial_offset; in vidtv_mux_packetize_access_units()
[all …]
/linux-5.15/crypto/
H A Dpcbc.c25 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_segment() local
37 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_segment()
39 return nbytes; in crypto_pcbc_encrypt_segment()
47 unsigned int nbytes = walk->nbytes; in crypto_pcbc_encrypt_inplace() local
59 } while ((nbytes -= bsize) >= bsize); in crypto_pcbc_encrypt_inplace()
61 return nbytes; in crypto_pcbc_encrypt_inplace()
69 unsigned int nbytes; in crypto_pcbc_encrypt() local
74 while ((nbytes = walk.nbytes)) { in crypto_pcbc_encrypt()
76 nbytes = crypto_pcbc_encrypt_inplace(req, &walk, in crypto_pcbc_encrypt()
79 nbytes = crypto_pcbc_encrypt_segment(req, &walk, in crypto_pcbc_encrypt()
[all …]
A Dcfb.c52 unsigned int nbytes = walk->nbytes; in crypto_cfb_final() local
55 crypto_xor_cpy(dst, stream, src, nbytes); in crypto_cfb_final()
62 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_segment() local
74 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_segment()
78 return nbytes; in crypto_cfb_encrypt_segment()
85 unsigned int nbytes = walk->nbytes; in crypto_cfb_encrypt_inplace() local
96 } while ((nbytes -= bsize) >= bsize); in crypto_cfb_encrypt_inplace()
100 return nbytes; in crypto_cfb_encrypt_inplace()
112 while (walk.nbytes >= bsize) { in crypto_cfb_encrypt()
120 if (walk.nbytes) { in crypto_cfb_encrypt()
[all …]
H A Dcbc.c22 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_segment() local
40 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_segment()
42 return nbytes; in crypto_cbc_encrypt_segment()
50 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_inplace() local
66 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_encrypt_inplace()
70 return nbytes; in crypto_cbc_encrypt_inplace()
81 while (walk.nbytes) { in crypto_cbc_encrypt()
97 unsigned int nbytes = walk->nbytes; in crypto_cbc_decrypt_segment() local
115 } while ((nbytes -= bsize) >= bsize); in crypto_cbc_decrypt_segment()
119 return nbytes; in crypto_cbc_decrypt_segment()
[all …]
H A Dscatterwalk.c18 static inline void memcpy_dir(void *buf, void *sgdata, size_t nbytes, int out) in memcpy_dir() argument
23 memcpy(dst, src, nbytes); in memcpy_dir()
27 size_t nbytes, int out) in scatterwalk_copychunks() argument
33 if (len_this_page > nbytes) in scatterwalk_copychunks()
34 len_this_page = nbytes; in scatterwalk_copychunks()
44 if (nbytes == len_this_page) in scatterwalk_copychunks()
48 nbytes -= len_this_page; in scatterwalk_copychunks()
56 unsigned int start, unsigned int nbytes, int out) in scatterwalk_map_and_copy() argument
61 if (!nbytes) in scatterwalk_map_and_copy()
67 scatterwalk_copychunks(buf, &walk, nbytes, out); in scatterwalk_map_and_copy()
/linux-5.15/arch/arm64/crypto/
A Dghash-ce-glue.c369 int nbytes = walk.nbytes; in gcm_encrypt() local
373 if (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE)) { in gcm_encrypt()
374 src = dst = memcpy(buf + sizeof(buf) - nbytes, in gcm_encrypt()
375 src, nbytes); in gcm_encrypt()
376 } else if (nbytes < walk.total) { in gcm_encrypt()
377 nbytes &= ~(AES_BLOCK_SIZE - 1); in gcm_encrypt()
382 pmull_gcm_encrypt(nbytes, dst, src, ctx->ghash_key.h, in gcm_encrypt()
387 if (unlikely(!nbytes)) in gcm_encrypt()
390 if (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE)) in gcm_encrypt()
392 buf + sizeof(buf) - nbytes, nbytes); in gcm_encrypt()
[all …]
/linux-5.15/arch/powerpc/crypto/
A Daes-spe-glue.c185 unsigned int nbytes; in ppc_ecb_crypt() local
190 while ((nbytes = walk.nbytes) != 0) { in ppc_ecb_crypt()
191 nbytes = min_t(unsigned int, nbytes, MAX_BYTES); in ppc_ecb_crypt()
192 nbytes = round_down(nbytes, AES_BLOCK_SIZE); in ppc_ecb_crypt()
197 ctx->key_enc, ctx->rounds, nbytes); in ppc_ecb_crypt()
200 ctx->key_dec, ctx->rounds, nbytes); in ppc_ecb_crypt()
203 err = skcipher_walk_done(&walk, walk.nbytes - nbytes); in ppc_ecb_crypt()
224 unsigned int nbytes; in ppc_cbc_crypt() local
229 while ((nbytes = walk.nbytes) != 0) { in ppc_cbc_crypt()
230 nbytes = min_t(unsigned int, nbytes, MAX_BYTES); in ppc_cbc_crypt()
[all …]
/linux-5.15/drivers/comedi/
A Dcomedi_buf.c341 unsigned int nbytes) in comedi_buf_write_alloc() argument
346 if (nbytes > unalloc) in comedi_buf_write_alloc()
347 nbytes = unalloc; in comedi_buf_write_alloc()
349 async->buf_write_alloc_count += nbytes; in comedi_buf_write_alloc()
357 return nbytes; in comedi_buf_write_alloc()
431 unsigned int nbytes) in comedi_buf_write_free() argument
436 if (nbytes > allocated) in comedi_buf_write_free()
437 nbytes = allocated; in comedi_buf_write_free()
439 async->buf_write_count += nbytes; in comedi_buf_write_free()
440 async->buf_write_ptr += nbytes; in comedi_buf_write_free()
[all …]
/linux-5.15/drivers/spi/
A Dspi-mtk-nor.c146 if (op->addr.nbytes == 4) { in mtk_nor_set_addr()
164 dummy = op->dummy.nbytes * BITS_PER_BYTE / op->dummy.buswidth; in mtk_nor_match_read()
191 tx_len = op->cmd.nbytes + op->addr.nbytes; in mtk_nor_match_prg()
195 tx_len += op->dummy.nbytes; in mtk_nor_match_prg()
203 if ((!op->addr.nbytes) && in mtk_nor_match_prg()
204 (tx_len + op->data.nbytes > MTK_NOR_REG_PRGDATA_MAX + 1)) in mtk_nor_match_prg()
210 rx_len = op->data.nbytes; in mtk_nor_match_prg()
211 prg_left = MTK_NOR_PRG_CNT_MAX / 8 - tx_len - op->dummy.nbytes; in mtk_nor_match_prg()
215 if (!op->addr.nbytes) in mtk_nor_match_prg()
220 prg_len = tx_len + op->dummy.nbytes + rx_len; in mtk_nor_match_prg()
[all …]
A Dspi-mem.c41 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data()
54 return spi_map_buf(ctlr, dmadev, sgt, op->data.buf.in, op->data.nbytes, in spi_controller_dma_map_mem_op_data()
87 if (!op->data.nbytes) in spi_controller_dma_unmap_mem_op_data()
147 if (op->addr.nbytes && in spi_mem_check_buswidth()
151 if (op->dummy.nbytes && in spi_mem_check_buswidth()
166 if (op->cmd.nbytes != 2) in spi_mem_dtr_supports_op()
179 if (op->cmd.nbytes != 1) in spi_mem_default_supports_op()
196 if (!op->cmd.buswidth || !op->cmd.nbytes) in spi_mem_check_op()
199 if ((op->addr.nbytes && !op->addr.buswidth) || in spi_mem_check_op()
200 (op->dummy.nbytes && !op->dummy.buswidth) || in spi_mem_check_op()
[all …]
/linux-5.15/lib/mpi/
H A Dmpicoder.c36 MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes) in mpi_read_raw_data() argument
44 while (nbytes > 0 && buffer[0] == 0) { in mpi_read_raw_data()
46 nbytes--; in mpi_read_raw_data()
49 nbits = nbytes * 8; in mpi_read_raw_data()
54 if (nbytes > 0) in mpi_read_raw_data()
57 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_data()
65 if (nbytes > 0) { in mpi_read_raw_data()
66 i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB; in mpi_read_raw_data()
85 unsigned int nbits, nbytes; in mpi_read_from_buffer() local
97 nbytes = DIV_ROUND_UP(nbits, 8); in mpi_read_from_buffer()
[all …]
/linux-5.15/include/trace/events/
H A Drandom.h143 TP_PROTO(int nbytes, unsigned long IP),
145 TP_ARGS(nbytes, IP),
148 __field( int, nbytes )
153 __entry->nbytes = nbytes;
157 TP_printk("nbytes %d caller %pS", __entry->nbytes, (void *)__entry->IP)
161 TP_PROTO(int nbytes, unsigned long IP),
163 TP_ARGS(nbytes, IP)
167 TP_PROTO(int nbytes, unsigned long IP),
169 TP_ARGS(nbytes, IP)
173 TP_PROTO(const char *pool_name, int nbytes, int entropy_count,
[all …]
/linux-5.15/drivers/infiniband/hw/hfi1/
A Dpio_copy.c184 unsigned int nbytes) in read_low_bytes() argument
187 jcopy(&pbuf->carry.val8[0], from, nbytes); in read_low_bytes()
188 pbuf->carry_bytes = nbytes; in read_low_bytes()
200 const void *from, unsigned int nbytes) in read_extra_bytes() argument
202 jcopy(&pbuf->carry.val8[pbuf->carry_bytes], from, nbytes); in read_extra_bytes()
203 pbuf->carry_bytes += nbytes; in read_extra_bytes()
263 const void *from, size_t nbytes) in seg_pio_copy_start() argument
273 dend = dest + ((nbytes >> 3) * sizeof(u64)); in seg_pio_copy_start()
338 read_low_bytes(pbuf, from, nbytes & 0x7); in seg_pio_copy_start()
340 pbuf->qw_written = 1 /*PBC*/ + (nbytes >> 3); in seg_pio_copy_start()
[all …]
/linux-5.15/lib/crypto/
A Dpoly1305.c31 unsigned int nbytes) in poly1305_update_generic() argument
36 bytes = min(nbytes, POLY1305_BLOCK_SIZE - desc->buflen); in poly1305_update_generic()
39 nbytes -= bytes; in poly1305_update_generic()
49 if (likely(nbytes >= POLY1305_BLOCK_SIZE)) { in poly1305_update_generic()
51 nbytes / POLY1305_BLOCK_SIZE, 1); in poly1305_update_generic()
52 src += nbytes - (nbytes % POLY1305_BLOCK_SIZE); in poly1305_update_generic()
53 nbytes %= POLY1305_BLOCK_SIZE; in poly1305_update_generic()
56 if (unlikely(nbytes)) { in poly1305_update_generic()
57 desc->buflen = nbytes; in poly1305_update_generic()
58 memcpy(desc->buf, src, nbytes); in poly1305_update_generic()
/linux-5.15/drivers/thunderbolt/
A Dnvm.c188 size_t nbytes; in tb_nvm_read_data() local
192 nbytes = min_t(size_t, size + offset, NVM_DATA_DWORDS * 4); in tb_nvm_read_data()
195 dwords = ALIGN(nbytes, 4) / 4; in tb_nvm_read_data()
204 nbytes -= offset; in tb_nvm_read_data()
205 memcpy(buf, data + offset, nbytes); in tb_nvm_read_data()
207 size -= nbytes; in tb_nvm_read_data()
208 address += nbytes; in tb_nvm_read_data()
209 buf += nbytes; in tb_nvm_read_data()
235 size_t nbytes; in tb_nvm_write_data() local
239 nbytes = min_t(u32, size + offset, NVM_DATA_DWORDS * 4); in tb_nvm_write_data()
[all …]
/linux-5.15/include/crypto/
H A Dctr.h36 while (walk.nbytes > 0) { in crypto_ctr_encrypt_walk()
39 int nbytes = walk.nbytes; in crypto_ctr_encrypt_walk() local
42 if (nbytes < walk.total) { in crypto_ctr_encrypt_walk()
43 tail = walk.nbytes & (blocksize - 1); in crypto_ctr_encrypt_walk()
44 nbytes -= tail; in crypto_ctr_encrypt_walk()
48 int bsize = min(nbytes, blocksize); in crypto_ctr_encrypt_walk()
57 nbytes -= bsize; in crypto_ctr_encrypt_walk()
58 } while (nbytes > 0); in crypto_ctr_encrypt_walk()
/linux-5.15/fs/coda/
H A Dpsdev.c92 size_t nbytes, loff_t *off) in coda_psdev_write() argument
103 if (nbytes < (2 * sizeof(u_int32_t))) in coda_psdev_write()
114 if ( nbytes < sizeof(struct coda_out_hdr) ) { in coda_psdev_write()
117 count = nbytes; in coda_psdev_write()
120 if ( nbytes > size ) { in coda_psdev_write()
123 nbytes = size; in coda_psdev_write()
125 dcbuf = kvmalloc(nbytes, GFP_KERNEL); in coda_psdev_write()
130 if (copy_from_user(dcbuf, buf, nbytes)) { in coda_psdev_write()
137 error = coda_downcall(vcp, hdr.opcode, dcbuf, nbytes); in coda_psdev_write()
146 count = nbytes; in coda_psdev_write()
[all …]
/linux-5.15/arch/sparc/crypto/
H A Daes_glue.c224 unsigned int nbytes; in ecb_encrypt() local
232 while ((nbytes = walk.nbytes) != 0) { in ecb_encrypt()
235 round_down(nbytes, AES_BLOCK_SIZE)); in ecb_encrypt()
236 err = skcipher_walk_done(&walk, nbytes % AES_BLOCK_SIZE); in ecb_encrypt()
248 unsigned int nbytes; in ecb_decrypt() local
257 while ((nbytes = walk.nbytes) != 0) { in ecb_decrypt()
260 round_down(nbytes, AES_BLOCK_SIZE)); in ecb_decrypt()
261 err = skcipher_walk_done(&walk, nbytes % AES_BLOCK_SIZE); in ecb_decrypt()
273 unsigned int nbytes; in cbc_encrypt() local
281 while ((nbytes = walk.nbytes) != 0) { in cbc_encrypt()
[all …]

12345678910>>...17