Loading crypto/tcrypt.c +8 −7 Original line number Diff line number Diff line Loading @@ -258,12 +258,12 @@ static void sg_init_aead(struct scatterlist *sg, char *xbuf[XBUFSIZE], rem = buflen % PAGE_SIZE; } sg_init_table(sg, np); sg_init_table(sg, np + 1); np--; for (k = 0; k < np; k++) sg_set_buf(&sg[k], xbuf[k], PAGE_SIZE); sg_set_buf(&sg[k + 1], xbuf[k], PAGE_SIZE); sg_set_buf(&sg[k], xbuf[k], rem); sg_set_buf(&sg[k + 1], xbuf[k], rem); } static void test_aead_speed(const char *algo, int enc, unsigned int secs, Loading Loading @@ -337,8 +337,6 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs, do { assoc = axbuf[0]; memset(assoc, 0xff, aad_size); sg_set_buf(&sg[0], assoc, aad_size); sg_set_buf(&sgout[0], assoc, aad_size); if ((*keysize + *b_size) > TVMEMSIZE * PAGE_SIZE) { pr_err("template (%u) too big for tvmem (%lu)\n", Loading Loading @@ -374,12 +372,15 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs, goto out; } sg_init_aead(&sg[1], xbuf, sg_init_aead(sg, xbuf, *b_size + (enc ? authsize : 0)); sg_init_aead(&sgout[1], xoutbuf, sg_init_aead(sgout, xoutbuf, *b_size + (enc ? authsize : 0)); sg_set_buf(&sg[0], assoc, aad_size); sg_set_buf(&sgout[0], assoc, aad_size); aead_request_set_crypt(req, sg, sgout, *b_size, iv); aead_request_set_ad(req, aad_size); Loading Loading
crypto/tcrypt.c +8 −7 Original line number Diff line number Diff line Loading @@ -258,12 +258,12 @@ static void sg_init_aead(struct scatterlist *sg, char *xbuf[XBUFSIZE], rem = buflen % PAGE_SIZE; } sg_init_table(sg, np); sg_init_table(sg, np + 1); np--; for (k = 0; k < np; k++) sg_set_buf(&sg[k], xbuf[k], PAGE_SIZE); sg_set_buf(&sg[k + 1], xbuf[k], PAGE_SIZE); sg_set_buf(&sg[k], xbuf[k], rem); sg_set_buf(&sg[k + 1], xbuf[k], rem); } static void test_aead_speed(const char *algo, int enc, unsigned int secs, Loading Loading @@ -337,8 +337,6 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs, do { assoc = axbuf[0]; memset(assoc, 0xff, aad_size); sg_set_buf(&sg[0], assoc, aad_size); sg_set_buf(&sgout[0], assoc, aad_size); if ((*keysize + *b_size) > TVMEMSIZE * PAGE_SIZE) { pr_err("template (%u) too big for tvmem (%lu)\n", Loading Loading @@ -374,12 +372,15 @@ static void test_aead_speed(const char *algo, int enc, unsigned int secs, goto out; } sg_init_aead(&sg[1], xbuf, sg_init_aead(sg, xbuf, *b_size + (enc ? authsize : 0)); sg_init_aead(&sgout[1], xoutbuf, sg_init_aead(sgout, xoutbuf, *b_size + (enc ? authsize : 0)); sg_set_buf(&sg[0], assoc, aad_size); sg_set_buf(&sgout[0], assoc, aad_size); aead_request_set_crypt(req, sg, sgout, *b_size, iv); aead_request_set_ad(req, aad_size); Loading