linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Iuliana Prodan <iuliana.prodan@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH v4] crypto: gcm - restrict assoclen for rfc4543
Date: Fri, 2 Aug 2019 14:01:48 +1000	[thread overview]
Message-ID: <20190802040148.GA15907@gondor.apana.org.au> (raw)
In-Reply-To: <1564504233-26186-1-git-send-email-iuliana.prodan@nxp.com>

On Tue, Jul 30, 2019 at 07:30:33PM +0300, Iuliana Prodan wrote:
>
> diff --git a/crypto/gcm.c b/crypto/gcm.c
> index 2f3b50f..8adf64f 100644
> --- a/crypto/gcm.c
> +++ b/crypto/gcm.c
> @@ -1034,12 +1034,14 @@ static int crypto_rfc4543_copy_src_to_dst(struct aead_request *req, bool enc)
>  
>  static int crypto_rfc4543_encrypt(struct aead_request *req)
>  {
> -	return crypto_rfc4543_crypt(req, true);
> +	return crypto_ipsec_check_assoclen(req->assoclen) ?:
> +			crypto_rfc4543_crypt(req, true);

Please align it like this:

	return crypto_ipsec_check_assoclen(req->assoclen) ?:
	       crypto_rfc4543_crypt(req, true);

as that's how everything else is aligned in crypto.

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

      reply	other threads:[~2019-08-02  4:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 16:30 [PATCH v4] crypto: gcm - restrict assoclen for rfc4543 Iuliana Prodan
2019-08-02  4:01 ` Herbert Xu [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=20190802040148.GA15907@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=iuliana.prodan@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --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;
as well as URLs for NNTP newsgroup(s).