diff options
| -rw-r--r-- | arch/cris/include/arch-v10/arch/Kbuild | 5 | ||||
| -rw-r--r-- | arch/cris/include/arch-v32/arch/Kbuild | 3 | ||||
| -rw-r--r-- | arch/cris/include/arch-v32/arch/cryptocop.h | 116 | ||||
| -rw-r--r-- | arch/cris/include/arch-v32/arch/spinlock.h | 2 | ||||
| -rw-r--r-- | arch/cris/include/asm/Kbuild | 5 | ||||
| -rw-r--r-- | arch/cris/include/asm/ptrace.h | 5 | ||||
| -rw-r--r-- | arch/cris/include/asm/signal.h | 121 | ||||
| -rw-r--r-- | arch/cris/include/asm/swab.h | 3 | ||||
| -rw-r--r-- | arch/cris/include/asm/termios.h | 43 | ||||
| -rw-r--r-- | arch/cris/include/asm/types.h | 5 | ||||
| -rw-r--r-- | arch/cris/include/asm/unistd.h | 342 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v10/arch/Kbuild | 4 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v10/arch/sv_addr.agh (renamed from arch/cris/include/arch-v10/arch/sv_addr.agh) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v10/arch/sv_addr_ag.h (renamed from arch/cris/include/arch-v10/arch/sv_addr_ag.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v10/arch/svinto.h (renamed from arch/cris/include/arch-v10/arch/svinto.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v10/arch/user.h (renamed from arch/cris/include/arch-v10/arch/user.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v32/arch/Kbuild | 2 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v32/arch/cryptocop.h | 122 | ||||
| -rw-r--r-- | arch/cris/include/uapi/arch-v32/arch/user.h (renamed from arch/cris/include/arch-v32/arch/user.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/Kbuild | 34 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/auxvec.h (renamed from arch/cris/include/asm/auxvec.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/bitsperlong.h (renamed from arch/cris/include/asm/bitsperlong.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/byteorder.h (renamed from arch/cris/include/asm/byteorder.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/errno.h (renamed from arch/cris/include/asm/errno.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/ethernet.h (renamed from arch/cris/include/asm/ethernet.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/etraxgpio.h (renamed from arch/cris/include/asm/etraxgpio.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/fcntl.h (renamed from arch/cris/include/asm/fcntl.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/ioctl.h (renamed from arch/cris/include/asm/ioctl.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/ioctls.h (renamed from arch/cris/include/asm/ioctls.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/ipcbuf.h (renamed from arch/cris/include/asm/ipcbuf.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/mman.h (renamed from arch/cris/include/asm/mman.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/msgbuf.h (renamed from arch/cris/include/asm/msgbuf.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/param.h (renamed from arch/cris/include/asm/param.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/poll.h (renamed from arch/cris/include/asm/poll.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/posix_types.h (renamed from arch/cris/include/asm/posix_types.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/ptrace.h | 1 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/resource.h (renamed from arch/cris/include/asm/resource.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/rs485.h (renamed from arch/cris/include/asm/rs485.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/sembuf.h (renamed from arch/cris/include/asm/sembuf.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/setup.h (renamed from arch/cris/include/asm/setup.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/shmbuf.h (renamed from arch/cris/include/asm/shmbuf.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/sigcontext.h (renamed from arch/cris/include/asm/sigcontext.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/siginfo.h (renamed from arch/cris/include/asm/siginfo.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/signal.h | 122 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/socket.h (renamed from arch/cris/include/asm/socket.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/sockios.h (renamed from arch/cris/include/asm/sockios.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/stat.h (renamed from arch/cris/include/asm/stat.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/statfs.h (renamed from arch/cris/include/asm/statfs.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/swab.h | 3 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/sync_serial.h (renamed from arch/cris/include/asm/sync_serial.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/termbits.h (renamed from arch/cris/include/asm/termbits.h) | 0 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/termios.h | 45 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/types.h | 1 | ||||
| -rw-r--r-- | arch/cris/include/uapi/asm/unistd.h | 344 | ||||
| -rw-r--r-- | arch/cris/kernel/asm-offsets.c | 6 |
55 files changed, 689 insertions, 645 deletions
diff --git a/arch/cris/include/arch-v10/arch/Kbuild b/arch/cris/include/arch-v10/arch/Kbuild index 7a192e1290b1..1f0fc7a66f5f 100644 --- a/arch/cris/include/arch-v10/arch/Kbuild +++ b/arch/cris/include/arch-v10/arch/Kbuild | |||
| @@ -1,4 +1 @@ | |||
| 1 | header-y += user.h | # CRISv10 arch | |
| 2 | header-y += svinto.h | ||
| 3 | header-y += sv_addr_ag.h | ||
| 4 | header-y += sv_addr.agh | ||
diff --git a/arch/cris/include/arch-v32/arch/Kbuild b/arch/cris/include/arch-v32/arch/Kbuild index 35f2fc4f993e..2fd65c7e15c9 100644 --- a/arch/cris/include/arch-v32/arch/Kbuild +++ b/arch/cris/include/arch-v32/arch/Kbuild | |||
| @@ -1,2 +1 @@ | |||
| 1 | header-y += user.h | # CRISv32 arch | |
| 2 | header-y += cryptocop.h | ||
diff --git a/arch/cris/include/arch-v32/arch/cryptocop.h b/arch/cris/include/arch-v32/arch/cryptocop.h index e1cd83dfabb5..716e434e9269 100644 --- a/arch/cris/include/arch-v32/arch/cryptocop.h +++ b/arch/cris/include/arch-v32/arch/cryptocop.h | |||
| @@ -2,124 +2,12 @@ | |||
| 2 | * The device /dev/cryptocop is accessible using this driver using | 2 | * The device /dev/cryptocop is accessible using this driver using |
| 3 | * CRYPTOCOP_MAJOR (254) and minor number 0. | 3 | * CRYPTOCOP_MAJOR (254) and minor number 0. |
| 4 | */ | 4 | */ |
| 5 | |||
| 6 | #ifndef CRYPTOCOP_H | 5 | #ifndef CRYPTOCOP_H |
| 7 | #define CRYPTOCOP_H | 6 | #define CRYPTOCOP_H |
| 8 | 7 | ||
| 9 | #include <linux/uio.h> | 8 | #include <uapi/arch-v32/arch/cryptocop.h> |
| 10 | |||
| 11 | |||
| 12 | #define CRYPTOCOP_SESSION_ID_NONE (0) | ||
| 13 | |||
| 14 | typedef unsigned long long int cryptocop_session_id; | ||
| 15 | |||
| 16 | /* cryptocop ioctls */ | ||
| 17 | #define ETRAXCRYPTOCOP_IOCTYPE (250) | ||
| 18 | |||
| 19 | #define CRYPTOCOP_IO_CREATE_SESSION _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 1, struct strcop_session_op) | ||
| 20 | #define CRYPTOCOP_IO_CLOSE_SESSION _IOW(ETRAXCRYPTOCOP_IOCTYPE, 2, struct strcop_session_op) | ||
| 21 | #define CRYPTOCOP_IO_PROCESS_OP _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 3, struct strcop_crypto_op) | ||
| 22 | #define CRYPTOCOP_IO_MAXNR (3) | ||
| 23 | |||
| 24 | typedef enum { | ||
| 25 | cryptocop_cipher_des = 0, | ||
| 26 | cryptocop_cipher_3des = 1, | ||
| 27 | cryptocop_cipher_aes = 2, | ||
| 28 | cryptocop_cipher_m2m = 3, /* mem2mem is essentially a NULL cipher with blocklength=1 */ | ||
| 29 | cryptocop_cipher_none | ||
| 30 | } cryptocop_cipher_type; | ||
| 31 | |||
| 32 | typedef enum { | ||
| 33 | cryptocop_digest_sha1 = 0, | ||
| 34 | cryptocop_digest_md5 = 1, | ||
| 35 | cryptocop_digest_none | ||
| 36 | } cryptocop_digest_type; | ||
| 37 | |||
| 38 | typedef enum { | ||
| 39 | cryptocop_csum_le = 0, | ||
| 40 | cryptocop_csum_be = 1, | ||
| 41 | cryptocop_csum_none | ||
| 42 | } cryptocop_csum_type; | ||
| 43 | |||
| 44 | typedef enum { | ||
| 45 | cryptocop_cipher_mode_ecb = 0, | ||
| 46 | cryptocop_cipher_mode_cbc, | ||
| 47 | cryptocop_cipher_mode_none | ||
| 48 | } cryptocop_cipher_mode; | ||
| 49 | |||
| 50 | typedef enum { | ||
| 51 | cryptocop_3des_eee = 0, | ||
| 52 | cryptocop_3des_eed = 1, | ||
| 53 | cryptocop_3des_ede = 2, | ||
| 54 | cryptocop_3des_edd = 3, | ||
| 55 | cryptocop_3des_dee = 4, | ||
| 56 | cryptocop_3des_ded = 5, | ||
| 57 | cryptocop_3des_dde = 6, | ||
| 58 | cryptocop_3des_ddd = 7 | ||
| 59 | } cryptocop_3des_mode; | ||
| 60 | |||
| 61 | /* Usermode accessible (ioctl) operations. */ | ||
| 62 | struct strcop_session_op{ | ||
| 63 | cryptocop_session_id ses_id; | ||
| 64 | |||
| 65 | cryptocop_cipher_type cipher; /* AES, DES, 3DES, m2m, none */ | ||
| 66 | |||
| 67 | cryptocop_cipher_mode cmode; /* ECB, CBC, none */ | ||
| 68 | cryptocop_3des_mode des3_mode; | ||
| 69 | |||
| 70 | cryptocop_digest_type digest; /* MD5, SHA1, none */ | ||
| 71 | |||
| 72 | cryptocop_csum_type csum; /* BE, LE, none */ | ||
| 73 | |||
| 74 | unsigned char *key; | ||
| 75 | size_t keylen; | ||
| 76 | }; | ||
| 77 | |||
| 78 | #define CRYPTOCOP_CSUM_LENGTH (2) | ||
| 79 | #define CRYPTOCOP_MAX_DIGEST_LENGTH (20) /* SHA-1 20, MD5 16 */ | ||
| 80 | #define CRYPTOCOP_MAX_IV_LENGTH (16) /* (3)DES==8, AES == 16 */ | ||
| 81 | #define CRYPTOCOP_MAX_KEY_LENGTH (32) | ||
| 82 | |||
| 83 | struct strcop_crypto_op{ | ||
| 84 | cryptocop_session_id ses_id; | ||
| 85 | |||
| 86 | /* Indata. */ | ||
| 87 | unsigned char *indata; | ||
| 88 | size_t inlen; /* Total indata length. */ | ||
| 89 | |||
| 90 | /* Cipher configuration. */ | ||
| 91 | unsigned char do_cipher:1; | ||
| 92 | unsigned char decrypt:1; /* 1 == decrypt, 0 == encrypt */ | ||
| 93 | unsigned char cipher_explicit:1; | ||
| 94 | size_t cipher_start; | ||
| 95 | size_t cipher_len; | ||
| 96 | /* cipher_iv is used if do_cipher and cipher_explicit and the cipher | ||
| 97 | mode is CBC. The length is controlled by the type of cipher, | ||
| 98 | e.g. DES/3DES 8 octets and AES 16 octets. */ | ||
