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()
560 static inline bool zcrypt_check_card(struct ap_perms *perms, int card) in zcrypt_check_card() argument
562 return test_bit_inv(card, perms->apm) ? true : false; in zcrypt_check_card()
565 static inline bool zcrypt_check_queue(struct ap_perms *perms, int queue) in zcrypt_check_queue() argument
567 return test_bit_inv(queue, perms->aqm) ? true : false; in zcrypt_check_queue()
632 static long zcrypt_rsa_modexpo(struct ap_perms *perms, in zcrypt_rsa_modexpo() argument
683 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_modexpo()
699 if (!zcrypt_check_queue(perms, in zcrypt_rsa_modexpo()
740 static long zcrypt_rsa_crt(struct ap_perms *perms, in zcrypt_rsa_crt() argument
791 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_crt()
807 if (!zcrypt_check_queue(perms, in zcrypt_rsa_crt()
848 static long _zcrypt_send_cprb(bool userspace, struct ap_perms *perms, in _zcrypt_send_cprb() argument
907 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_cprb()
926 if (!zcrypt_check_queue(perms, in _zcrypt_send_cprb()
1012 static long _zcrypt_send_ep11_cprb(bool userspace, struct ap_perms *perms, in _zcrypt_send_ep11_cprb() argument
1078 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_ep11_cprb()
1098 if (!zcrypt_check_queue(perms, in _zcrypt_send_ep11_cprb()
1410 static int icarsamodexpo_ioctl(struct ap_perms *perms, unsigned long arg) in icarsamodexpo_ioctl() argument
1431 rc = zcrypt_rsa_modexpo(perms, &tr, &mex); in icarsamodexpo_ioctl()
1442 rc = zcrypt_rsa_modexpo(perms, &tr, &mex); in icarsamodexpo_ioctl()
1455 static int icarsacrt_ioctl(struct ap_perms *perms, unsigned long arg) in icarsacrt_ioctl() argument
1476 rc = zcrypt_rsa_crt(perms, &tr, &crt); in icarsacrt_ioctl()
1487 rc = zcrypt_rsa_crt(perms, &tr, &crt); in icarsacrt_ioctl()
1500 static int zsecsendcprb_ioctl(struct ap_perms *perms, unsigned long arg) in zsecsendcprb_ioctl() argument
1521 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB); in zsecsendcprb_ioctl()
1532 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB); in zsecsendcprb_ioctl()
1546 static int zsendep11cprb_ioctl(struct ap_perms *perms, unsigned long arg) in zsendep11cprb_ioctl() argument
1567 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb); in zsendep11cprb_ioctl()
1578 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb); in zsendep11cprb_ioctl()
1595 struct ap_perms *perms = in zcrypt_unlocked_ioctl() local
1598 rc = zcrypt_check_ioctl(perms, cmd); in zcrypt_unlocked_ioctl()
1604 return icarsamodexpo_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1606 return icarsacrt_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1608 return zsecsendcprb_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1610 return zsendep11cprb_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1730 static long trans_modexpo32(struct ap_perms *perms, struct file *filp, in trans_modexpo32() argument
1749 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64); in trans_modexpo32()
1756 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64); in trans_modexpo32()
1780 static long trans_modexpo_crt32(struct ap_perms *perms, struct file *filp, in trans_modexpo_crt32() argument
1802 rc = zcrypt_rsa_crt(perms, &tr, &crt64); in trans_modexpo_crt32()
1809 rc = zcrypt_rsa_crt(perms, &tr, &crt64); in trans_modexpo_crt32()
1841 static long trans_xcRB32(struct ap_perms *perms, struct file *filp, in trans_xcRB32() argument
1874 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB64); in trans_xcRB32()
1881 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB64); in trans_xcRB32()
1899 struct ap_perms *perms = in zcrypt_compat_ioctl() local
1902 rc = zcrypt_check_ioctl(perms, cmd); in zcrypt_compat_ioctl()
1907 return trans_modexpo32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()
1909 return trans_modexpo_crt32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()
1911 return trans_xcRB32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()