| /linux/lib/crypto/tests/ |
| H A D | hash-test-template.h | 14 static u8 *test_buf; variable 87 test_buf = orig_test_buf + alloc_len - TEST_BUF_LEN; in hash_suite_init() 95 test_buf = NULL; in hash_suite_exit() 112 rand_bytes_seeded_from_len(test_buf, data_len); in test_hash_test_vectors() 114 HASH(test_buf, data_len, actual_hash); in test_hash_test_vectors() 134 rand_bytes_seeded_from_len(test_buf, 4096); in test_hash_all_lens_up_to_4096() 137 HASH(test_buf, len, hash); in test_hash_all_lens_up_to_4096() 160 rand_bytes(&test_buf[offset], total_len); in test_hash_incremental_updates() 163 HASH(&test_buf[offset], total_len, hash1); in test_hash_incremental_updates() 175 HASH_UPDATE(&ctx, &test_buf[cur_offset], part_len); in test_hash_incremental_updates() [all …]
|
| H A D | blake2b_kunit.c | 44 u8 *data = &test_buf[0]; in test_blake2b_all_key_and_hash_lens() 72 rand_bytes(test_buf, data_len); in test_blake2b_with_guarded_key_buf() 75 u8 *guarded_key = &test_buf[TEST_BUF_LEN - key_len]; in test_blake2b_with_guarded_key_buf() 83 blake2b(key, key_len, test_buf, data_len, in test_blake2b_with_guarded_key_buf() 85 blake2b(guarded_key, key_len, test_buf, data_len, in test_blake2b_with_guarded_key_buf() 90 blake2b_update(&ctx, test_buf, data_len); in test_blake2b_with_guarded_key_buf() 104 rand_bytes(test_buf, data_len); in test_blake2b_with_guarded_out_buf() 107 u8 *guarded_hash = &test_buf[TEST_BUF_LEN - out_len]; in test_blake2b_with_guarded_out_buf() 109 blake2b(NULL, 0, test_buf, data_len, hash, out_len); in test_blake2b_with_guarded_out_buf() 110 blake2b(NULL, 0, test_buf, data_len, guarded_hash, out_len); in test_blake2b_with_guarded_out_buf()
|
| H A D | blake2s_kunit.c | 44 u8 *data = &test_buf[0]; in test_blake2s_all_key_and_hash_lens() 72 rand_bytes(test_buf, data_len); in test_blake2s_with_guarded_key_buf() 75 u8 *guarded_key = &test_buf[TEST_BUF_LEN - key_len]; in test_blake2s_with_guarded_key_buf() 83 blake2s(key, key_len, test_buf, data_len, in test_blake2s_with_guarded_key_buf() 85 blake2s(guarded_key, key_len, test_buf, data_len, in test_blake2s_with_guarded_key_buf() 90 blake2s_update(&ctx, test_buf, data_len); in test_blake2s_with_guarded_key_buf() 104 rand_bytes(test_buf, data_len); in test_blake2s_with_guarded_out_buf() 107 u8 *guarded_hash = &test_buf[TEST_BUF_LEN - out_len]; in test_blake2s_with_guarded_out_buf() 109 blake2s(NULL, 0, test_buf, data_len, hash, out_len); in test_blake2s_with_guarded_out_buf() 110 blake2s(NULL, 0, test_buf, data_len, guarded_hash, out_len); in test_blake2s_with_guarded_out_buf()
|
| H A D | polyval_kunit.c | 74 memset(test_buf, 0xff, 4096); in test_polyval_allones_key_and_message() 76 polyval_preparekey(&key, test_buf); in test_polyval_allones_key_and_message() 79 polyval(&key, test_buf, len, hash); in test_polyval_allones_key_and_message() 98 u8 *data = test_buf; in check_key_consistency() 118 u8 *guarded_raw_key = &test_buf[TEST_BUF_LEN - sizeof(raw_key)]; in test_polyval_with_guarded_key() 121 (struct polyval_key *)&test_buf[TEST_BUF_LEN - sizeof(key1)]; in test_polyval_with_guarded_key() 147 (struct polyval_key *)&test_buf[MAX_LEN_FOR_KEY_CHECK + in test_polyval_with_minimally_aligned_key()
|
| H A D | poly1305_kunit.c | 88 memset(test_buf, 0xff, 4096); in test_poly1305_allones_keys_and_message() 90 poly1305_init(&mac_ctx, test_buf); in test_poly1305_allones_keys_and_message() 91 poly1305_init(&macofmacs_ctx, test_buf); in test_poly1305_allones_keys_and_message() 96 poly1305_update(&mac_ctx, test_buf, len); in test_poly1305_allones_keys_and_message()
|
| H A D | sha3_kunit.c | 276 u8 *const in = test_buf; in test_shake_all_lens_up_to_4096() 277 u8 *const out = &test_buf[TEST_BUF_LEN - max_len]; in test_shake_all_lens_up_to_4096() 325 u8 *const in = &test_buf[in_offs]; in test_shake_multiple_squeezes() 326 u8 *const out = &test_buf[out_offs]; in test_shake_multiple_squeezes() 380 u8 *guarded_buf = &test_buf[TEST_BUF_LEN - len]; in test_shake_with_guarded_bufs()
|
| /linux/tools/virtio/ |
| H A D | vhost_net_test.c | 52 char *test_buf; member 122 char *sendbuf = dev->test_buf + HDR_LEN; in vdev_send_packet() 220 dev->test_buf = dev->buf; in vdev_info_init() 221 dev->res_buf = dev->test_buf + HDR_LEN + TEST_BUF_LEN; in vdev_info_init() 223 memset(dev->test_buf, 0, HDR_LEN + TEST_BUF_LEN); in vdev_info_init() 224 eh = (struct ether_header *)(dev->test_buf + HDR_LEN); in vdev_info_init() 230 dev->test_buf[i + HDR_LEN] = (char)i; in vdev_info_init() 291 sg_init_one(&sl, dev->test_buf, HDR_LEN + TEST_BUF_LEN); in run_tx_test() 293 dev->test_buf + vq->started, in run_tx_test()
|
| /linux/lib/ |
| H A D | test_firmware.c | 868 void *test_buf; in test_fw_run_batch_request() local 870 test_buf = kzalloc(TEST_FIRMWARE_BUF_SIZE, GFP_KERNEL); in test_fw_run_batch_request() 871 if (!test_buf) in test_fw_run_batch_request() 879 test_buf, in test_fw_run_batch_request() 887 test_buf, in test_fw_run_batch_request() 890 kfree(test_buf); in test_fw_run_batch_request() 892 req->fw_buf = test_buf; in test_fw_run_batch_request()
|
| /linux/drivers/net/ethernet/microchip/ |
| H A D | enc28j60.c | 1255 u8 test_buf[64]; /* limit the test to the first 64 bytes */ in enc28j60_hw_tx() local 1259 if (test_len > sizeof(test_buf)) in enc28j60_hw_tx() 1260 test_len = sizeof(test_buf); in enc28j60_hw_tx() 1263 enc28j60_mem_read(priv, TXSTART_INIT + 1, test_len, test_buf); in enc28j60_hw_tx() 1266 if (priv->tx_skb->data[k] != test_buf[k]) { in enc28j60_hw_tx() 1269 k, priv->tx_skb->data[k], test_buf[k]); in enc28j60_hw_tx()
|