if (pid != (bpf_get_current_pid_tgid() >> 32)) return 0;
if (control) return 0;
/* it should allow skipping whole buffer size entries */
key = bpf_get_stackid(ctx, &stackmap, TEST_STACK_DEPTH); if ((int)key >= 0) { /* The size of stackmap and stack_amap should be the same */
bpf_map_update_elem(&stackid_hmap, &key, &val, 0);
stack_p = bpf_map_lookup_elem(&stack_amap, &key); if (stack_p) {
bpf_get_stack(ctx, stack_p, max_len, TEST_STACK_DEPTH); /* it wrongly skipped all the entries and filled zero */ if (stack_p[0] == 0)
failed = 1;
}
} else { /* old kernel doesn't support skipping that many entries */
failed = 2;
}
return 0;
}
char _license[] SEC("license") = "GPL";
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
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.