From: Jason Cooper <jason@lakedaemon.net>
To: Eric Rost <eric.rost@mybabylon.net>
Cc: gregkh@linuxfoundation.org, jake@lwn.net, antonysaraev@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/7] staging: skein: Adds CryptoAPI Support
Date: Fri, 24 Oct 2014 10:35:04 -0400 [thread overview]
Message-ID: <20141024143504.GC12718@titan.lakedaemon.net> (raw)
In-Reply-To: <d931d8e441d9dfd566848111ad4fbdc71a96e972.1414151639.git.eric.rost@mybabylon.net>
Eric,
We're almost there... :)
On Fri, Oct 24, 2014 at 06:55:33AM -0500, Eric Rost wrote:
> Adds CryptoAPI support to the Skein Hashing Algorithm driver.
>
> Signed-off-by: Eric Rost <eric.rost@mybabylon.net>
> ---
> drivers/staging/skein/Makefile | 3 +-
> drivers/staging/skein/skein_generic.c | 191 ++++++++++++++++++++++++++++++++++
> 2 files changed, 193 insertions(+), 1 deletion(-)
> create mode 100644 drivers/staging/skein/skein_generic.c
>
> diff --git a/drivers/staging/skein/Makefile b/drivers/staging/skein/Makefile
> index ca746a9..d8177cc 100644
> --- a/drivers/staging/skein/Makefile
> +++ b/drivers/staging/skein/Makefile
> @@ -5,4 +5,5 @@ obj-$(CONFIG_CRYPTO_SKEIN) += skein_base.o \
> skein_api.o \
> skein_block.o \
> threefish_block.o \
> - threefish_api.o
> + threefish_api.o \
> + skein_generic.o
> diff --git a/drivers/staging/skein/skein_generic.c b/drivers/staging/skein/skein_generic.c
> new file mode 100644
> index 0000000..39332e8
> --- /dev/null
> +++ b/drivers/staging/skein/skein_generic.c
...
> +static int __init skein_generic_init(void)
> +{
> + if (crypto_register_shash(&alg256) || crypto_register_shash(&alg512)
> + || crypto_register_shash(&alg1024)) {
> + crypto_unregister_shash(&alg256);
> + crypto_unregister_shash(&alg512);
> + crypto_unregister_shash(&alg1024);
> + return -1;
> + }
> + return 0;
> +}
This really needs to be something like:
if (crypto_register_shash(&alg256))
goto bail;
if (crypto_register_shash(&alg512))
goto unreg256;
if (crypto_register_shash(&alg1024))
goto unreg512;
return 0;
unreg512:
crypto_unregister_shash(&alg512);
unreg256:
crypto_unregister_shash(&alg256);
bail:
return -1;
thx,
Jason.
next prev parent reply other threads:[~2014-10-24 14:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 11:54 [PATCH v5 0/7] staging: skein: CryptoAPI and Module Support Eric Rost
2014-10-24 11:55 ` [PATCH v5 1/7] staging: skein: Collapses threefish module Eric Rost
2014-10-24 11:55 ` [PATCH v5 2/7] staging: skein: Renames skein to skein_base Eric Rost
2014-10-24 14:25 ` Jason Cooper
2014-10-24 11:55 ` [PATCH v5 3/7] staging: skein: Adds CryptoAPI Support Eric Rost
2014-10-24 14:35 ` Jason Cooper [this message]
2014-10-24 11:55 ` [PATCH v5 4/7] staging: skein: Adds Loadable Module Support Eric Rost
2014-10-24 11:56 ` [PATCH v5 5/7] staging: skein: Inlines rotl_64 Eric Rost
2014-10-24 11:56 ` [PATCH v5 6/7] staging: skein: Removes unneeded #define Eric Rost
2014-10-24 11:56 ` [PATCH v5 7/7] staging: skein: Removes skein_debug include Eric Rost
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=20141024143504.GC12718@titan.lakedaemon.net \
--to=jason@lakedaemon.net \
--cc=antonysaraev@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=eric.rost@mybabylon.net \
--cc=gregkh@linuxfoundation.org \
--cc=jake@lwn.net \
--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
all inboxes | Powered by JetHome®