summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-05 19:12:53 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-05 19:12:53 +0200
commite7f1c4b12cbb143e9b6d1cdd0f1ec9a7725b4cac (patch)
treef85423e39a43c2fd768e8d3a63d527abe5548ad9
parentb7d119a04244fd17aa69e4f4f4e8a33cc60d1090 (diff)
parent7494e29338fedcfeb5ed1e31eefe5742b786a2be (diff)
downloadkernel-crypto-e7f1c4b12cbb143e9b6d1cdd0f1ec9a7725b4cac.tar.gz
kernel-crypto-e7f1c4b12cbb143e9b6d1cdd0f1ec9a7725b4cac.tar.xz
kernel-crypto-e7f1c4b12cbb143e9b6d1cdd0f1ec9a7725b4cac.zip
Merge branch 'standalone-rename' into userspace-crypto
Conflicts: crypto/userspace/ncr-dh.c crypto/userspace/ncr-key-storage.c crypto/userspace/ncr-key-wrap.c crypto/userspace/ncr-key.c crypto/userspace/ncr-limits.c crypto/userspace/ncr-pk.c
-rw-r--r--crypto/userspace/libtomcrypt/math/rand_prime.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_flexi.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_multi.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_encode_sequence_multi.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_sequence_free.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_set.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_setof.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/asn1/der/x509/der_decode_subject_public_key_info.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/dsa/dsa_export.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/dsa/dsa_import.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/dsa/dsa_make_key.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/dsa/dsa_sign_hash.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c3
-rw-r--r--crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c3
-rw-r--r--crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c3
-rw-r--r--crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c3
-rw-r--r--crypto/userspace/libtomcrypt/pk/rsa/rsa_decrypt_key.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/rsa/rsa_export.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/rsa/rsa_sign_hash.c1
-rw-r--r--crypto/userspace/libtomcrypt/pk/rsa/rsa_verify_hash.c1
-rw-r--r--crypto/userspace/libtommath/bn_mp_clear.c1
-rw-r--r--crypto/userspace/libtommath/bn_mp_grow.c1
-rw-r--r--crypto/userspace/libtommath/bn_mp_init.c1
-rw-r--r--crypto/userspace/libtommath/bn_mp_init_size.c1
-rw-r--r--crypto/userspace/libtommath/bn_mp_prime_random_ex.c1
-rw-r--r--crypto/userspace/libtommath/bn_mp_shrink.c1
-rw-r--r--crypto/userspace/ncr-dh.c1
-rw-r--r--crypto/userspace/ncr-key-storage.c1
-rw-r--r--crypto/userspace/ncr-key-wrap.c1
-rw-r--r--crypto/userspace/ncr-key.c1
-rw-r--r--crypto/userspace/ncr-limits.c1
-rw-r--r--crypto/userspace/ncr-pk.c1
-rw-r--r--include/linux/ncr.h4
35 files changed, 40 insertions, 6 deletions
diff --git a/crypto/userspace/libtomcrypt/math/rand_prime.c b/crypto/userspace/libtomcrypt/math/rand_prime.c
index d48653a491a..ab73cd041c7 100644
--- a/crypto/userspace/libtomcrypt/math/rand_prime.c
+++ b/crypto/userspace/libtomcrypt/math/rand_prime.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file rand_prime.c
diff --git a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_flexi.c b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_flexi.c
index 2e72dbd56bd..3f01a579346 100644
--- a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_flexi.c
+++ b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_flexi.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file der_decode_sequence_flexi.c
diff --git a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_multi.c b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_multi.c
index 0e9c8a0bf9d..d1b78781c88 100644
--- a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_multi.c
+++ b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_decode_sequence_multi.c
@@ -10,6 +10,7 @@
*/
#include "tomcrypt.h"
#include <stdarg.h>
+#include <linux/slab.h>
/**
diff --git a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_encode_sequence_multi.c b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_encode_sequence_multi.c
index 3a8e7eedd43..7e813172c60 100644
--- a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_encode_sequence_multi.c
+++ b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_encode_sequence_multi.c
@@ -10,6 +10,7 @@
*/
#include "tomcrypt.h"
#include <stdarg.h>
+#include <linux/slab.h>
/**
diff --git a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_sequence_free.c b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_sequence_free.c
index a0e0d2dcdaa..eed73e7efdf 100644
--- a/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_sequence_free.c
+++ b/crypto/userspace/libtomcrypt/pk/asn1/der/sequence/der_sequence_free.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file der_sequence_free.c
diff --git a/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_set.c b/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_set.c
index 38961c6ab16..babb9ea392e 100644
--- a/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_set.c
+++ b/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_set.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file der_encode_set.c
diff --git a/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_setof.c b/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_setof.c
index 86874f4934d..2a343f2c166 100644
--- a/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_setof.c
+++ b/crypto/userspace/libtomcrypt/pk/asn1/der/set/der_encode_setof.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file der_encode_setof.c
diff --git a/crypto/userspace/libtomcrypt/pk/asn1/der/x509/der_decode_subject_public_key_info.c b/crypto/userspace/libtomcrypt/pk/asn1/der/x509/der_decode_subject_public_key_info.c
index c0a2e2214c4..8a5005fa720 100644
--- a/crypto/userspace/libtomcrypt/pk/asn1/der/x509/der_decode_subject_public_key_info.c
+++ b/crypto/userspace/libtomcrypt/pk/asn1/der/x509/der_decode_subject_public_key_info.c
@@ -22,6 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file der_encode_sequence_multi.c
ASN.1 DER, encode a Subject Public Key structure --nmav
diff --git a/crypto/userspace/libtomcrypt/pk/dsa/dsa_export.c b/crypto/userspace/libtomcrypt/pk/dsa/dsa_export.c
index 1fef6c7a151..f2cd714d271 100644
--- a/crypto/userspace/libtomcrypt/pk/dsa/dsa_export.c
+++ b/crypto/userspace/libtomcrypt/pk/dsa/dsa_export.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file dsa_export.c
diff --git a/crypto/userspace/libtomcrypt/pk/dsa/dsa_import.c b/crypto/userspace/libtomcrypt/pk/dsa/dsa_import.c
index c0680f522f2..99001f2c22d 100644
--- a/crypto/userspace/libtomcrypt/pk/dsa/dsa_import.c
+++ b/crypto/userspace/libtomcrypt/pk/dsa/dsa_import.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file dsa_import.c
diff --git a/crypto/userspace/libtomcrypt/pk/dsa/dsa_make_key.c b/crypto/userspace/libtomcrypt/pk/dsa/dsa_make_key.c
index 7a6b51601fd..1831853b692 100644
--- a/crypto/userspace/libtomcrypt/pk/dsa/dsa_make_key.c
+++ b/crypto/userspace/libtomcrypt/pk/dsa/dsa_make_key.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file dsa_make_key.c
diff --git a/crypto/userspace/libtomcrypt/pk/dsa/dsa_sign_hash.c b/crypto/userspace/libtomcrypt/pk/dsa/dsa_sign_hash.c
index 0b542a42de1..b48d5a5696d 100644
--- a/crypto/userspace/libtomcrypt/pk/dsa/dsa_sign_hash.c
+++ b/crypto/userspace/libtomcrypt/pk/dsa/dsa_sign_hash.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file dsa_sign_hash.c
diff --git a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c
index 58052ebeaf3..86ba2189a57 100644
--- a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c
+++ b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c
@@ -10,8 +10,9 @@
*/
#include "tomcrypt.h"
#include <ncr-int.h>
+#include <linux/slab.h>
-/**
+/**
@file pkcs_1_mgf1.c
The Mask Generation Function (MGF1) for LTC_PKCS #1, Tom St Denis
*/
diff --git a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c
index 5214a2920d8..717d99dd324 100644
--- a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c
+++ b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c
@@ -10,8 +10,9 @@
*/
#include "tomcrypt.h"
#include <ncr-int.h>
+#include <linux/slab.h>
-/**
+/**
@file pkcs_1_oaep_decode.c
OAEP Padding for LTC_PKCS #1, Tom St Denis
*/
diff --git a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c
index ef644f9ba2e..331516fa094 100644
--- a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c
+++ b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c
@@ -10,6 +10,7 @@
*/
#include "tomcrypt.h"
#include <ncr-int.h>
+#include <linux/slab.h>
/**
@file pkcs_1_oaep_encode.c
diff --git a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c
index b9ade4b62f9..5d44ce8324e 100644
--- a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c
+++ b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c
@@ -10,8 +10,9 @@
*/
#include "tomcrypt.h"
#include <ncr-int.h>
+#include <linux/slab.h>
-/**
+/**
@file pkcs_1_pss_decode.c
LTC_PKCS #1 PSS Signature Padding, Tom St Denis
*/
diff --git a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c
index f8f763b48a1..9416eaede58 100644
--- a/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c
+++ b/crypto/userspace/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c
@@ -10,8 +10,9 @@
*/
#include "tomcrypt.h"
#include <ncr-int.h>
+#include <linux/slab.h>
-/**
+/**
@file pkcs_1_pss_encode.c
LTC_PKCS #1 PSS Signature Padding, Tom St Denis
*/
diff --git a/crypto/userspace/libtomcrypt/pk/rsa/rsa_decrypt_key.c b/crypto/userspace/libtomcrypt/pk/rsa/rsa_decrypt_key.c
index a8f3ac461ca..ba16e32021e 100644
--- a/crypto/userspace/libtomcrypt/pk/rsa/rsa_decrypt_key.c
+++ b/crypto/userspace/libtomcrypt/pk/rsa/rsa_decrypt_key.c
@@ -10,6 +10,7 @@
*/
#include "tomcrypt.h"
#include "ncr-int.h"
+#include <linux/slab.h>
/**
@file rsa_decrypt_key.c
diff --git a/crypto/userspace/libtomcrypt/pk/rsa/rsa_export.c b/crypto/userspace/libtomcrypt/pk/rsa/rsa_export.c
index 905bb6f9bca..c5e8ff0a65d 100644
--- a/crypto/userspace/libtomcrypt/pk/rsa/rsa_export.c
+++ b/crypto/userspace/libtomcrypt/pk/rsa/rsa_export.c
@@ -10,6 +10,7 @@
*/
#include "tomcrypt.h"
#include <ncr-int.h>
+#include <linux/slab.h>
/**
@file rsa_export.c
Export RSA LTC_PKCS keys, Tom St Denis
diff --git a/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c b/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c
index 2eaa0a9b1a4..8bd8c47de21 100644
--- a/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c
+++ b/crypto/userspace/libtomcrypt/pk/rsa/rsa_import.c
@@ -9,6 +9,7 @@
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
+#include <linux/slab.h>
/**
@file rsa_import.c
diff --git a/crypto/userspace/libtomcrypt/pk/rsa/rsa_sign_hash.c b/crypto/userspace/libtomcrypt/pk/rsa/rsa_sign_hash.c
index f27789d2df0..b3c2f5b2ab5 100644
--- a/crypto/userspace/libtomcrypt/pk/rsa/rsa_sign_hash.c
+++ b/crypto/userspace/libtomcrypt/pk/rsa/rsa_sign_hash.c
@@ -10,6 +10,7 @@
*/
#include "tomcrypt.h"
#include "ncr-int.h"
+#include <linux/slab.h>
/**
@file rsa_sign_hash.c
diff --git a/crypto/userspace/libtomcrypt/pk/rsa/rsa_verify_hash.c b/crypto/userspace/libtomcrypt/pk/rsa/rsa_verify_hash.c
index c8a113dd822..b9ef89fd47a 100644
--- a/crypto/userspace/libtomcrypt/pk/rsa/rsa_verify_hash.c
+++ b/crypto/userspace/libtomcrypt/pk/rsa/rsa_verify_hash.c
@@ -10,6 +10,7 @@
*/
#include "tomcrypt.h"
#include "ncr-int.h"
+#include <linux/slab.h>
/**
@file rsa_verify_hash.c
diff --git a/crypto/userspace/libtommath/bn_mp_clear.c b/crypto/userspace/libtommath/bn_mp_clear.c
index a65f0a36c49..05ee8e7e200 100644
--- a/crypto/userspace/libtommath/bn_mp_clear.c
+++ b/crypto/userspace/libtommath/bn_mp_clear.c
@@ -1,4 +1,5 @@
#include <tommath.h>
+#include <linux/slab.h>
#ifdef BN_MP_CLEAR_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
diff --git a/crypto/userspace/libtommath/bn_mp_grow.c b/crypto/userspace/libtommath/bn_mp_grow.c
index cf2b949b248..3646c6c86d8 100644
--- a/crypto/userspace/libtommath/bn_mp_grow.c
+++ b/crypto/userspace/libtommath/bn_mp_grow.c
@@ -1,4 +1,5 @@
#include <tommath.h>
+#include <linux/slab.h>
#ifdef BN_MP_GROW_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
diff --git a/crypto/userspace/libtommath/bn_mp_init.c b/crypto/userspace/libtommath/bn_mp_init.c
index 8be27f5696a..990500ba09f 100644
--- a/crypto/userspace/libtommath/bn_mp_init.c
+++ b/crypto/userspace/libtommath/bn_mp_init.c
@@ -1,4 +1,5 @@
#include <tommath.h>
+#include <linux/slab.h>
#ifdef BN_MP_INIT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
diff --git a/crypto/userspace/libtommath/bn_mp_init_size.c b/crypto/userspace/libtommath/bn_mp_init_size.c
index 8e014183a3e..ba46d3ab693 100644
--- a/crypto/userspace/libtommath/bn_mp_init_size.c
+++ b/crypto/userspace/libtommath/bn_mp_init_size.c
@@ -1,4 +1,5 @@
#include <tommath.h>
+#include <linux/slab.h>
#ifdef BN_MP_INIT_SIZE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
diff --git a/crypto/userspace/libtommath/bn_mp_prime_random_ex.c b/crypto/userspace/libtommath/bn_mp_prime_random_ex.c
index 07aae4b072e..741bfd168b7 100644
--- a/crypto/userspace/libtommath/bn_mp_prime_random_ex.c
+++ b/crypto/userspace/libtommath/bn_mp_prime_random_ex.c
@@ -1,4 +1,5 @@
#include <tommath.h>
+#include <linux/slab.h>
#ifdef BN_MP_PRIME_RANDOM_EX_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
diff --git a/crypto/userspace/libtommath/bn_mp_shrink.c b/crypto/userspace/libtommath/bn_mp_shrink.c
index 4b8c5ef11ad..3e38556be9f 100644
--- a/crypto/userspace/libtommath/bn_mp_shrink.c
+++ b/crypto/userspace/libtommath/bn_mp_shrink.c
@@ -1,4 +1,5 @@
#include <tommath.h>
+#include <linux/slab.h>
#ifdef BN_MP_SHRINK_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
*
diff --git a/crypto/userspace/ncr-dh.c b/crypto/userspace/ncr-dh.c
index 00178420c31..c1851581269 100644
--- a/crypto/userspace/ncr-dh.c
+++ b/crypto/userspace/ncr-dh.c
@@ -25,6 +25,7 @@
#include <linux/cryptodev.h>
#include <linux/mm.h>
#include <linux/ncr.h>
+#include <linux/slab.h>
#include <linux/random.h>
#include <asm/uaccess.h>
#include <asm/ioctl.h>
diff --git a/crypto/userspace/ncr-key-storage.c b/crypto/userspace/ncr-key-storage.c
index 63c88eab440..c97b80c7042 100644
--- a/crypto/userspace/ncr-key-storage.c
+++ b/crypto/userspace/ncr-key-storage.c
@@ -25,6 +25,7 @@
#include <linux/cryptodev.h>
#include <linux/mm.h>
#include <linux/ncr.h>
+#include <linux/slab.h>
#include <asm/uaccess.h>
#include <asm/ioctl.h>
#include <linux/scatterlist.h>
diff --git a/crypto/userspace/ncr-key-wrap.c b/crypto/userspace/ncr-key-wrap.c
index 9283bacdc07..f2b3b6130b1 100644
--- a/crypto/userspace/ncr-key-wrap.c
+++ b/crypto/userspace/ncr-key-wrap.c
@@ -25,6 +25,7 @@
#include <linux/cryptodev.h>
#include <linux/mm.h>
#include <linux/ncr.h>
+#include <linux/slab.h>
#include <linux/highmem.h>
#include <linux/random.h>
#include <asm/uaccess.h>
diff --git a/crypto/userspace/ncr-key.c b/crypto/userspace/ncr-key.c
index dda413a94f5..31a88098ab3 100644
--- a/crypto/userspace/ncr-key.c
+++ b/crypto/userspace/ncr-key.c
@@ -25,6 +25,7 @@
#include <linux/cryptodev.h>
#include <linux/mm.h>
#include <linux/ncr.h>
+#include <linux/slab.h>
#include <linux/random.h>
#include <asm/uaccess.h>
#include <asm/ioctl.h>
diff --git a/crypto/userspace/ncr-limits.c b/crypto/userspace/ncr-limits.c
index 09c040f1bf1..0a9112515a1 100644
--- a/crypto/userspace/ncr-limits.c
+++ b/crypto/userspace/ncr-limits.c
@@ -28,6 +28,7 @@
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/ncr.h>
+#include <linux/slab.h>
#include <linux/highmem.h>
#include <linux/random.h>
#include <asm/atomic.h>
diff --git a/crypto/userspace/ncr-pk.c b/crypto/userspace/ncr-pk.c
index ca2fa511ea2..36ea3983dad 100644
--- a/crypto/userspace/ncr-pk.c
+++ b/crypto/userspace/ncr-pk.c
@@ -25,6 +25,7 @@
#include <linux/cryptodev.h>
#include <linux/mm.h>
#include <linux/ncr.h>
+#include <linux/slab.h>
#include <linux/random.h>
#include <asm/uaccess.h>
#include <asm/ioctl.h>
diff --git a/include/linux/ncr.h b/include/linux/ncr.h
index 9b96a038ff5..06f34e2812a 100644
--- a/include/linux/ncr.h
+++ b/include/linux/ncr.h
@@ -56,7 +56,7 @@ typedef enum {
typedef int ncr_key_t;
-#define NCR_KEY_INVALID (ncr_key_t)(0)
+#define NCR_KEY_INVALID ((ncr_key_t)-1)
#define NCR_KEY_FLAG_EXPORTABLE 1
#define NCR_KEY_FLAG_WRAPPABLE (1<<1)
@@ -246,7 +246,7 @@ typedef enum {
} ncr_crypto_op_t;
typedef int ncr_session_t;
-#define NCR_SESSION_INVALID (ncr_session_t)0
+#define NCR_SESSION_INVALID ((ncr_session_t)-1)
/* input of CIOCGSESSION */
struct ncr_session_st {