| 841 | } |
| 842 | |
| 843 | void |
| 844 | ktrcapfail(enum ktr_cap_fail_type type, const cap_rights_t *needed, |
| 845 | const cap_rights_t *held) |
| 846 | { |
| 847 | struct thread *td = curthread; |
| 848 | struct ktr_request *req; |
| 849 | struct ktr_cap_fail *kcf; |
| 850 | |
| 851 | if (__predict_false(curthread->td_pflags & TDP_INKTRACE)) |
| 852 | return; |
| 853 | |
| 854 | req = ktr_getrequest(KTR_CAPFAIL); |
| 855 | if (req == NULL) |
| 856 | return; |
| 857 | kcf = &req->ktr_data.ktr_cap_fail; |
| 858 | kcf->cap_type = type; |
| 859 | if (needed != NULL) |
| 860 | kcf->cap_needed = *needed; |
| 861 | else |
| 862 | cap_rights_init(&kcf->cap_needed); |
| 863 | if (held != NULL) |
| 864 | kcf->cap_held = *held; |
| 865 | else |
| 866 | cap_rights_init(&kcf->cap_held); |
| 867 | ktr_enqueuerequest(td, req); |
| 868 | ktrace_exit(td); |
| 869 | } |
| 870 | |
| 871 | void |
| 872 | ktrfault(vm_offset_t vaddr, int type) |
no test coverage detected