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 v4 2/5] crypto: AF_ALG: add AEAD support
Date: Sun, 07 Dec 2014 13:56:18 +0100 [thread overview]
Message-ID: <7942347.xfhvIblSTf@tachyon.chronox.de> (raw)
In-Reply-To: <20141205154606.GA30180-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
Am Freitag, 5. Dezember 2014, 23:46:06 schrieb Herbert Xu:
Hi Herbert,
> > +static struct proto_ops algif_aead_ops = {
> > + .family = PF_ALG,
> > +
> > + .connect = sock_no_connect,
> > + .socketpair = sock_no_socketpair,
> > + .getname = sock_no_getname,
> > + .ioctl = sock_no_ioctl,
> > + .listen = sock_no_listen,
> > + .shutdown = sock_no_shutdown,
> > + .getsockopt = sock_no_getsockopt,
> > + .mmap = sock_no_mmap,
> > + .bind = sock_no_bind,
> > + .accept = sock_no_accept,
> > +
> > + .release = af_alg_release,
> > + .sendmsg = aead_sendmsg,
> > + .sendpage = aead_sendpage,
> > + .recvmsg = aead_recvmsg,
> > + .poll = aead_poll,
> > + .setsockopt = aead_setsockopt,
>
> No it should go into the parent setsockopt. Perhaps add a setsockopt
> to af_alg_type in order to keep this out of the generic code.
What about adding a setauthsize to af_alg_type that is called from the parent
setsockopt? I would like to keep all user space interfaces as close together
as possible. With a new setsockopt callback, I fear that user space interface
handling may be scattered around.
Currently I am simply thinking about the following:
partent setsockopt:
case ALG_SET_AEAD_AUTHSIZE:
if (sock->state == SS_CONNECTED)
goto unlock;
if (!type->setauthsize)
goto unlock;
err = type->setauthsize(ask->private, optlen);
af_alg_type:
int (*setauthsize)(void *private, unsigned int authsize);
--
Ciao
Stephan
next prev parent reply other threads:[~2014-12-07 12:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 19:54 [PATCH v4 0/5] crypto: AF_ALG: add AEAD and RNG support Stephan Mueller
2014-12-03 19:55 ` [PATCH v4 1/5] crypto: AF_ALG: add user space interface for AEAD Stephan Mueller
[not found] ` <4746255.Vltg6sM4x3-PJstQz4BMNNP20K/wil9xYQuADTiUCJX@public.gmane.org>
2014-12-05 16:01 ` Herbert Xu
[not found] ` <2105559.EmODblLYuY-PJstQz4BMNNP20K/wil9xYQuADTiUCJX@public.gmane.org>
2014-12-03 19:57 ` [PATCH v4 2/5] crypto: AF_ALG: add AEAD support Stephan Mueller
2014-12-05 15:46 ` Herbert Xu
2014-12-05 21:51 ` Stephan Mueller
2014-12-06 20:08 ` Stephan Mueller
[not found] ` <1677221.HN3xC7fa4q-PJstQz4BMNNP20K/wil9xYQuADTiUCJX@public.gmane.org>
2014-12-06 23:27 ` Herbert Xu
[not found] ` <45756810.oFuGYtKPb9-PJstQz4BMNNP20K/wil9xYQuADTiUCJX@public.gmane.org>
2014-12-06 23:28 ` Herbert Xu
[not found] ` <20141205154606.GA30180-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2014-12-07 12:56 ` Stephan Mueller [this message]
2014-12-03 19:58 ` [PATCH v4 3/5] crypto: AF_ALG: enable AEAD interface compilation Stephan Mueller
2014-12-03 19:59 ` [PATCH v4 4/5] crypto: AF_ALG: add random number generator support Stephan Mueller
2014-12-05 15:53 ` Herbert Xu
[not found] ` <20141205155359.GA30224-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2014-12-05 22:02 ` Stephan Mueller
2014-12-03 19:59 ` [PATCH v4 5/5] crypto: AF_ALG: enable RNG 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=7942347.xfhvIblSTf@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;
as well as URLs for NNTP newsgroup(s).