printk("test %u:\n", i + 1);
memset(result, 0, 64);
- sg_set_buf(&sg[0], hash_tv[i].plaintext, hash_tv[i].psize);
+ sg_init_one(&sg[0], hash_tv[i].plaintext, hash_tv[i].psize);
if (hash_tv[i].ksize) {
ret = crypto_hash_setkey(tfm, hash_tv[i].key,
memset(result, 0, 64);
temp = 0;
+ sg_init_table(sg, hash_tv[i].np);
for (k = 0; k < hash_tv[i].np; k++) {
memcpy(&xbuf[IDX[k]],
hash_tv[i].plaintext + temp,
goto out;
}
- sg_set_buf(&sg[0], cipher_tv[i].input,
- cipher_tv[i].ilen);
+ sg_init_one(&sg[0], cipher_tv[i].input,
+ cipher_tv[i].ilen);
ablkcipher_request_set_crypt(req, sg, sg,
cipher_tv[i].ilen,
}
temp = 0;
+ sg_init_table(sg, cipher_tv[i].np);
for (k = 0; k < cipher_tv[i].np; k++) {
memcpy(&xbuf[IDX[k]],
cipher_tv[i].input + temp,
int bcount;
int ret;
- sg_set_buf(sg, p, blen);
+ sg_init_one(sg, p, blen);
for (start = jiffies, end = start + sec * HZ, bcount = 0;
time_before(jiffies, end); bcount++) {
int ret = 0;
int i;
- sg_set_buf(sg, p, blen);
+ sg_init_one(sg, p, blen);
local_bh_disable();
local_irq_disable();
int bcount;
int ret;
+ sg_init_table(sg, 1);
+
for (start = jiffies, end = start + sec * HZ, bcount = 0;
time_before(jiffies, end); bcount++) {
sg_set_buf(sg, p, blen);
if (plen == blen)
return test_hash_jiffies_digest(desc, p, blen, out, sec);
+ sg_init_table(sg, 1);
+
for (start = jiffies, end = start + sec * HZ, bcount = 0;
time_before(jiffies, end); bcount++) {
ret = crypto_hash_init(desc);
int i;
int ret;
+ sg_init_table(sg, 1);
+
local_bh_disable();
local_irq_disable();
if (plen == blen)
return test_hash_cycles_digest(desc, p, blen, out);
+ sg_init_table(sg, 1);
+
local_bh_disable();
local_irq_disable();