From: Stephan Mueller <smueller-T9tCv8IpfcWELgA04lAiVw@public.gmane.org>
To: 'Herbert Xu' <herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
Cc: Daniel Borkmann
<dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
'Quentin Gouchet'
<quentin.gouchet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
'LKML' <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v9 1/2] crypto: AF_ALG: add AEAD support
Date: Sun, 11 Jan 2015 17:16:49 +0100 [thread overview]
Message-ID: <2521789.meJGi556Ec@tachyon.chronox.de> (raw)
In-Reply-To: <1518783.PStT3Q01B6-PJstQz4BMNNP20K/wil9xYQuADTiUCJX@public.gmane.org>
Am Sonntag, 11. Januar 2015, 04:45:53 schrieb Stephan Mueller:
Hi Herbert,
> +static int aead_accept_parent(void *private, struct sock *sk)
> +{
> + struct aead_ctx *ctx;
> + struct alg_sock *ask = alg_sk(sk);
> + unsigned int len = sizeof(*ctx) + crypto_aead_reqsize(private);
> + unsigned int ivlen = crypto_aead_ivsize(private);
> +
> + ctx = sock_kmalloc(sk, len, GFP_KERNEL);
> + if (!ctx)
> + return -ENOMEM;
> + memset(ctx, 0, len);
> +
> + ctx->iv = sock_kmalloc(sk, ivlen, GFP_KERNEL);
> + if (!ctx->iv) {
> + sock_kfree_s(sk, ctx, len);
> + return -ENOMEM;
> + }
> + memset(ctx->iv, 0, ivlen);
> +
> + ctx->len = len;
> + ctx->used = 0;
> + ctx->more = 0;
> + ctx->merge = 0;
> + ctx->enc = 0;
> + ctx->tsgl.cur = 0;
ctx->trunc = 0;
is missing here.
I would wait with a new patch once you had the chance to review the updates
and provide comments.
Thanks
--
Ciao
Stephan
next prev parent reply other threads:[~2015-01-11 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-11 3:44 [PATCH v9 0/2] crypto: AF_ALG: add AEAD and RNG support Stephan Mueller
[not found] ` <41794881.9gBey4al6X-PJstQz4BMNNP20K/wil9xYQuADTiUCJX@public.gmane.org>
2015-01-11 3:45 ` [PATCH v9 1/2] crypto: AF_ALG: add AEAD support Stephan Mueller
[not found] ` <1518783.PStT3Q01B6-PJstQz4BMNNP20K/wil9xYQuADTiUCJX@public.gmane.org>
2015-01-11 16:16 ` Stephan Mueller [this message]
2015-01-11 3:46 ` [PATCH v9 2/2] crypto: AF_ALG: enable AEAD interface compilation Stephan Mueller
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=2521789.meJGi556Ec@tachyon.chronox.de \
--to=smueller-t9tcv8ipfcwelga04laivw@public.gmane.org \
--cc=dborkman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=quentin.gouchet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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