Lines Matching refs:xpd
65 struct extended_perms_decision xpd; member
196 if (xpd_node->xpd.driver == driver) in avc_xperms_decision_lookup()
197 return &xpd_node->xpd; in avc_xperms_decision_lookup()
203 avc_xperms_has_perm(struct extended_perms_decision *xpd, in avc_xperms_has_perm() argument
209 (xpd->used & XPERMS_ALLOWED)) in avc_xperms_has_perm()
210 rc = security_xperm_test(xpd->allowed->p, perm); in avc_xperms_has_perm()
212 (xpd->used & XPERMS_AUDITALLOW)) in avc_xperms_has_perm()
213 rc = security_xperm_test(xpd->auditallow->p, perm); in avc_xperms_has_perm()
215 (xpd->used & XPERMS_DONTAUDIT)) in avc_xperms_has_perm()
216 rc = security_xperm_test(xpd->dontaudit->p, perm); in avc_xperms_has_perm()
223 struct extended_perms_decision *xpd; in avc_xperms_allow_perm() local
225 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_xperms_allow_perm()
226 if (xpd && xpd->allowed) in avc_xperms_allow_perm()
227 security_xperm_set(xpd->allowed->p, perm); in avc_xperms_allow_perm()
232 struct extended_perms_decision *xpd; in avc_xperms_decision_free() local
234 xpd = &xpd_node->xpd; in avc_xperms_decision_free()
235 if (xpd->allowed) in avc_xperms_decision_free()
236 kmem_cache_free(avc_xperms_data_cachep, xpd->allowed); in avc_xperms_decision_free()
237 if (xpd->auditallow) in avc_xperms_decision_free()
238 kmem_cache_free(avc_xperms_data_cachep, xpd->auditallow); in avc_xperms_decision_free()
239 if (xpd->dontaudit) in avc_xperms_decision_free()
240 kmem_cache_free(avc_xperms_data_cachep, xpd->dontaudit); in avc_xperms_decision_free()
301 struct extended_perms_decision *xpd; in avc_xperms_decision_alloc() local
308 xpd = &xpd_node->xpd; in avc_xperms_decision_alloc()
310 xpd->allowed = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
312 if (!xpd->allowed) in avc_xperms_decision_alloc()
316 xpd->auditallow = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
318 if (!xpd->auditallow) in avc_xperms_decision_alloc()
322 xpd->dontaudit = kmem_cache_zalloc(avc_xperms_data_cachep, in avc_xperms_decision_alloc()
324 if (!xpd->dontaudit) in avc_xperms_decision_alloc()
342 avc_copy_xperms_decision(&dest_xpd->xpd, src); in avc_add_xperms_decision()
376 dest_xpd = avc_xperms_decision_alloc(src_xpd->xpd.used); in avc_xperms_populate()
379 avc_copy_xperms_decision(&dest_xpd->xpd, &src_xpd->xpd); in avc_xperms_populate()
392 struct extended_perms_decision *xpd, in avc_xperms_audit_required() argument
402 if (audited && xpd) { in avc_xperms_audit_required()
403 if (avc_xperms_has_perm(xpd, perm, XPERMS_DONTAUDIT)) in avc_xperms_audit_required()
410 if (audited && xpd) { in avc_xperms_audit_required()
411 if (!avc_xperms_has_perm(xpd, perm, XPERMS_AUDITALLOW)) in avc_xperms_audit_required()
423 struct extended_perms_decision *xpd, in avc_xperms_audit() argument
430 requested, avd, xpd, perm, result, &denied); in avc_xperms_audit()
847 struct extended_perms_decision *xpd, in avc_update_node() argument
938 avc_add_xperms_decision(node, xpd); in avc_update_node()
1056 struct extended_perms_decision *xpd = NULL; in avc_has_extended_perms() local
1085 xpd = avc_xperms_decision_lookup(driver, xp_node); in avc_has_extended_perms()
1086 if (unlikely(!xpd)) { in avc_has_extended_perms()
1103 avc_quick_copy_xperms_decision(xperm, &local_xpd, xpd); in avc_has_extended_perms()
1105 xpd = &local_xpd; in avc_has_extended_perms()
1107 if (!avc_xperms_has_perm(xpd, xperm, XPERMS_ALLOWED)) in avc_has_extended_perms()
1119 &avd, xpd, xperm, rc, ad); in avc_has_extended_perms()