diff options
Diffstat (limited to 'crypto/userspace')
-rw-r--r-- | crypto/userspace/Makefile | 46 | ||||
-rw-r--r-- | crypto/userspace/cryptodev_int.h | 2 | ||||
-rw-r--r-- | crypto/userspace/cryptodev_main.c | 3 | ||||
-rw-r--r-- | crypto/userspace/ncr-dh.c | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr-int.h | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr-key-storage.c | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr-key-wrap.c | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr-key.c | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr-limits.c | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr-pk.c | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr-sessions.c | 2 | ||||
-rw-r--r-- | crypto/userspace/ncr.c | 2 |
12 files changed, 14 insertions, 55 deletions
diff --git a/crypto/userspace/Makefile b/crypto/userspace/Makefile index 73e9ebbf385..7f6d66f8ba5 100644 --- a/crypto/userspace/Makefile +++ b/crypto/userspace/Makefile @@ -1,7 +1,4 @@ -KERNEL_DIR = /lib/modules/$(shell uname -r)/build -VERSION = 0.99 - -EXTRA_CFLAGS += -I$(SUBDIRS)/libtommath -I$(SUBDIRS)/libtomcrypt/headers -I$(SUBDIRS)/ -DLTC_SOURCE -Wall +ccflags-y += -I$(src)/libtommath -I$(src)/libtomcrypt/headers -I$(src) -DLTC_SOURCE TOMMATH_OBJECTS = libtommath/bncore.o libtommath/bn_mp_init.o libtommath/bn_mp_clear.o libtommath/bn_mp_exch.o libtommath/bn_mp_grow.o libtommath/bn_mp_shrink.o \ libtommath/bn_mp_clamp.o libtommath/bn_mp_zero.o libtommath/bn_mp_set.o libtommath/bn_mp_set_int.o libtommath/bn_mp_init_size.o libtommath/bn_mp_copy.o \ @@ -64,47 +61,10 @@ TOMCRYPT_OBJECTS = libtomcrypt/misc/zeromem.o libtomcrypt/misc/crypt/crypt_argch libtomcrypt/misc/pk_get_oid.o libtomcrypt/pk/asn1/der/x509/der_encode_subject_public_key_info.o \ libtomcrypt/pk/asn1/der/x509/der_decode_subject_public_key_info.o -cryptodev-objs = cryptodev_main.o cryptodev_cipher.o ncr.o \ +cryptodev-objs := cryptodev_main.o cryptodev_cipher.o ncr.o \ ncr-key.o ncr-limits.o ncr-pk.o ncr-sessions.o ncr-dh.o \ ncr-key-wrap.o ncr-key-storage.o utils.o $(TOMMATH_OBJECTS) \ $(TOMCRYPT_OBJECTS) -obj-m += cryptodev.o - -build: - @$(MAKE) version.h - $(MAKE) -C $(KERNEL_DIR) SUBDIRS=`pwd` modules - -install: - $(MAKE) -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install - @echo "Installing ncr.h in /usr/include/crypto ..." - @install -D ncr.h /usr/include/crypto/ncr.h - -clean: - $(MAKE) -C $(KERNEL_DIR) SUBDIRS=`pwd` clean - rm -f $(hostprogs) - KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C examples clean - -check: - KERNEL_DIR=$(KERNEL_DIR) $(MAKE) -C examples check - -FILEBASE = cryptodev-linux-$(VERSION) -TMPDIR ?= /tmp -OUTPUT = $(FILEBASE).tar.gz - -dist: clean - @echo Packing - @rm -f *.tar.gz - @mkdir $(TMPDIR)/$(FILEBASE) - @cp -ar . $(TMPDIR)/$(FILEBASE) - @rm -rf $(TMPDIR)/$(FILEBASE)/.git* $(TMPDIR)/$(FILEBASE)/releases $(TMPDIR)/$(FILEBASE)/scripts - @tar -C /tmp -czf ./$(OUTPUT) $(FILEBASE) - @rm -rf $(TMPDIR)/$(FILEBASE) - @echo Signing $(OUTPUT) - @gpg --output $(OUTPUT).sig -sb $(OUTPUT) - @gpg --verify $(OUTPUT).sig $(OUTPUT) - @mv $(OUTPUT) $(OUTPUT).sig releases/ - -version.h: Makefile - @echo "#define VERSION \"$(VERSION)\"" > version.h +obj-$(CONFIG_CRYPTO_USERSPACE) += cryptodev.o diff --git a/crypto/userspace/cryptodev_int.h b/crypto/userspace/cryptodev_int.h index 4b140ba9820..ce705be363a 100644 --- a/crypto/userspace/cryptodev_int.h +++ b/crypto/userspace/cryptodev_int.h @@ -10,8 +10,8 @@ #include <linux/miscdevice.h> #include <linux/module.h> #include <linux/moduleparam.h> +#include <linux/ncr.h> #include <linux/scatterlist.h> -#include <ncr.h> #define PFX "cryptodev: " #define dprintk(level,severity,format,a...) \ diff --git a/crypto/userspace/cryptodev_main.c b/crypto/userspace/cryptodev_main.c index 2a11fdb1258..0cbe3c4bdc3 100644 --- a/crypto/userspace/cryptodev_main.c +++ b/crypto/userspace/cryptodev_main.c @@ -43,7 +43,6 @@ #include "cryptodev_int.h" #include "ncr-int.h" #include <linux/version.h> -#include "version.h" MODULE_AUTHOR("Nikos Mavrogiannopoulos <nmav@gnutls.org>"); MODULE_DESCRIPTION("CryptoDev driver"); @@ -204,7 +203,7 @@ static int __init init_cryptodev(void) if (unlikely(rc)) return rc; - printk(KERN_INFO PFX "driver %s loaded.\n", VERSION); + printk(KERN_INFO PFX "driver loaded.\n"); return 0; } diff --git a/crypto/userspace/ncr-dh.c b/crypto/userspace/ncr-dh.c index 501eaa399cb..f6ab53afc07 100644 --- a/crypto/userspace/ncr-dh.c +++ b/crypto/userspace/ncr-dh.c @@ -24,11 +24,11 @@ #include <linux/ioctl.h> #include <linux/mm.h> +#include <linux/ncr.h> #include <linux/slab.h> #include <linux/random.h> #include <linux/uaccess.h> #include <linux/scatterlist.h> -#include <ncr.h> #include <ncr-int.h> #include <tomcrypt.h> #include <ncr-dh.h> diff --git a/crypto/userspace/ncr-int.h b/crypto/userspace/ncr-int.h index 400cf7e5218..42c500f83da 100644 --- a/crypto/userspace/ncr-int.h +++ b/crypto/userspace/ncr-int.h @@ -4,7 +4,7 @@ #include <linux/compat.h> #include <linux/idr.h> #include <linux/mutex.h> -#include "ncr.h" +#include <linux/ncr.h> #include <asm/atomic.h> #include "cryptodev_int.h" #include <ncr-pk.h> diff --git a/crypto/userspace/ncr-key-storage.c b/crypto/userspace/ncr-key-storage.c index bc64131ea82..512401828f4 100644 --- a/crypto/userspace/ncr-key-storage.c +++ b/crypto/userspace/ncr-key-storage.c @@ -24,10 +24,10 @@ #include <linux/ioctl.h> #include <linux/mm.h> +#include <linux/ncr.h> #include <linux/slab.h> #include <linux/uaccess.h> #include <linux/scatterlist.h> -#include "ncr.h" #include "ncr-int.h" #include "cryptodev_int.h" diff --git a/crypto/userspace/ncr-key-wrap.c b/crypto/userspace/ncr-key-wrap.c index a15d3710653..c30fa243941 100644 --- a/crypto/userspace/ncr-key-wrap.c +++ b/crypto/userspace/ncr-key-wrap.c @@ -24,13 +24,13 @@ #include <linux/ioctl.h> #include <linux/mm.h> +#include <linux/ncr.h> #include <linux/slab.h> #include <linux/highmem.h> #include <linux/random.h> #include <linux/uaccess.h> #include <linux/scatterlist.h> #include <net/netlink.h> -#include "ncr.h" #include "ncr-int.h" #include "cryptodev_int.h" diff --git a/crypto/userspace/ncr-key.c b/crypto/userspace/ncr-key.c index 8e082d169a2..e293a1b14ba 100644 --- a/crypto/userspace/ncr-key.c +++ b/crypto/userspace/ncr-key.c @@ -24,12 +24,12 @@ #include <linux/ioctl.h> #include <linux/mm.h> +#include <linux/ncr.h> #include <linux/slab.h> #include <linux/random.h> #include <linux/uaccess.h> #include <linux/scatterlist.h> #include <net/netlink.h> -#include "ncr.h" #include "ncr-int.h" #include "utils.h" diff --git a/crypto/userspace/ncr-limits.c b/crypto/userspace/ncr-limits.c index 0c12824a211..345cca74603 100644 --- a/crypto/userspace/ncr-limits.c +++ b/crypto/userspace/ncr-limits.c @@ -26,6 +26,7 @@ #include <linux/mutex.h> #include <linux/types.h> #include <linux/mm.h> +#include <linux/ncr.h> #include <linux/slab.h> #include <linux/highmem.h> #include <linux/random.h> @@ -33,7 +34,6 @@ #include <linux/version.h> #include <linux/file.h> #include <linux/cred.h> -#include "ncr.h" #include "ncr-int.h" /* arbitrary now */ diff --git a/crypto/userspace/ncr-pk.c b/crypto/userspace/ncr-pk.c index 904e8d65ace..3dc589a6a05 100644 --- a/crypto/userspace/ncr-pk.c +++ b/crypto/userspace/ncr-pk.c @@ -24,12 +24,12 @@ #include <linux/ioctl.h> #include <linux/mm.h> +#include <linux/ncr.h> #include <linux/slab.h> #include <linux/random.h> #include <linux/uaccess.h> #include <linux/scatterlist.h> #include <net/netlink.h> -#include "ncr.h" #include "ncr-int.h" #include <tomcrypt.h> diff --git a/crypto/userspace/ncr-sessions.c b/crypto/userspace/ncr-sessions.c index cb18853d974..d22a38423fa 100644 --- a/crypto/userspace/ncr-sessions.c +++ b/crypto/userspace/ncr-sessions.c @@ -25,7 +25,7 @@ #include <linux/crypto.h> #include <linux/mutex.h> -#include "ncr.h" +#include <linux/ncr.h> #include "ncr-int.h" #include <linux/mm_types.h> #include <linux/scatterlist.h> diff --git a/crypto/userspace/ncr.c b/crypto/userspace/ncr.c index 55b40ef6d24..e643fe139a0 100644 --- a/crypto/userspace/ncr.c +++ b/crypto/userspace/ncr.c @@ -32,8 +32,8 @@ #include <linux/scatterlist.h> #include <linux/cred.h> #include <linux/capability.h> +#include <linux/ncr.h> #include <net/netlink.h> -#include "ncr.h" #include "ncr-int.h" #include "utils.h" #include <linux/workqueue.h> |