SEC("syscall") int iter_dmabuf_for_each(constvoid *ctx)
{ struct dma_buf *d;
bpf_for_each(dmabuf, d) { char name[DMA_BUF_NAME_LEN]; constchar *pname; bool *found; long len; int i;
if (bpf_core_read(&pname, sizeof(pname), &d->name)) return 1;
/* Buffers are not required to be named */ if (!pname) continue;
len = bpf_probe_read_kernel_str(name, sizeof(name), pname); if (len < 0) return 1;
/* * The entire name buffer is used as a map key. * Zeroize any uninitialized trailing bytes after the NUL.
*/
bpf_for(i, len, DMA_BUF_NAME_LEN)
name[i] = 0;
found = bpf_map_lookup_elem(&testbuf_hash, name); if (found) { bool t = true;
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.