From: Michal Nazarewicz <mina86@mina86.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] crypto: make sure *blkcipher_walk_init properly initialises walk
Date: Mon, 11 Nov 2013 12:26:38 +0100 [thread overview]
Message-ID: <xa1t61rzyya9.fsf@mina86.com> (raw)
In-Reply-To: <20131111012809.GA5091@gondor.apana.org.au>
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
On Mon, Nov 11 2013, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> 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.
I have read the code which is why I concluded that it is safe to replace
the bit operations with a simple assignment. Since, as you described,
all other bit fields are initialised on demand anyway, there is no harm
in setting them to zero here. Especially since I see no advantages of
the current approach, but instead see two disadvantages: longer machine
code (load-modiy-store vs. store) and confusion of tools such as
Coverity.
But of course, if you want it as it is, I won't be bothering you.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
prev parent reply other threads:[~2013-11-11 11:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 18:38 [PATCH RESEND] crypto: make sure *blkcipher_walk_init properly initialises walk Michal Nazarewicz
2013-11-11 1:28 ` Herbert Xu
2013-11-11 11:26 ` Michal Nazarewicz [this message]
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=xa1t61rzyya9.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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