Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1227855
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] crypto: omap-aes: Add support for GCM mode |
| Date | 2015-09-18 15:20 +0200 |
| Message-ID | <qa3K2-3Fh-23@gated-at.bofh.it> (permalink) |
| References | <pJD8v-7nV-45@gated-at.bofh.it> <q8YCK-6fP-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Sep 15, 2015 at 06:58:01PM +0530, Lokesh Vutla wrote:
>
> + assoc = &req->src[0];
> + sg_init_table(dd->in_sgl, nsg + 1);
> + if (assoclen) {
> + if (omap_aes_check_aligned(assoc, assoclen)) {
> + dd->sgs_copied |= AES_ASSOC_DATA_COPIED;
> + pages = get_order(alen);
> + buf_in = (void *)__get_free_pages(GFP_ATOMIC, pages);
It would be better if you used a list of pages rather than n
contiguous pages which is likely to fail.
> + buf_in = sg_virt(assoc);
This is bogus as assoc may not be mapped.
> + if (req->cryptlen) {
> + input = scatterwalk_ffwd(tmp, req->src, req->assoclen);
scatterwalk_ffwd may return tmp so tmp must not be on the stack
unless you stop using input after the function returns. Also tmp
must not be reused by a subsequent call to scatterwalk_ffwd.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3] crypto: omap-aes: Add support for GCM mode Lokesh Vutla <lokeshvutla@ti.com> - 2015-09-15 15:40 +0200 Re: [PATCH v3] crypto: omap-aes: Add support for GCM mode Herbert Xu <herbert@gondor.apana.org.au> - 2015-09-18 15:20 +0200 Re: [PATCH v3] crypto: omap-aes: Add support for GCM mode Matthijs van Duin <matthijsvanduin@gmail.com> - 2015-09-20 12:40 +0200
csiph-web