diff options
| author | Paul Chaignon <paul.chaignon@gmail.com> | 2023-11-27 16:31:21 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-11-27 17:13:18 +0000 |
| commit | e60264f30163b15b659d0c84a6a4c8e7edb7a0a3 (patch) | |
| tree | 967c9c5bfcaf92cbac8447c1d8586e4425392f08 /sys/linux/bpf.txt | |
| parent | 2fae018f887235bab9f683c782e2e9a93c8d3766 (diff) | |
sys/linux: add all format specifiers for bpf_trace_printk
The bpf_trace_printk helper supports a limited set of format specifiers
[1]. This commit ensures they are all covered in the union.
1 - https://man7.org/linux/man-pages/man7/bpf-helpers.7.html
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'sys/linux/bpf.txt')
| -rw-r--r-- | sys/linux/bpf.txt | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/linux/bpf.txt b/sys/linux/bpf.txt index a972af32d..9a6c4f498 100644 --- a/sys/linux/bpf.txt +++ b/sys/linux/bpf.txt @@ -700,11 +700,23 @@ type bpf_insn_null_check[REG] { exit bpf_insn_exit } +# Format specifiers for bpf_trace_printk, encoded as a zero-terminated string +# of 7 characters. For example, field 'p' corresponds to "%p ". type bpf_insn_mov_printk_str_hex[DST] [ -# "%p " - integer bpf_insn_mov_imm64[DST, 0x25702020, 0x20202000] -# "%d " - pointer bpf_insn_mov_imm64[DST, 0x25642020, 0x20202000] + p bpf_insn_mov_imm64[DST, 0x25702020, 0x20202000] + d bpf_insn_mov_imm64[DST, 0x25642020, 0x20202000] + i bpf_insn_mov_imm64[DST, 0x25692020, 0x20202000] + u bpf_insn_mov_imm64[DST, 0x25752020, 0x20202000] + x bpf_insn_mov_imm64[DST, 0x25782020, 0x20202000] + ld bpf_insn_mov_imm64[DST, 0x256c6420, 0x20202000] + li bpf_insn_mov_imm64[DST, 0x256c6920, 0x20202000] + lu bpf_insn_mov_imm64[DST, 0x256c7520, 0x20202000] + lx bpf_insn_mov_imm64[DST, 0x256c7820, 0x20202000] + lld bpf_insn_mov_imm64[DST, 0x256c6c64, 0x20202000] + lli bpf_insn_mov_imm64[DST, 0x256c6c69, 0x20202000] + llu bpf_insn_mov_imm64[DST, 0x256c6c75, 0x20202000] + llx bpf_insn_mov_imm64[DST, 0x256c6c78, 0x20202000] + s bpf_insn_mov_imm64[DST, 0x25732020, 0x20202000] ] # (18) r1 = "%d " |
