diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-26 19:08:44 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-26 19:08:44 +0200 |
commit | afed807b11199877214ec2e5d81e96c230237759 (patch) | |
tree | 8b01ef8a6f881656d78e4f54b60a9ea41187a175 /cryptodev_main.c | |
parent | d750b60952619af570ac4d91cd650ffa6bbe311d (diff) | |
parent | 935be4945512eb37461a226c51ede5e8b05cbe24 (diff) | |
download | cryptodev-linux-afed807b11199877214ec2e5d81e96c230237759.tar.gz cryptodev-linux-afed807b11199877214ec2e5d81e96c230237759.tar.xz cryptodev-linux-afed807b11199877214ec2e5d81e96c230237759.zip |
Merge branch 'master' into algorithm-speedup
Conflicts:
libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c
libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c
libtomcrypt/pk/rsa/rsa_decrypt_key.c
libtomcrypt/pk/rsa/rsa_encrypt_key.c
libtomcrypt/pk/rsa/rsa_sign_hash.c
libtomcrypt/pk/rsa/rsa_verify_hash.c
ncr-int.h
ncr-key.c
ncr-pk.c
ncr-sessions.c
Diffstat (limited to 'cryptodev_main.c')
-rw-r--r-- | cryptodev_main.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/cryptodev_main.c b/cryptodev_main.c index 0316a74..7ed0911 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -41,7 +41,7 @@ #include <asm/ioctl.h> #include <linux/scatterlist.h> #include "cryptodev_int.h" -#include "ncr_int.h" +#include "ncr-int.h" #include <linux/version.h> #include "version.h" @@ -65,8 +65,6 @@ module_param(enable_stats, int, 0644); MODULE_PARM_DESC(enable_stats, "collect statictics about cryptodev usage"); #endif -#define DEFAULT_PREALLOC_PAGES 16 - /* ====== CryptoAPI ====== */ struct fcrypt { struct list_head list; @@ -138,6 +136,9 @@ crypto_create_session(struct fcrypt *fcr, struct session_op *sop) case CRYPTO_CAMELLIA_CBC: alg_name = "cbc(camelia)"; break; + case CRYPTO_AES_CTR: + alg_name = "ctr(aes)"; + break; case CRYPTO_NULL: alg_name = "ecb(cipher_null)"; break; @@ -495,7 +496,7 @@ __crypto_run_std(struct csession *ses_ptr, struct crypt_op *cop) #ifndef DISABLE_ZCOPY -static void release_user_pages(struct page **pg, int pagecount) +void release_user_pages(struct page **pg, int pagecount) { while (pagecount--) { if (!PageReserved(pg[pagecount])) @@ -504,16 +505,11 @@ static void release_user_pages(struct page **pg, int pagecount) } } -/* last page - first page + 1 */ -#define PAGECOUNT(buf, buflen) \ - ((((unsigned long)(buf + buflen - 1) & PAGE_MASK) >> PAGE_SHIFT) - \ - (((unsigned long) buf & PAGE_MASK) >> PAGE_SHIFT) + 1) - /* offset of buf in it's first page */ #define PAGEOFFSET(buf) ((unsigned long)buf & ~PAGE_MASK) /* fetch the pages addr resides in into pg and initialise sg with them */ -static int __get_userbuf(uint8_t *addr, uint32_t len, int write, +int __get_userbuf(uint8_t *addr, uint32_t len, int write, int pgcount, struct page **pg, struct scatterlist *sg) { int ret, pglen, i = 0; |