Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid overflowing btf stringtable during btf line adjustment (iovisor…
…#2270) For remapped files (the main bpf program file and helpers.h), the llvm compiler does not have the source so bcc did the adjustment/patching after the compilation for lines in .btf.ext line_info. If a particular line in the main file or helpers.h is referenced in the line_info table, the line itself will be added to string table. If too many lines are added into the string table, the string table may become too big (>= 64KB), and libbpf/kernel will reject it. In my instance with a Facebook internal bpf program, after all referenced lines are added, the string table is 67KB. This patch added checking during string table adjustment to avoid overflow against the kernel limit. Signed-off-by: Yonghong Song <[email protected]>
- Loading branch information