MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ktrcapfail

Function ktrcapfail

freebsd/kern/kern_ktrace.c:843–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

841}
842
843void
844ktrcapfail(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
871void
872ktrfault(vm_offset_t vaddr, int type)

Callers 8

sysarchFunction · 0.85
sysarchFunction · 0.85
sysarchFunction · 0.85
_cap_checkFunction · 0.85
namei_handle_rootFunction · 0.85
namei_setupFunction · 0.85
lookupFunction · 0.85

Calls 3

ktr_getrequestFunction · 0.85
ktr_enqueuerequestFunction · 0.85
ktrace_exitFunction · 0.85

Tested by

no test coverage detected