diff options
| author | Paul Chaignon <paul.chaignon@gmail.com> | 2024-09-09 19:39:22 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-09-11 15:44:33 +0000 |
| commit | 709979145c8aad814397b9314d5bd44d9e2ccc1d (patch) | |
| tree | 7f4e6782cafc1a6ec5e009bf4cf21d72f4f63179 /sys/linux/bpf_prog.txt.const | |
| parent | fd6ac064b455d73026e1a082d723711015a6aa6b (diff) | |
sys/linux: improve precision of BPF attach targets
How the attach target field is interpreted depends on the program type
[1], which itself depends on the attach type [2] (defined in
attach_type_to_prog_type upstream). This commit encodes the same in
syzkaller to make the attach target field more precise.
Because attach_type_to_prog_type is a simple n to 1 mapping, we can
encode it as defines. We can then use those defines in conditional
fields for the different types of attach targets.
1 - https://elixir.bootlin.com/linux/v6.10.9/source/kernel/bpf/syscall.c#L4098
2 - https://elixir.bootlin.com/linux/v6.10.9/source/kernel/bpf/syscall.c#L3913
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'sys/linux/bpf_prog.txt.const')
0 files changed, 0 insertions, 0 deletions
