github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/test/bpf_helpers (about) 1 # bpf_trace_printk 2 3 r1 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [@printk={@d=AUTO, AUTO, AUTO, AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x1234}, AUTO}], AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0) 4 5 # bpf_snprintf 6 7 r1 = bpf$MAP_CREATE_CONST_STR(AUTO, &AUTO={AUTO, AUTO, AUTO, AUTO, AUTO, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, AUTO}, 0x48) 8 r2 = bpf$MAP_UPDATE_CONST_STR(AUTO, &AUTO={{r1, r1}, &AUTO=0x0, &AUTO='%-010d \x00', AUTO}, 0x1c) 9 r3 = bpf$BPF_MAP_CONST_STR_FREEZE(AUTO, &AUTO={r1, r1}, 0x4) 10 11 r4 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [@snprintf={AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x1234}, AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, r1, AUTO, AUTO, AUTO, AUTO}, AUTO, AUTO}], AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0) 12 13 # bpf_tail_call 14 15 r10 = bpf$MAP_CREATE_TAIL_CALL(AUTO, &AUTO={AUTO, AUTO, AUTO, AUTO, AUTO, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, AUTO}, 0x48) 16 r11 = bpf$MAP_UPDATE_ELEM_TAIL_CALL(AUTO, &AUTO={{r10, r10}, &AUTO=0x0, &AUTO=r4, AUTO}, 0x1c) 17 18 r4 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [@tail_call={{AUTO, AUTO, AUTO, AUTO, r10, AUTO, AUTO, AUTO, AUTO}, AUTO, AUTO, AUTO}], AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0) 19 20 # bpf_ringbuf_reserve and bpf_ringbuf_submit 21 22 r1 = bpf$MAP_CREATE_RINGBUF(AUTO, &AUTO={AUTO, AUTO, AUTO, 0x40000, AUTO, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, AUTO}, 0x48) 23 24 r2 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@ringbuf={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, {{AUTO, AUTO, AUTO, AUTO, r1, AUTO, AUTO, AUTO, AUTO}, AUTO, AUTO, AUTO, AUTO}, AUTO, [], {AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x1}, {AUTO, AUTO, AUTO, 0x84}, AUTO}, AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0) 25 26 # bpf_ringbuf_query 27 28 r3 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [@ringbuf_query={{AUTO, AUTO, AUTO, AUTO, r1, AUTO, AUTO, AUTO, AUTO}, AUTO, AUTO}], AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0) 29 30 # bpf_ringbuf_output 31 32 r3 = bpf$PROG_LOAD(AUTO, &AUTO={0x3, AUTO, &AUTO=@framed={{AUTO, AUTO, AUTO, AUTO, 0x0, AUTO, AUTO, AUTO, 0x0}, [@ringbuf_output={{AUTO, AUTO, AUTO, AUTO, r1, AUTO, AUTO, AUTO, AUTO}, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x1234}, AUTO, AUTO, AUTO, AUTO, {AUTO, AUTO, AUTO, AUTO, AUTO, AUTO, 0x2}, AUTO}], AUTO}, &AUTO='GPL\x00', 0x0, 0x0, 0x0, 0x0, 0x0, "00000000000000000000000000000000", 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0xa0)