Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: Avoid virtual memory area [uprobes] warning
Refer to kernel commit 704bde3cc26a ("uprobes: Use vm_special_mapping to name the XOL vma"), processes setup the [uprobes] special virtual memory area with uprobe events to excute original instruction out of line. open_elf() would throw a warning of 'Could not open [uprobes]' when attaching uprobes. For example, use memleak to trace userspace apps allocations with command 'memleak -c <command>' or 'memleak -p <pid>': ~ # ps | grep dropbear 76 root 2100 S dropbear 79 root 2340 S grep dropbear ~ # memleak -p 76 using default object: libc.so.6 using page size: 4096 tracing kernel: false Tracing outstanding memory allocs... Hit Ctrl-C to end [0:18:54] Top 3 stacks with outstanding allocations: 147 bytes in 1 allocations from stack Could not open [uprobes] 0 [<000000000001b3bc>] free+0x7b2c [/bin/dropbear] 64 bytes in 1 allocations from stack 0 [<00000000000288c8>] free+0x15038 [/bin/dropbear] So remove '[uprobes]' from get_elf_type() to avoid this warning. Signed-off-by: mickey_zhu <[email protected]>
- Loading branch information