Re: [PATCH RESEND] crypto: make sure *blkcipher_walk_init properly initialises walk

From: Michal Nazarewicz
Date: Mon Nov 11 2013 - 06:27:07 EST


On Mon, Nov 11 2013, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--

Attachment: signature.asc
Description: PGP signature