From: Herbert Xu <herbert@gondor.hengli.com.au>
To: Michal Nazarewicz <mpn@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Michal Nazarewicz <mina86@mina86.com>
Subject: Re: [PATCH RESEND] crypto: make sure *blkcipher_walk_init properly initialises walk
Date: Mon, 11 Nov 2013 09:28:09 +0800 [thread overview]
Message-ID: <20131111012809.GA5091@gondor.apana.org.au> (raw)
In-Reply-To: <1384108681-23519-1-git-send-email-mpn@google.com>
On Sun, Nov 10, 2013 at 07:38:01PM +0100, Michal Nazarewicz wrote:
> From: Michal Nazarewicz <mina86@mina86.com>
>
> blkcipher_walk_init and ablkcipher_walk_init functions are called
> to initialise a walk structure allocated on stack, which is not
> initialised by the caller. This means, that the fields of the
> structure contain garbage when *_init is run.
>
> The *_init functions do not initialise all of the fields though,
> and in particular leave flags field as is. This results in field
> containing unspecified value.
>
> Zeroing the whole structure makes sure that all of the fields
> are initialised to the same value regardless of the values stored
> on the stack prior to the call to the *_init function.
>
> Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Nack. The field flags is used as a bit-field and all bits other
than those initialised that you see are used internally by the
walker function and will be initialised on demand.
Please do not just rely on tools such as coverity and actually
read the code when submitting patches.
Thanks,
--
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
next prev parent reply other threads:[~2013-11-11 1:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 18:38 Michal Nazarewicz
2013-11-11 1:28 ` Herbert Xu [this message]
2013-11-11 11:26 ` Michal Nazarewicz
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=20131111012809.GA5091@gondor.apana.org.au \
--to=herbert@gondor.hengli.com.au \
--cc=davem@davemloft.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mina86@mina86.com \
--cc=mpn@google.com \
/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
all inboxes | Powered by JetHome®