Currently the trampoline_count test doesn't include any fmod_ret bpf programs, fix it to make the test cover all possible trampoline program types. Since fmod_ret bpf programs can't be attached to __set_task_comm function, as it's neither whitelisted for error injection nor a security hook, change it to bpf_modify_return_test. This patch also does some other cleanups such as removing duplicate code, dropping inconsistent comments, etc.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -724,7 +724,7 @@ struct btf_func_model { · 723 unmodified lines | ||
| 724 | 724 | #define BPF_TRAMP_F_RET_FENTRY_RET BIT(4) |
| 725 | 725 | |
| 726 | 726 | /* Each call __bpf_prog_enter + call bpf_func + call __bpf_prog_exit is ~50 |
| 727 | − * bytes on x86. Pick a number to fit into BPF_IMAGE_SIZE / 2 | |
| 727 | + * bytes on x86. | |
| 728 | 728 | */ |
| 729 | 729 | #define BPF_MAX_TRAMP_LINKS 38 |
| 730 | 730 | |