From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3 V2] crypto: Fix the pointer voodoo in unaligned ahash
Date: Thu, 13 Mar 2014 02:20:29 +0100 [thread overview]
Message-ID: <201403130220.29346.marex@denx.de> (raw)
In-Reply-To: <20140312120814.GA25881@gondor.apana.org.au>
On Wednesday, March 12, 2014 at 01:08:14 PM, Herbert Xu wrote:
> On Mon, Mar 03, 2014 at 01:21:46AM +0100, Marek Vasut wrote:
> > Add documentation for the pointer voodoo that is happening in
> > crypto/ahash.c in ahash_op_unaligned(). This code is quite confusing, so
> > add a beefy chunk of documentation.
> >
> > Moreover, make sure the mangled request is completely restored after
> > finishing this unaligned operation. This means restoring all of .result,
> > .priv, .base.data and .base.complete .
>
> There is no point in saving priv because it is only meant to be
> used by the crypto API.
OK, understood. But shall we not preserve the request intact in case a crypto-
api function called crypto_ahash_final() with request which has .priv already
set? Then we would have really funny corruption of the request going on and I'm
not sure that'd be nice.
> Otherwise the patch looks OK to me.
Thanks!
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-03-13 1:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 17:33 [PATCH 0/3] crypto: Clean up ahash handling confusion Marek Vasut
2014-01-14 17:33 ` [PATCH 1/3] crypto: Fix the pointer voodoo in unaligned ahash Marek Vasut
2014-01-14 19:35 ` Tom Lendacky
2014-02-09 1:18 ` Herbert Xu
2014-02-09 6:15 ` Marek Vasut
2014-03-03 0:20 ` Marek Vasut
2014-01-14 17:33 ` [PATCH 2/3] crypto: Pull out the functions to save/restore request Marek Vasut
2014-01-14 17:33 ` [PATCH 3/3] crypto: Simplify the ahash_finup implementation Marek Vasut
2014-03-03 0:21 ` [PATCH 1/3 V2] crypto: Fix the pointer voodoo in unaligned ahash Marek Vasut
2014-03-03 0:21 ` [PATCH 2/3 V2] crypto: Pull out the functions to save/restore request Marek Vasut
2014-03-03 0:21 ` [PATCH 3/3 V2] crypto: Simplify the ahash_finup implementation Marek Vasut
2014-03-12 12:11 ` Herbert Xu
2014-03-13 1:21 ` Marek Vasut
2014-03-12 12:08 ` [PATCH 1/3 V2] crypto: Fix the pointer voodoo in unaligned ahash Herbert Xu
2014-03-13 1:20 ` Marek Vasut [this message]
2014-03-13 1:56 ` Herbert Xu
2014-03-13 4:01 ` Marek Vasut
2014-03-13 4:32 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201403130220.29346.marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).