Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
zcrypt.h File Reference
#include <linux/ioctl.h>
#include <linux/compiler.h>

Go to the source code of this file.

Data Structures

struct  ica_rsa_modexpo
 
struct  ica_rsa_modexpo_crt
 
struct  CPRBX
 
struct  ica_xcRB
 

Macros

#define ZCRYPT_VERSION   2
 
#define ZCRYPT_RELEASE   1
 
#define ZCRYPT_VARIANT   1
 
#define AUTOSELECT   ((unsigned int)0xFFFFFFFF)
 
#define ZCRYPT_IOCTL_MAGIC   'z'
 
#define ICARSAMODEXPO   _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x05, 0)
 
#define ICARSACRT   _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x06, 0)
 
#define ZSECSENDCPRB   _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x81, 0)
 
#define Z90STAT_TOTALCOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x40, int)
 
#define Z90STAT_PCICACOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x41, int)
 
#define Z90STAT_PCICCCOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x42, int)
 
#define Z90STAT_PCIXCCMCL2COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4b, int)
 
#define Z90STAT_PCIXCCMCL3COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4c, int)
 
#define Z90STAT_CEX2CCOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4d, int)
 
#define Z90STAT_CEX2ACOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4e, int)
 
#define Z90STAT_REQUESTQ_COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x44, int)
 
#define Z90STAT_PENDINGQ_COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x45, int)
 
#define Z90STAT_TOTALOPEN_COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x46, int)
 
#define Z90STAT_DOMAIN_INDEX   _IOR(ZCRYPT_IOCTL_MAGIC, 0x47, int)
 
#define Z90STAT_STATUS_MASK   _IOR(ZCRYPT_IOCTL_MAGIC, 0x48, char[64])
 
#define Z90STAT_QDEPTH_MASK   _IOR(ZCRYPT_IOCTL_MAGIC, 0x49, char[64])
 
#define Z90STAT_PERDEV_REQCNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4a, int[64])
 

Functions

struct CPRBX __attribute__ ((packed))
 

Variables

struct ica_rsa_modexpo __attribute__
 
unsigned short cprb_len
 
unsigned char cprb_ver_id
 
unsigned char pad_000 [3]
 
unsigned char func_id [2]
 
unsigned char cprb_flags [4]
 
unsigned int req_parml
 
unsigned int req_datal
 
unsigned int rpl_msgbl
 
unsigned int rpld_parml
 
unsigned int rpl_datal
 
unsigned int rpld_datal
 
unsigned int req_extbl
 
unsigned char pad_001 [4]
 
unsigned int rpld_extbl
 
unsigned char padx000 [16-sizeof(char *)]
 
unsigned charreq_parmb
 
unsigned char padx001 [16-sizeof(char *)]
 
unsigned charreq_datab
 
unsigned char padx002 [16-sizeof(char *)]
 
unsigned charrpl_parmb
 
unsigned char padx003 [16-sizeof(char *)]
 
unsigned charrpl_datab
 
unsigned char padx004 [16-sizeof(char *)]
 
unsigned charreq_extb
 
unsigned char padx005 [16-sizeof(char *)]
 
unsigned charrpl_extb
 
unsigned short ccp_rtcode
 
unsigned short ccp_rscode
 
unsigned int mac_data_len
 
unsigned char logon_id [8]
 
unsigned char mac_value [8]
 
unsigned char mac_content_flgs
 
unsigned char pad_002
 
unsigned short domain
 
unsigned char usage_domain [4]
 
unsigned char cntrl_domain [4]
 
unsigned char S390enf_mask [4]
 
unsigned char pad_004 [36]
 
unsigned short agent_ID
 
unsigned int user_defined
 
unsigned short request_ID
 
unsigned int request_control_blk_length
 
unsigned char padding1 [16-sizeof(char *)]
 
char __userrequest_control_blk_addr
 
unsigned int request_data_length
 
char padding2 [16-sizeof(char *)]
 
char __userrequest_data_address
 
unsigned int reply_control_blk_length
 
char padding3 [16-sizeof(char *)]
 
char __userreply_control_blk_addr
 
unsigned int reply_data_length
 
char padding4 [16-sizeof(char *)]
 
char __userreply_data_addr
 
unsigned short priority_window
 
unsigned int status
 

Macro Definition Documentation

#define AUTOSELECT   ((unsigned int)0xFFFFFFFF)

Definition at line 157 of file zcrypt.h.

#define ICARSACRT   _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x06, 0)

Definition at line 257 of file zcrypt.h.

#define ICARSAMODEXPO   _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x05, 0)

Interface notes:

The ioctl()s which are implemented (along with relevant details) are:

