Lines Matching refs:perms
122 struct ap_perms perms;
167 for (i = 0; i < sizeof(zcdndev->perms.ioctlm) / sizeof(long); i++)
168 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.ioctlm[i]);
183 rc = ap_parse_mask_str(buf, zcdndev->perms.ioctlm,
204 for (i = 0; i < sizeof(zcdndev->perms.apm) / sizeof(long); i++)
205 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.apm[i]);
220 rc = ap_parse_mask_str(buf, zcdndev->perms.apm,
241 for (i = 0; i < sizeof(zcdndev->perms.aqm) / sizeof(long); i++)
242 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.aqm[i]);
257 rc = ap_parse_mask_str(buf, zcdndev->perms.aqm,
278 for (i = 0; i < sizeof(zcdndev->perms.adm) / sizeof(long); i++)
279 n += sysfs_emit_at(buf, n, "%016lx", zcdndev->perms.adm[i]);
294 rc = ap_parse_mask_str(buf, zcdndev->perms.adm,
504 struct ap_perms *perms = &ap_perms;
515 perms = &zcdndev->perms;
517 filp->private_data = (void *)perms;
547 static inline int zcrypt_check_ioctl(struct ap_perms *perms,
554 if (test_bit_inv(ioctlnr, perms->ioctlm))
565 static inline bool zcrypt_check_card(struct ap_perms *perms, int card)
567 return test_bit_inv(card, perms->apm) ? true : false;
570 static inline bool zcrypt_check_queue(struct ap_perms *perms, int queue)
572 return test_bit_inv(queue, perms->aqm) ? true : false;
637 static long zcrypt_rsa_modexpo(struct ap_perms *perms,
683 if (!zcrypt_check_card(perms, zc->card->id))
699 if (!zcrypt_check_queue(perms,
742 static long zcrypt_rsa_crt(struct ap_perms *perms,
788 if (!zcrypt_check_card(perms, zc->card->id))
804 if (!zcrypt_check_queue(perms,
847 static long _zcrypt_send_cprb(bool userspace, struct ap_perms *perms,
870 if (perms != &ap_perms && tdom < AP_DOMAINS) {
872 if (!test_bit_inv(tdom, perms->adm)) {
906 if (!zcrypt_check_card(perms, zc->card->id))
924 if (!zcrypt_check_queue(perms,
1004 static long _zcrypt_send_ep11_cprb(bool userspace, struct ap_perms *perms,
1049 if (perms != &ap_perms && domain < AUTOSEL_DOM) {
1051 if (!test_bit_inv(domain, perms->adm)) {
1077 if (!zcrypt_check_card(perms, zc->card->id))
1096 if (!zcrypt_check_queue(perms,
1421 static int icarsamodexpo_ioctl(struct ap_perms *perms, unsigned long arg)
1433 rc = zcrypt_rsa_modexpo(perms, &tr, &mex);
1440 rc = zcrypt_rsa_modexpo(perms, &tr, &mex);
1453 static int icarsacrt_ioctl(struct ap_perms *perms, unsigned long arg)
1465 rc = zcrypt_rsa_crt(perms, &tr, &crt);
1472 rc = zcrypt_rsa_crt(perms, &tr, &crt);
1485 static int zsecsendcprb_ioctl(struct ap_perms *perms, unsigned long arg)
1497 rc = _zcrypt_send_cprb(true, perms, &tr, &xcrb);
1504 rc = _zcrypt_send_cprb(true, perms, &tr, &xcrb);
1518 static int zsendep11cprb_ioctl(struct ap_perms *perms, unsigned long arg)
1530 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb);
1537 rc = _zcrypt_send_ep11_cprb(true, perms, &tr, &xcrb);
1554 struct ap_perms *perms =
1557 rc = zcrypt_check_ioctl(perms, cmd);
1563 return icarsamodexpo_ioctl(perms, arg);
1565 return icarsacrt_ioctl(perms, arg);
1567 return zsecsendcprb_ioctl(perms, arg);
1569 return zsendep11cprb_ioctl(perms, arg);
1691 static long trans_modexpo32(struct ap_perms *perms, struct file *filp,
1710 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64);
1717 rc = zcrypt_rsa_modexpo(perms, &tr, &mex64);
1741 static long trans_modexpo_crt32(struct ap_perms *perms, struct file *filp,
1763 rc = zcrypt_rsa_crt(perms, &tr, &crt64);
1770 rc = zcrypt_rsa_crt(perms, &tr, &crt64);
1802 static long trans_xcrb32(struct ap_perms *perms, struct file *filp,
1835 rc = _zcrypt_send_cprb(true, perms, &tr, &xcrb64);
1842 rc = _zcrypt_send_cprb(true, perms, &tr, &xcrb64);
1860 struct ap_perms *perms =
1863 rc = zcrypt_check_ioctl(perms, cmd);
1868 return trans_modexpo32(perms, filp, cmd, arg);
1870 return trans_modexpo_crt32(perms, filp, cmd, arg);
1872 return trans_xcrb32(perms, filp, cmd, arg);