linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
To: Gilad Ben-Yossef <gilad@benyossef.com>, Ard Biesheuvel <ardb@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Biggers <ebiggers@google.com>,
	Mimi Zohar <zohar@linux.ibm.com>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Jia Zhang <zhang.jia@linux.alibaba.com>
Subject: Re: [PATCH] crypto: sm3 - use the more precise type u32 instead of unsigned int
Date: Wed, 7 Apr 2021 11:26:25 +0800	[thread overview]
Message-ID: <5a5028e1-7cb2-701c-ce0f-1bb9f79cb83d@linux.alibaba.com> (raw)
In-Reply-To: <CAOtvUMfSC02o03c=Q-8d7vy8KS3QmNTBc59An=-m4BmNzt8_GA@mail.gmail.com>



On 3/26/21 5:38 PM, Gilad Ben-Yossef wrote:
> Hi,
> 
> Thank you for the patch!
> 
> On Fri, Mar 26, 2021 at 5:21 AM Tianjia Zhang
> <tianjia.zhang@linux.alibaba.com> wrote:
>>
>> In the process of calculating the hash, use the more accurate type
>> 'u32' instead of the original 'unsigned int' to avoid ambiguity.
> 
> I don't think there is any ambiguity here, as both forms are always
> the same size.
> 
> Generally, I tend to use the convention of using 'u32' as denoting
> variables where the size is meaningful - e.g. mathematical operations
> that are defined in the standard on 32 bit buffers,  versus using
> plain 'int' types where it isn't - e.g. loop counters etc.
> 
> Having said that, even under my own definition possibly the w and wt
> arrays in sm3_trandform() should be changed to u32.
> I don't object to changing those if it bugs you :-)
> 
> Cheers,
> Gilad
> 
> 

Thanks for your opinions. This is just to make the form more uniform. 
This is not a mistake. If it is not necessary, just ignore this 
modification.

Best regards,
Tianjia

      reply	other threads:[~2021-04-07  3:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  2:21 [PATCH] crypto: sm3 - use the more precise type u32 instead of unsigned int Tianjia Zhang
2021-03-26  8:59 ` Ard Biesheuvel
2021-03-26  9:38 ` Gilad Ben-Yossef
2021-04-07  3:26   ` Tianjia Zhang [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=5a5028e1-7cb2-701c-ce0f-1bb9f79cb83d@linux.alibaba.com \
    --to=tianjia.zhang@linux.alibaba.com \
    --cc=ardb@kernel.org \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=gilad@benyossef.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhang.jia@linux.alibaba.com \
    --cc=zohar@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).