ICARSAMODEXPO Perform an RSA operation using a Modulus-Exponent pair This takes an ica_rsa_modexpo struct as its arg.

NOTE: please refer to the comments preceding this structure for the implementation details for the contents of the block

ICARSACRT Perform an RSA operation using a Chinese-Remainder Theorem key This takes an ica_rsa_modexpo_crt struct as its arg.

NOTE: please refer to the comments preceding this structure for the implementation details for the contents of the block

ZSECSENDCPRB Send an arbitrary CPRB to a crypto card.

Z90STAT_STATUS_MASK Return an 64 element array of unsigned chars for the status of all devices. 0x01: PCICA 0x02: PCICC 0x03: PCIXCC_MCL2 0x04: PCIXCC_MCL3 0x05: CEX2C 0x06: CEX2A 0x0d: device is disabled via the proc filesystem

Z90STAT_QDEPTH_MASK Return an 64 element array of unsigned chars for the queue depth of all devices.

Z90STAT_PERDEV_REQCNT Return an 64 element array of unsigned integers for the number of successfully completed requests per device since the device was detected and made available.

Z90STAT_REQUESTQ_COUNT Return an integer count of the number of entries waiting to be sent to a device.

Z90STAT_PENDINGQ_COUNT Return an integer count of the number of entries sent to all devices awaiting the reply.

Z90STAT_TOTALOPEN_COUNT Return an integer count of the number of open file handles.

Z90STAT_DOMAIN_INDEX Return the integer value of the Cryptographic Domain.

The following ioctls are deprecated and should be no longer used:

Z90STAT_TOTALCOUNT Return an integer count of all device types together.

Z90STAT_PCICACOUNT Return an integer count of all PCICAs.

Z90STAT_PCICCCOUNT Return an integer count of all PCICCs.

Z90STAT_PCIXCCMCL2COUNT Return an integer count of all MCL2 PCIXCCs.

Z90STAT_PCIXCCMCL3COUNT Return an integer count of all MCL3 PCIXCCs.

Z90STAT_CEX2CCOUNT Return an integer count of all CEX2Cs.

Z90STAT_CEX2ACOUNT Return an integer count of all CEX2As.

ICAZ90STATUS Return some device driver status in a ica_z90_status struct This takes an ica_z90_status struct as its arg.

Z90STAT_PCIXCCCOUNT Return an integer count of all PCIXCCs (MCL2 + MCL3). This is DEPRECATED now that MCL3 PCIXCCs are treated differently from MCL2 PCIXCCs. Supported ioctl calls

Definition at line 256 of file zcrypt.h.

#define Z90STAT_CEX2ACOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4e, int)

Definition at line 267 of file zcrypt.h.

#define Z90STAT_CEX2CCOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4d, int)

Definition at line 266 of file zcrypt.h.

#define Z90STAT_DOMAIN_INDEX   _IOR(ZCRYPT_IOCTL_MAGIC, 0x47, int)

Definition at line 271 of file zcrypt.h.

#define Z90STAT_PCICACOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x41, int)

Definition at line 262 of file zcrypt.h.

#define Z90STAT_PCICCCOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x42, int)

Definition at line 263 of file zcrypt.h.

#define Z90STAT_PCIXCCMCL2COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4b, int)

Definition at line 264 of file zcrypt.h.

#define Z90STAT_PCIXCCMCL3COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4c, int)

Definition at line 265 of file zcrypt.h.

#define Z90STAT_PENDINGQ_COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x45, int)

Definition at line 269 of file zcrypt.h.

#define Z90STAT_PERDEV_REQCNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x4a, int[64])

Definition at line 274 of file zcrypt.h.

#define Z90STAT_QDEPTH_MASK   _IOR(ZCRYPT_IOCTL_MAGIC, 0x49, char[64])

Definition at line 273 of file zcrypt.h.

#define Z90STAT_REQUESTQ_COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x44, int)

Definition at line 268 of file zcrypt.h.

#define Z90STAT_STATUS_MASK   _IOR(ZCRYPT_IOCTL_MAGIC, 0x48, char[64])

Definition at line 272 of file zcrypt.h.

#define Z90STAT_TOTALCOUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x40, int)

Definition at line 261 of file zcrypt.h.

#define Z90STAT_TOTALOPEN_COUNT   _IOR(ZCRYPT_IOCTL_MAGIC, 0x46, int)

Definition at line 270 of file zcrypt.h.

#define ZCRYPT_IOCTL_MAGIC   'z'

Definition at line 159 of file zcrypt.h.

#define ZCRYPT_RELEASE   1

Definition at line 31 of file zcrypt.h.

#define ZCRYPT_VARIANT   1

Definition at line 32 of file zcrypt.h.

#define ZCRYPT_VERSION   2

