if (bpf_get_current_pid_tgid() >> 32 != pid) return 1;
addr = bpf_get_func_ip(ctx);
for (i = 0; i < ARRAY_SIZE(kfuncs); i++) { if (kfuncs[i] == (void *) addr) {
kprobe_session_result[i]++; break;
}
}
/* * Force probes for function bpf_fentry_test[5-8] not to * install and execute the return probe
*/ if (((constvoid *) addr == &bpf_fentry_test5) ||
((constvoid *) addr == &bpf_fentry_test6) ||
((constvoid *) addr == &bpf_fentry_test7) ||
((constvoid *) addr == &bpf_fentry_test8)) return 1;
return 0;
}
/* * No tests in here, just to trigger 'bpf_fentry_test*' * through tracing test_run
*/
SEC("fentry/bpf_modify_return_test") int BPF_PROG(trigger)
{ return 0;
}
SEC("kprobe.session/bpf_fentry_test*") int test_kprobe(struct pt_regs *ctx)
{ return session_check(ctx);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.