#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/ccp.h>
#include <linux/scatterlist.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/akcipher.h>
#include "ccp-crypto.h"
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;
MODULE_DESCRIPTION(…) …;
static unsigned int aes_disable;
module_param(aes_disable, uint, 0444);
MODULE_PARM_DESC(…) …;
static unsigned int sha_disable;
module_param(sha_disable, uint, 0444);
MODULE_PARM_DESC(…) …;
static unsigned int des3_disable;
module_param(des3_disable, uint, 0444);
MODULE_PARM_DESC(…) …;
static unsigned int rsa_disable;
module_param(rsa_disable, uint, 0444);
MODULE_PARM_DESC(…) …;
static LIST_HEAD(hash_algs);
static LIST_HEAD(skcipher_algs);
static LIST_HEAD(aead_algs);
static LIST_HEAD(akcipher_algs);
struct ccp_crypto_queue { … };
#define CCP_CRYPTO_MAX_QLEN …
static struct ccp_crypto_queue req_queue;
static DEFINE_SPINLOCK(req_queue_lock);
struct ccp_crypto_cmd { … };
static inline bool ccp_crypto_success(int err)
{ … }
static struct ccp_crypto_cmd *ccp_crypto_cmd_complete(
struct ccp_crypto_cmd *crypto_cmd, struct ccp_crypto_cmd **backlog)
{ … }
static void ccp_crypto_complete(void *data, int err)
{ … }
static int ccp_crypto_enqueue_cmd(struct ccp_crypto_cmd *crypto_cmd)
{ … }
int ccp_crypto_enqueue_request(struct crypto_async_request *req,
struct ccp_cmd *cmd)
{ … }
struct scatterlist *ccp_crypto_sg_table_add(struct sg_table *table,
struct scatterlist *sg_add)
{ … }
static int ccp_register_algs(void)
{ … }
static void ccp_unregister_algs(void)
{ … }
static int __init ccp_crypto_init(void)
{ … }
static void __exit ccp_crypto_exit(void)
{ … }
module_init(…) …;
module_exit(ccp_crypto_exit);