Definition at line 30 of file zcrypt.h.

#define ZSECSENDCPRB   _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x81, 0)

Definition at line 258 of file zcrypt.h.

Function Documentation

struct CPRBX __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

Variable Documentation

unsigned short agent_ID

Definition at line 157 of file zcrypt.h.

unsigned short ccp_rscode

Definition at line 161 of file zcrypt.h.

unsigned short ccp_rtcode

Definition at line 160 of file zcrypt.h.

unsigned char cntrl_domain[4]

Definition at line 169 of file zcrypt.h.

unsigned char cprb_flags[4]

Definition at line 138 of file zcrypt.h.

unsigned short cprb_len

Definition at line 134 of file zcrypt.h.

unsigned char cprb_ver_id

Definition at line 135 of file zcrypt.h.

u64 domain

Definition at line 167 of file zcrypt.h.

unsigned char func_id[2]

Definition at line 137 of file zcrypt.h.

unsigned char logon_id[8]

Definition at line 163 of file zcrypt.h.

unsigned char mac_content_flgs

Definition at line 165 of file zcrypt.h.

unsigned int mac_data_len

Definition at line 162 of file zcrypt.h.

unsigned char mac_value[8]

Definition at line 164 of file zcrypt.h.

unsigned char pad_000[3]

Definition at line 136 of file zcrypt.h.

unsigned char pad_001[4]

Definition at line 146 of file zcrypt.h.

unsigned char pad_002

Definition at line 166 of file zcrypt.h.

unsigned char pad_004[36]

Definition at line 171 of file zcrypt.h.

unsigned char padding1[16-sizeof(char *)]

Definition at line 161 of file zcrypt.h.

char padding2[16-sizeof(char *)]

Definition at line 164 of file zcrypt.h.

char padding3[16-sizeof(char *)]

Definition at line 167 of file zcrypt.h.

char padding4[16-sizeof(char *)]

Definition at line 170 of file zcrypt.h.

unsigned char padx000[16-sizeof(char *)]

Definition at line 148 of file zcrypt.h.

unsigned char padx001[16-sizeof(char *)]

Definition at line 150 of file zcrypt.h.

unsigned char padx002[16-sizeof(char *)]

Definition at line 152 of file zcrypt.h.

unsigned char padx003[16-sizeof(char *)]

Definition at line 154 of file zcrypt.h.

unsigned char padx004[16-sizeof(char *)]

Definition at line 156 of file zcrypt.h.

unsigned char padx005[16-sizeof(char *)]

Definition at line 158 of file zcrypt.h.

unsigned short priority_window

Definition at line 172 of file zcrypt.h.

char __user* reply_control_blk_addr

Definition at line 168 of file zcrypt.h.

unsigned int reply_control_blk_length

Definition at line 166 of file zcrypt.h.

char __user* reply_data_addr

Definition at line 171 of file zcrypt.h.

unsigned int reply_data_length

Definition at line 169 of file zcrypt.h.

unsigned char* req_datab

Definition at line 151 of file zcrypt.h.

unsigned int req_datal

Definition at line 140 of file zcrypt.h.

unsigned char* req_extb

Definition at line 157 of file zcrypt.h.

unsigned int req_extbl

Definition at line 145 of file zcrypt.h.

unsigned char* req_parmb

Definition at line 149 of file zcrypt.h.

unsigned int req_parml

Definition at line 139 of file zcrypt.h.

char __user* request_control_blk_addr

Definition at line 162 of file zcrypt.h.

unsigned int request_control_blk_length

Definition at line 160 of file zcrypt.h.

char __user* request_data_address

Definition at line 165 of file zcrypt.h.

unsigned int request_data_length

Definition at line 163 of file zcrypt.h.

unsigned short request_ID

Definition at line 159 of file zcrypt.h.

unsigned char* rpl_datab

Definition at line 155 of file zcrypt.h.

unsigned int rpl_datal

Definition at line 143 of file zcrypt.h.

unsigned char* rpl_extb

Definition at line 159 of file zcrypt.h.

unsigned int rpl_msgbl

Definition at line 141 of file zcrypt.h.

unsigned char* rpl_parmb

Definition at line 153 of file zcrypt.h.

unsigned int rpld_datal

Definition at line 144 of file zcrypt.h.

unsigned int rpld_extbl

Definition at line 147 of file zcrypt.h.

unsigned int rpld_parml

Definition at line 142 of file zcrypt.h.

unsigned char S390enf_mask[4]

Definition at line 170 of file zcrypt.h.

unsigned int status

Definition at line 173 of file zcrypt.h.

unsigned char usage_domain[4]

Definition at line 168 of file zcrypt.h.

unsigned int user_defined

Definition at line 158 of file zcrypt.h.