Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 562f477a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (29 commits)
  crypto: sha512-s390 - Add missing block size
  hwrng: timeriomem - Breaks an allyesconfig build on s390:
  nlattr: Fix build error with NET off
  crypto: testmgr - add zlib test
  crypto: zlib - New zlib crypto module, using pcomp
  crypto: testmgr - Add support for the pcomp interface
  crypto: compress - Add pcomp interface
  netlink: Move netlink attribute parsing support to lib
  crypto: Fix dead links
  hwrng: timeriomem - New driver
  crypto: chainiv - Use kcrypto_wq instead of keventd_wq
  crypto: cryptd - Per-CPU thread implementation based on kcrypto_wq
  crypto: api - Use dedicated workqueue for crypto subsystem
  crypto: testmgr - Test skciphers with no IVs
  crypto: aead - Avoid infinite loop when nivaead fails selftest
  crypto: skcipher - Avoid infinite loop when cipher fails selftest
  crypto: api - Fix crypto_alloc_tfm/create_create_tfm return convention
  crypto: api - crypto_alg_mod_lookup either tested or untested
  crypto: amcc - Add crypt4xx driver
  crypto: ansi_cprng - Add maintainer
  ...
parents ada19a31 949abe57
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1269,6 +1269,12 @@ L: linux-crypto@vger.kernel.org
T:	git kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
S:	Maintained

CRYPTOGRAPHIC RANDOM NUMBER GENERATOR
P:	Neil Horman
M:	nhorman@tuxdriver.com
L:	linux-crypto@vger.kernel.org
S:	Maintained

CS5535 Audio ALSA driver
P:	Jaya Kumar
M:	jayakumar.alsa@gmail.com
+7 −0
Original line number Diff line number Diff line
@@ -127,6 +127,13 @@
			dcr-reg = <0x010 0x002>;
		};

		CRYPTO: crypto@180000 {
			compatible = "amcc,ppc460ex-crypto", "amcc,ppc4xx-crypto";
			reg = <4 0x00180000 0x80400>;
			interrupt-parent = <&UIC0>;
			interrupts = <0x1d 0x4>;
		};

		MAL0: mcmal {
			compatible = "ibm,mcmal-460ex", "ibm,mcmal2";
			dcr-reg = <0x180 0x062>;
+7 −0
Original line number Diff line number Diff line
@@ -97,6 +97,13 @@
				      0x6 0x4>;	/* ECC SEC Error */ 
		};

		CRYPTO: crypto@ef700000 {
			compatible = "amcc,ppc405ex-crypto", "amcc,ppc4xx-crypto";
			reg = <0xef700000 0x80400>;
			interrupt-parent = <&UIC0>;
			interrupts = <0x17 0x2>;
		};

		MAL0: mcmal {
			compatible = "ibm,mcmal-405ex", "ibm,mcmal2";
			dcr-reg = <0x180 0x062>;
+4 −2
Original line number Diff line number Diff line
@@ -29,7 +29,9 @@ struct s390_sha_ctx {
	int func;		/* KIMD function to use */
};

void s390_sha_update(struct crypto_tfm *tfm, const u8 *data, unsigned int len);
void s390_sha_final(struct crypto_tfm *tfm, u8 *out);
struct shash_desc;

int s390_sha_update(struct shash_desc *desc, const u8 *data, unsigned int len);
int s390_sha_final(struct shash_desc *desc, u8 *out);

#endif
+21 −19
Original line number Diff line number Diff line
@@ -23,17 +23,17 @@
 * any later version.
 *
 */
#include <crypto/internal/hash.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/crypto.h>
#include <crypto/sha.h>

#include "crypt_s390.h"
#include "sha.h"

static void sha1_init(struct crypto_tfm *tfm)
static int sha1_init(struct shash_desc *desc)
{
	struct s390_sha_ctx *sctx = crypto_tfm_ctx(tfm);
	struct s390_sha_ctx *sctx = shash_desc_ctx(desc);

	sctx->state[0] = SHA1_H0;
	sctx->state[1] = SHA1_H1;
@@ -42,34 +42,36 @@ static void sha1_init(struct crypto_tfm *tfm)
	sctx->state[4] = SHA1_H4;
	sctx->count = 0;
	sctx->func = KIMD_SHA_1;

	return 0;
}

static struct crypto_alg alg = {
static struct shash_alg alg = {
	.digestsize	=	SHA1_DIGEST_SIZE,
	.init		=	sha1_init,
	.update		=	s390_sha_update,
	.final		=	s390_sha_final,
	.descsize	=	sizeof(struct s390_sha_ctx),
	.base		=	{
		.cra_name	=	"sha1",
		.cra_driver_name=	"sha1-s390",
		.cra_priority	=	CRYPT_S390_PRIORITY,
	.cra_flags	=	CRYPTO_ALG_TYPE_DIGEST,
		.cra_flags	=	CRYPTO_ALG_TYPE_SHASH,
		.cra_blocksize	=	SHA1_BLOCK_SIZE,
	.cra_ctxsize	=	sizeof(struct s390_sha_ctx),
		.cra_module	=	THIS_MODULE,
	.cra_list	=	LIST_HEAD_INIT(alg.cra_list),
	.cra_u		=	{ .digest = {
	.dia_digestsize	=	SHA1_DIGEST_SIZE,
	.dia_init	=	sha1_init,
	.dia_update	=	s390_sha_update,
	.dia_final	=	s390_sha_final } }
	}
};

static int __init sha1_s390_init(void)
{
	if (!crypt_s390_func_available(KIMD_SHA_1))
		return -EOPNOTSUPP;
	return crypto_register_alg(&alg);
	return crypto_register_shash(&alg);
}

static void __exit sha1_s390_fini(void)
{
	crypto_unregister_alg(&alg);
	crypto_unregister_shash(&alg);
}

module_init(sha1_s390_init);
Loading