Lines Matching refs:perms
129 struct ap_perms perms; member
175 for (i = 0; i < sizeof(zcdndev->perms.ioctlm) / sizeof(long); i++) in ioctlmask_show()
178 "%016lx", zcdndev->perms.ioctlm[i]); in ioctlmask_show()
195 rc = ap_parse_mask_str(buf, zcdndev->perms.ioctlm, in ioctlmask_store()
217 for (i = 0; i < sizeof(zcdndev->perms.apm) / sizeof(long); i++) in apmask_show()
220 "%016lx", zcdndev->perms.apm[i]); in apmask_show()
237 rc = ap_parse_mask_str(buf, zcdndev->perms.apm, in apmask_store()
259 for (i = 0; i < sizeof(zcdndev->perms.aqm) / sizeof(long); i++) in aqmask_show()
262 "%016lx", zcdndev->perms.aqm[i]); in aqmask_show()
279 rc = ap_parse_mask_str(buf, zcdndev->perms.aqm, in aqmask_store()
495 struct ap_perms *perms = &ap_perms; in zcrypt_open() local
507 perms = &zcdndev->perms; in zcrypt_open()
510 filp->private_data = (void *) perms; in zcrypt_open()
542 static inline int zcrypt_check_ioctl(struct ap_perms *perms, in zcrypt_check_ioctl() argument
549 if (test_bit_inv(ioctlnr, perms->ioctlm)) in zcrypt_check_ioctl()
561 static inline bool zcrypt_check_card(struct ap_perms *perms, int card) in zcrypt_check_card() argument
563 return test_bit_inv(card, perms->apm) ? true : false; in zcrypt_check_card()
566 static inline bool zcrypt_check_queue(struct ap_perms *perms, int queue) in zcrypt_check_queue() argument
568 return test_bit_inv(queue, perms->aqm) ? true : false; in zcrypt_check_queue()
633 static long zcrypt_rsa_modexpo(struct ap_perms *perms, in zcrypt_rsa_modexpo() argument
684 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_modexpo()
700 if (!zcrypt_check_queue(perms, in zcrypt_rsa_modexpo()
741 static long zcrypt_rsa_crt(struct ap_perms *perms, in zcrypt_rsa_crt() argument
792 if (!zcrypt_check_card(perms, zc->card->id)) in zcrypt_rsa_crt()
808 if (!zcrypt_check_queue(perms, in zcrypt_rsa_crt()
849 static long _zcrypt_send_cprb(bool userspace, struct ap_perms *perms, in _zcrypt_send_cprb() argument
905 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_cprb()
924 if (!zcrypt_check_queue(perms, in _zcrypt_send_cprb()
1010 static long _zcrypt_send_ep11_cprb(bool userspace, struct ap_perms *perms, in _zcrypt_send_ep11_cprb() argument
1073 if (!zcrypt_check_card(perms, zc->card->id)) in _zcrypt_send_ep11_cprb()
1093 if (!zcrypt_check_queue(perms, in _zcrypt_send_ep11_cprb()
1405 static int icarsamodexpo_ioctl(struct ap_perms *perms, unsigned long arg) in icarsamodexpo_ioctl() argument
1426 rc = zcrypt_rsa_modexpo(perms, &tr, &mex); in icarsamodexpo_ioctl()
1437 rc = zcrypt_rsa_modexpo(perms, &tr, &mex); in icarsamodexpo_ioctl()
1450 static int icarsacrt_ioctl(struct ap_perms *perms, unsigned long arg) in icarsacrt_ioctl() argument
1471 rc = zcrypt_rsa_crt(perms, &tr, &crt); in icarsacrt_ioctl()
1482 rc = zcrypt_rsa_crt(perms, &tr, &crt); in icarsacrt_ioctl()
1495 static int zsecsendcprb_ioctl(struct ap_perms *perms, unsigned long arg) in zsecsendcprb_ioctl() argument
1516 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB); in zsecsendcprb_ioctl()
1527 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB); in zsecsendcprb_ioctl()
1541 static int zsendep11cprb_ioctl(struct ap_perms *perms, unsigned long arg) in zsendep11cprb_ioctl() argument
1562 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb); in zsendep11cprb_ioctl()
1573 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb); in zsendep11cprb_ioctl()
1590 struct ap_perms *perms = in zcrypt_unlocked_ioctl() local
1593 rc = zcrypt_check_ioctl(perms, cmd); in zcrypt_unlocked_ioctl()
1599 return icarsamodexpo_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1601 return icarsacrt_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1603 return zsecsendcprb_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1605 return zsendep11cprb_ioctl(perms, arg); in zcrypt_unlocked_ioctl()
1725 static long trans_modexpo32(struct ap_perms *perms, struct file *filp, in trans_modexpo32() argument
1744 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64); in trans_modexpo32()
1751 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64); in trans_modexpo32()
1775 static long trans_modexpo_crt32(struct ap_perms *perms, struct file *filp, in trans_modexpo_crt32() argument
1797 rc = zcrypt_rsa_crt(perms, &tr, &crt64); in trans_modexpo_crt32()
1804 rc = zcrypt_rsa_crt(perms, &tr, &crt64); in trans_modexpo_crt32()
1836 static long trans_xcRB32(struct ap_perms *perms, struct file *filp, in trans_xcRB32() argument
1869 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB64); in trans_xcRB32()
1876 rc = _zcrypt_send_cprb(true, perms, &tr, &xcRB64); in trans_xcRB32()
1894 struct ap_perms *perms = in zcrypt_compat_ioctl() local
1897 rc = zcrypt_check_ioctl(perms, cmd); in zcrypt_compat_ioctl()
1902 return trans_modexpo32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()
1904 return trans_modexpo_crt32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()
1906 return trans_xcRB32(perms, filp, cmd, arg); in zcrypt_compat_ioctl()