diff options
| author | Pu Lehui <[email protected]> | 2024-06-22 03:04:35 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2024-07-01 15:10:46 +0000 |
| commit | d1a426171d76b2cdf3dea5d52f6266090e4aa254 (patch) | |
| tree | a96c498ba0067e8966e1c9cc8ebb9cae0df7c829 /tools/testing/selftests/bpf/prog_tests/tracing_struct.c | |
| parent | libbpf: Fix error handling in btf__distill_base() (diff) | |
| download | kernel-d1a426171d76b2cdf3dea5d52f6266090e4aa254.tar.gz kernel-d1a426171d76b2cdf3dea5d52f6266090e4aa254.zip | |
bpf: Use precise image size for struct_ops trampoline
For trampoline using bpf_prog_pack, we need to generate a rw_image
buffer with size of (image_end - image). For regular trampoline, we use
the precise image size generated by arch_bpf_trampoline_size to allocate
rw_image. But for struct_ops trampoline, we allocate rw_image directly
using close to PAGE_SIZE size. We do not need to allocate for that much,
as the patch size is usually much smaller than PAGE_SIZE. Let's use
precise image size for it too.
Signed-off-by: Pu Lehui <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Tested-by: Björn Töpel <[email protected]> #riscv
Acked-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tracing_struct.c')
0 files changed, 0 insertions, 0 deletions
