[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2521789.meJGi556Ec@tachyon.chronox.de>
Date: Sun, 11 Jan 2015 17:16:49 +0100
From: Stephan Mueller <smueller@...onox.de>
To: 'Herbert Xu' <herbert@...dor.apana.org.au>
Cc: Daniel Borkmann <dborkman@...hat.com>,
'Quentin Gouchet' <quentin.gouchet@...il.com>,
'LKML' <linux-kernel@...r.kernel.org>,
linux-crypto@...r.kernel.org, linux-api@...r.kernel.org
Subject: Re: [PATCH v9 1/2] crypto: AF_ALG: add AEAD support
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists