Lines Matching refs:perms

128 	struct ap_perms perms;  member
174 for (i = 0; i < sizeof(zcdndev->perms.ioctlm) / sizeof(long); i++) in ioctlmask_show()
177 "%016lx", zcdndev->perms.ioctlm[i]); in ioctlmask_show()
194 rc = ap_parse_mask_str(buf, zcdndev->perms.ioctlm, in ioctlmask_store()
216 for (i = 0; i < sizeof(zcdndev->perms.apm) / sizeof(long); i++) in apmask_show()
219 "%016lx", zcdndev->perms.apm[i]); in apmask_show()
236 rc = ap_parse_mask_str(buf, zcdndev->perms.apm, in apmask_store()
258 for (i = 0; i < sizeof(zcdndev->perms.aqm) / sizeof(long); i++) in aqmask_show()
261 "%016lx", zcdndev->perms.aqm[i]); in aqmask_show()
278 rc = ap_parse_mask_str(buf, zcdndev->perms.aqm, in aqmask_store()
494 struct ap_perms *perms = &ap_perms; in zcrypt_open() local
506 perms = &zcdndev->perms; in zcrypt_open()
509 filp->private_data = (void *) perms; in zcrypt_open()
541 static inline int zcrypt_check_ioctl(struct ap_perms *perms, in zcrypt_check_ioctl() argument
548 if (test_bit_inv(ioctlnr, perms->ioctlm)) in zcrypt_check_ioctl()
559 static inline bool zcrypt_check_card(struct ap_perms *perms, int card) in zcrypt_check_card() argument
561 return test_bit_inv(card, perms->apm) ? true : false; in zcrypt_check_card()
564 static inline bool zcrypt_check_queue(struct ap_perms *perms, int queue) in zcrypt_check_queue() argument
566 return test_bit_inv(queue, perms->aqm) ? true : false; in zcrypt_check_queue()
631 static long zcrypt_rsa_modexpo(struct ap_perms *perms, in zcrypt_rsa_modexpo() argument
682 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_modexpo()
698 if (!zcrypt_check_queue(perms, in zcrypt_rsa_modexpo()
739 static long zcrypt_rsa_crt(struct ap_perms *perms, in zcrypt_rsa_crt() argument
790 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_crt()
806 if (!zcrypt_check_queue(perms, in zcrypt_rsa_crt()
847 static long _zcrypt_send_cprb(bool userspace, struct ap_perms *perms, in _zcrypt_send_cprb() argument
906 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_cprb()
925 if (!zcrypt_check_queue(perms, in _zcrypt_send_cprb()
1011 static long _zcrypt_send_ep11_cprb(bool userspace, struct ap_perms *perms, in _zcrypt_send_ep11_cprb() argument
1077 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_ep11_cprb()
1097 if (!zcrypt_check_queue(perms, in _zcrypt_send_ep11_cprb()
1409 static int icarsamodexpo_ioctl(struct ap_perms *perms, unsigned long arg) in icarsamodexpo_ioctl() argument
1430 rc = zcrypt_rsa_modexpo(perms, &tr, &mex); in icarsamodexpo_ioctl()
1441 rc = zcrypt_rsa_modexpo(perms, &tr, &mex); in icarsamodexpo_ioctl()
1454 static int icarsacrt_ioctl(struct ap_perms *perms, unsigned long arg) in icarsacrt_ioctl() argument
1475 rc = zcrypt_rsa_crt(perms, &tr, &crt); in icarsacrt_ioctl()
1486 rc = zcrypt_rsa_crt(perms, &tr, &crt); in icarsacrt_ioctl()
1499 static int zsecsendcprb_ioctl(struct ap_perms *perms, unsigned long arg) in zsecsendcprb_ioctl() argument
1520 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB); in zsecsendcprb_ioctl()
1531 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB); in zsecsendcprb_ioctl()
1545 static int zsendep11cprb_ioctl(struct ap_perms *perms, unsigned long arg) in zsendep11cprb_ioctl() argument
1566 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb); in zsendep11cprb_ioctl()
1577 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb); in zsendep11cprb_ioctl()
1594 struct ap_perms *perms = in zcrypt_unlocked_ioctl() local
1597 rc = zcrypt_check_ioctl(perms, cmd); in zcrypt_unlocked_ioctl()
1603 return icarsamodexpo_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1605 return icarsacrt_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1607 return zsecsendcprb_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1609 return zsendep11cprb_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1729 static long trans_modexpo32(struct ap_perms *perms, struct file *filp, in trans_modexpo32() argument
1748 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64); in trans_modexpo32()
1755 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64); in trans_modexpo32()
1779 static long trans_modexpo_crt32(struct ap_perms *perms, struct file *filp, in trans_modexpo_crt32() argument
1801 rc = zcrypt_rsa_crt(perms, &tr, &crt64); in trans_modexpo_crt32()
1808 rc = zcrypt_rsa_crt(perms, &tr, &crt64); in trans_modexpo_crt32()
1840 static long trans_xcRB32(struct ap_perms *perms, struct file *filp, in trans_xcRB32() argument
1873 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB64); in trans_xcRB32()
1880 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB64); in trans_xcRB32()
1898 struct ap_perms *perms = in zcrypt_compat_ioctl() local
1901 rc = zcrypt_check_ioctl(perms, cmd); in zcrypt_compat_ioctl()
1906 return trans_modexpo32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()
1908 return trans_modexpo_crt32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()
1910 return trans_xcRB32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()