| /src/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
| H A D | mmap_seek.c | 102 off_t block_size = atoi(argv[3]); in main() local 104 if (block_size * 2 > file_size) { in main() 135 seek_data(fd, block_size, -1); in main() 136 seek_hole(fd, 0, block_size); in main() 137 seek_hole(fd, block_size, block_size); in main() 142 seek_data(fd, block_size, block_size); in main() 143 seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size)); in main() 144 seek_hole(fd, block_size, P2ROUNDUP(file_size / 2, block_size)); in main() 150 P2ROUNDUP(file_size * 3 / 4, block_size)); in main() 155 memset(buf + block_size, 0, block_size); in main() [all …]
|
| /src/sys/contrib/openzfs/module/icp/algs/modes/ |
| H A D | gcm.c | 89 crypto_data_t *out, size_t block_size, in gcm_mode_encrypt_contiguous_blocks() argument 97 ctx, data, length, out, block_size)); in gcm_mode_encrypt_contiguous_blocks() 114 if (length + ctx->gcm_remainder_len < block_size) { in gcm_mode_encrypt_contiguous_blocks() 132 need = block_size - ctx->gcm_remainder_len; in gcm_mode_encrypt_contiguous_blocks() 160 ctx->gcm_processed_data_len += block_size; in gcm_mode_encrypt_contiguous_blocks() 163 &out_data_1_len, &out_data_2, block_size); in gcm_mode_encrypt_contiguous_blocks() 166 if (out_data_1_len == block_size) { in gcm_mode_encrypt_contiguous_blocks() 173 block_size - out_data_1_len); in gcm_mode_encrypt_contiguous_blocks() 177 out->cd_offset += block_size; in gcm_mode_encrypt_contiguous_blocks() 187 datap += block_size; in gcm_mode_encrypt_contiguous_blocks() [all …]
|
| H A D | ccm.c | 43 crypto_data_t *out, size_t block_size, in ccm_mode_encrypt_contiguous_blocks() argument 61 if (length + ctx->ccm_remainder_len < block_size) { in ccm_mode_encrypt_contiguous_blocks() 78 need = block_size - ctx->ccm_remainder_len; in ccm_mode_encrypt_contiguous_blocks() 126 ctx->ccm_processed_data_len += block_size; in ccm_mode_encrypt_contiguous_blocks() 129 &out_data_1_len, &out_data_2, block_size); in ccm_mode_encrypt_contiguous_blocks() 132 if (out_data_1_len == block_size) { in ccm_mode_encrypt_contiguous_blocks() 139 block_size - out_data_1_len); in ccm_mode_encrypt_contiguous_blocks() 143 out->cd_offset += block_size; in ccm_mode_encrypt_contiguous_blocks() 150 datap += block_size; in ccm_mode_encrypt_contiguous_blocks() 156 if (remainder > 0 && remainder < block_size) { in ccm_mode_encrypt_contiguous_blocks() [all …]
|
| /src/contrib/xz/src/liblzma/common/ |
| H A D | filter_encoder.c | 37 uint64_t (*block_size)(const void *options); member 65 .block_size = NULL, // Not needed for LZMA1 74 .block_size = NULL, // Not needed for LZMA1 85 .block_size = &lzma_lzma2_block_size, 96 .block_size = NULL, 106 .block_size = NULL, 116 .block_size = NULL, 126 .block_size = NULL, 136 .block_size = NULL, 146 .block_size = NULL, [all …]
|
| H A D | stream_encoder_mt.c | 114 size_t block_size; member 229 .uncompressed_size = thr->coder->block_size, in worker_encode() 501 thr->in = lzma_alloc(coder->block_size, allocator); in initialize_new_thread() 615 &thr_in_size, coder->block_size); in stream_encode_in() 623 const bool finish = thr_in_size == coder->block_size in stream_encode_in() 957 const lzma_filter **filters, uint64_t *block_size, in get_options() argument 980 if (options->block_size > 0) in get_options() 981 *block_size = options->block_size; in get_options() 983 *block_size = lzma_mt_block_size(*filters); in get_options() 989 if (*block_size > BLOCK_SIZE_MAX || *block_size == UINT64_MAX) in get_options() [all …]
|
| /src/sys/dev/usb/ |
| H A D | usb_mbuf.c | 65 usb_size_t block_size, uint16_t nblocks) in usb_alloc_mbufs() argument 73 block_size += ((-block_size) & (USB_HOST_ALIGN - 1)); in usb_alloc_mbufs() 75 if (nblocks && block_size) { in usb_alloc_mbufs() 76 alloc_size = (block_size + sizeof(struct usb_mbuf)) * nblocks; in usb_alloc_mbufs() 87 m_ptr->max_data_len = block_size; in usb_alloc_mbufs() 92 data_ptr += block_size; in usb_alloc_mbufs()
|
| /src/sys/contrib/openzfs/tests/zfs-tests/cmd/file/ |
| H A D | file_write.c | 50 static void randomize_buffer(int block_size) { in randomize_buffer() argument 53 for (i = 0; i < block_size; i++) in randomize_buffer() 74 int block_size = BLOCKSZ; in main() local 88 block_size = atoi(optarg); in main() 137 if (block_size > BIGBUFFERSIZE) { in main() 157 for (i = 0; i < block_size; i++) { in main() 212 "offset = %lld, ", filename, block_size, in main() 226 randomize_buffer(block_size); in main() 228 if ((n = write(bigfd, &bigbuffer, block_size)) == -1) { in main() 241 PRId64 ")\n", good_writes, (good_writes * block_size)); in main()
|
| /src/crypto/libecc/include/libecc/hash/ |
| H A D | hash_algs.h | 236 u8 block_size; member 263 .block_size = SHA224_BLOCK_SIZE, 277 .block_size = SHA256_BLOCK_SIZE, 291 .block_size = SHA384_BLOCK_SIZE, 305 .block_size = SHA512_BLOCK_SIZE, 319 .block_size = SHA512_224_BLOCK_SIZE, 333 .block_size = SHA512_256_BLOCK_SIZE, 347 .block_size = SHA3_224_BLOCK_SIZE, 361 .block_size = SHA3_256_BLOCK_SIZE, 375 .block_size = SHA3_384_BLOCK_SIZE, [all …]
|
| /src/crypto/libecc/src/examples/hash/ |
| H A D | hash.c | 14 …lg_type gen_hash_type, hash_alg_type *hash_type, const hash_mapping **hm, u8 *hlen, u8 *block_size) in get_libecc_hash() argument 151 ret = get_hash_sizes(htype, hlen, block_size); EG(ret, err); in get_libecc_hash() 169 int gen_hash_get_hash_sizes(gen_hash_alg_type gen_hash_type, u8 *hlen, u8 *block_size) in gen_hash_get_hash_sizes() argument 173 MUST_HAVE((hlen != NULL) && (block_size != NULL), ret, err); in gen_hash_get_hash_sizes() 178 (*block_size) = MD2_BLOCK_SIZE; in gen_hash_get_hash_sizes() 184 (*block_size) = MD4_BLOCK_SIZE; in gen_hash_get_hash_sizes() 190 (*block_size) = MD5_BLOCK_SIZE; in gen_hash_get_hash_sizes() 196 (*block_size) = SHA0_BLOCK_SIZE; in gen_hash_get_hash_sizes() 202 (*block_size) = SHA1_BLOCK_SIZE; in gen_hash_get_hash_sizes() 209 (*block_size) = MDC2_BLOCK_SIZE; in gen_hash_get_hash_sizes() [all …]
|
| /src/crypto/openssl/ssl/record/methods/ |
| H A D | tls_pad.c | 31 size_t block_size, 58 size_t block_size, size_t mac_size, in ssl3_cbc_remove_padding_and_mac() argument 74 good &= constant_time_ge_s(block_size, padding_length + 1); in ssl3_cbc_remove_padding_and_mac() 78 block_size, mac_size, good, libctx); in ssl3_cbc_remove_padding_and_mac() 103 size_t block_size, size_t mac_size, in tls1_cbc_remove_padding_and_mac() argument 109 size_t overhead = ((block_size == 1) ? 0 : 1) /* padding length byte */ in tls1_cbc_remove_padding_and_mac() 119 if (block_size != 1) { in tls1_cbc_remove_padding_and_mac() 162 block_size, mac_size, good, libctx); in tls1_cbc_remove_padding_and_mac() 187 size_t block_size, in ssl3_cbc_copy_mac() argument 230 if (block_size == 1) { in ssl3_cbc_copy_mac()
|
| /src/stand/libofw/ |
| H A D | ofw_disk.c | 164 int block_size; in ofwd_ioctl() local 169 block_size = OF_block_size(dev->d_handle); in ofwd_ioctl() 170 *(u_int *)data = block_size; in ofwd_ioctl() 173 block_size = OF_block_size(dev->d_handle); in ofwd_ioctl() 175 *(uint64_t *)data = ((uint64_t)n * block_size); in ofwd_ioctl() 186 uintmax_t block_size, n; in ofwd_print() local 198 block_size = OF_block_size(kdp->d_handle); in ofwd_print() 202 kdp->d_path, n, block_size, n * block_size); in ofwd_print()
|
| /src/tools/tools/nvmf/nvmfdd/ |
| H A D | nvmfdd.c | 194 validate_namespace(struct nvmf_qpair *qp, u_int nsid, u_int *block_size) in validate_namespace() argument 235 *block_size = 1 << lbads; in validate_namespace() 236 fprintf(stderr, "Detected block size %u\n", *block_size); in validate_namespace() 294 nvmf_io(struct nvmf_qpair *qp, u_int nsid, u_int block_size, enum rw command, in nvmf_io() argument 302 if (offset % block_size != 0) { in nvmf_io() 306 if (length % block_size != 0 && command == WRITE) in nvmf_io() 309 buf = malloc(block_size); in nvmf_io() 313 if (todo > block_size) in nvmf_io() 314 todo = block_size; in nvmf_io() 328 if (todo < block_size) in nvmf_io() [all …]
|
| /src/contrib/libarchive/libarchive/ |
| H A D | archive_read_open_filename.c | 75 size_t block_size; member 98 size_t block_size) in archive_read_open_file() argument 100 return (archive_read_open_filename(a, filename, block_size)); in archive_read_open_file() 105 size_t block_size) in archive_read_open_filename() argument 110 return archive_read_open_filenames(a, filenames, block_size); in archive_read_open_filename() 115 size_t block_size) in archive_read_open_filenames() argument 132 mine->block_size = block_size; in archive_read_open_filenames() 170 size_t block_size) in archive_read_open_filenames_w() argument 186 mine->block_size = block_size; in archive_read_open_filenames_w() 245 size_t block_size) in archive_read_open_filename_w() argument [all …]
|
| H A D | archive_write_add_filter_lz4.c | 73 size_t block_size; member 230 data->block_size = bkmap[0]; in archive_filter_lz4_open() 232 data->block_size = bkmap[data->block_maximum_size - 4]; in archive_filter_lz4_open() 234 required_size = 4 + 15 + 4 + data->block_size + 4 + 4; in archive_filter_lz4_open() 257 if (data->in_buffer_size < data->block_size + pre_block_size) { in archive_filter_lz4_open() 259 data->in_buffer_size = data->block_size; in archive_filter_lz4_open() 266 data->in_buffer_size = data->block_size; in archive_filter_lz4_open() 439 data->in_buffer == data->in && length >= data->block_size) { in lz4_write_one_block() 440 r = drive_compressor(f, p, data->block_size); in lz4_write_one_block() 442 r = (ssize_t)data->block_size; in lz4_write_one_block() [all …]
|
| H A D | archive_read_open_fd.c | 55 size_t block_size; member 67 archive_read_open_fd(struct archive *a, int fd, size_t block_size) in archive_read_open_fd() argument 80 b = malloc(block_size); in archive_read_open_fd() 87 mine->block_size = block_size; in archive_read_open_fd() 122 bytes_read = read(mine->fd, mine->buffer, mine->block_size); in file_read() 153 skip = (la_seek_t)(((int64_t)skip / mine->block_size) * mine->block_size); in file_skip()
|
| H A D | archive_read_open_file.c | 55 size_t block_size; member 71 size_t block_size = 128 * 1024; in archive_read_open_FILE() local 76 b = malloc(block_size); in archive_read_open_FILE() 83 mine->block_size = block_size; in archive_read_open_FILE() 118 bytes_read = fread(mine->buffer, 1, mine->block_size, mine->f); in FILE_read() 119 if (bytes_read < mine->block_size && ferror(mine->f)) { in FILE_read()
|
| /src/crypto/krb5/src/lib/crypto/krb/ |
| H A D | enc_dk_cmac.c | 40 return ktp->enc->block_size; in krb5int_camellia_crypto_length() 45 return ktp->enc->block_size; in krb5int_camellia_crypto_length() 100 if (header == NULL || header->data.length < enc->block_size) in krb5int_dk_cmac_encrypt() 103 if (trailer == NULL || trailer->data.length < enc->block_size) in krb5int_dk_cmac_encrypt() 115 header->data.length = enc->block_size; in krb5int_dk_cmac_encrypt() 151 if (header == NULL || header->data.length != enc->block_size) in krb5int_dk_cmac_decrypt() 154 if (trailer == NULL || trailer->data.length != enc->block_size) in krb5int_dk_cmac_decrypt() 168 ret = alloc_data(&cksum, enc->block_size); in krb5int_dk_cmac_decrypt() 174 if (k5_bcmp(cksum.data, trailer->data.data, enc->block_size) != 0) in krb5int_dk_cmac_decrypt()
|
| H A D | aead.c | 156 size_t count, size_t block_size, krb5_boolean signing) in k5_iov_cursor_init() argument 160 cursor->block_size = block_size; in k5_iov_cursor_init() 171 size_t nbytes, bsz = cursor->block_size, remain = cursor->block_size; in k5_iov_cursor_get() 174 remain = cursor->block_size; in k5_iov_cursor_get() 203 size_t nbytes, bsz = cursor->block_size, remain = cursor->block_size; in k5_iov_cursor_put() 206 remain = cursor->block_size; in k5_iov_cursor_put()
|
| /src/tools/tools/usbtest/ |
| H A D | usb_msc_test.c | 97 static uint32_t block_size = 512; variable 294 len /= block_size; in do_read_10() 304 retval = do_msc_cmd(cmd, 10, buf, len * block_size, 1, 0, lun, 0); in do_read_10() 324 len /= block_size; in do_write_10() 334 retval = do_msc_cmd(cmd, 10, buf, (len * block_size), 0, 0, lun, abort); in do_write_10() 447 retval = do_read_10(io_offset, io_size * block_size, in do_io_test() 448 buffer + (io_offset * block_size), lun); in do_io_test() 451 if (bcmp(buffer + (io_offset * block_size), in do_io_test() 452 reference + (io_offset * block_size), in do_io_test() 453 io_size * block_size)) { in do_io_test() [all …]
|
| /src/tests/sys/cddl/zfs/bin/ |
| H A D | file_write.c | 58 int block_size = BLOCKSZ; in main() local 74 block_size = atoi(optarg); in main() 120 if (block_size > BIGBUFFERSIZE) { in main() 134 for (i = 0; i < block_size; i++) { in main() 190 "offset = %"PRId64", data = %s%d\n", filename, block_size, in main() 199 if ((n = write(bigfd, &bigbuffer, block_size)) == -1) { in main() 211 good_writes, (good_writes * block_size)); in main()
|
| /src/usr.sbin/virtual_oss/virtual_equalizer/ |
| H A D | equalizer.c | 51 int block_size; member 112 for (i = 0; i <= (e->block_size / 2); ++i) { in equalizer_load_freq_amps() 113 const double f = (i * e->rate) / e->block_size; in equalizer_load_freq_amps() 145 equalizer_init(struct Equalizer *e, int rate, int block_size) in equalizer_init() argument 150 e->block_size = block_size; in equalizer_init() 152 buffer_size = sizeof(double) * e->block_size; in equalizer_init() 157 e->forward = fftw_plan_r2r_1d(block_size, e->fftw_time, e->fftw_freq, in equalizer_init() 159 e->inverse = fftw_plan_r2r_1d(block_size, e->fftw_freq, e->fftw_time, in equalizer_init() 167 int N = eq->block_size; in equalizer_load()
|
| /src/crypto/libecc/scripts/ |
| H A D | sha3.py | 92 self.block_size = (25*8) - (2 * (digest_size / 8)) 97 def block_size(self): member in Sha3_ctx 98 return self.block_size 105 if (self.idx == self.block_size): 110 self.state[int(self.block_size - 1)] = chr(ord(self.state[int(self.block_size - 1)]) ^ 0x80)
|
| /src/contrib/wpa/src/eap_common/ |
| H A D | eap_eke_common.c | 587 size_t block_size, icv_len, pad; in eap_eke_prot() local 591 block_size = AES_BLOCK_SIZE; in eap_eke_prot() 602 pad = data_len % block_size; in eap_eke_prot() 604 pad = block_size - pad; in eap_eke_prot() 606 if (*prot_len < block_size + data_len + pad + icv_len) { in eap_eke_prot() 612 if (random_get_bytes(pos, block_size)) in eap_eke_prot() 615 wpa_hexdump(MSG_DEBUG, "EAP-EKE: IV for Prot()", iv, block_size); in eap_eke_prot() 616 pos += block_size; in eap_eke_prot() 641 size_t block_size, icv_len; in eap_eke_decrypt_prot() local 645 block_size = AES_BLOCK_SIZE; in eap_eke_decrypt_prot() [all …]
|
| /src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_send/ |
| H A D | zfs_send_006_pos.ksh | 97 typeset -l block_size 106 for block_size in 64 128 256; do 107 log_must dd if=/dev/urandom of=/$TESTPOOL/$TESTFS1/file$block_size \ 108 bs=1M count=$block_size 109 log_must zfs snapshot $TESTPOOL/$TESTFS1@snap$block_size 110 log_must zfs bookmark $TESTPOOL/$TESTFS1@snap$block_size \ 111 "$TESTPOOL/$TESTFS1#bmark$block_size"
|
| /src/crypto/openssl/providers/implementations/digests/ |
| H A D | sha3_prov.c | 76 const size_t bsz = ctx->block_size; in keccak_update() 156 return SHA3_absorb(ctx->A, inp, len, ctx->block_size); in generic_sha3_absorb() 193 size_t rem = len % ctx->block_size; in s390x_sha3_absorb() 258 ctx->bufsz = outlen % ctx->block_size; in s390x_shake_squeeze() 264 len = ctx->block_size - ctx->bufsz; in s390x_shake_squeeze() 271 if (ctx->bufsz == ctx->block_size) in s390x_shake_squeeze() 277 ctx->bufsz = outlen % ctx->block_size; in s390x_shake_squeeze() 286 size_t bsz = ctx->block_size; in s390x_keccakc_final() 341 len = ctx->block_size - ctx->bufsz; in s390x_keccakc_squeeze() 344 ctx->buf[ctx->block_size - 1] |= 0x80; in s390x_keccakc_squeeze() [all …]
|