iovisor / iovisor/bcc

BCC fails to attach uprobes by virtual address for PIE binaries.

Open
#4,416 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

For PIE binaries, BCC fails to attach uprobes by virtual address. To demonstrate the issue, we provide the following self contained repo:
https://github.com/etep/pie-bcc-issue

Note that uprobe attach by binary address, i.e. the address as found in the ELF file by `nm` e.g. works fine.

We would like feedback on the following:
1. should uprobe attach support virtual address for PIE binaries?
2. if yes, should there be a separate interface, e.g.:
`attach_uprobe_by_virtual_address` and `attach_uprobe_by_binary_address`?

We would be open to authoring a PR to resolve the issue, pursuant to decisions on the previous two questions. Also, would work with the BCC authors to ensure the PR is consistent with BCC coding practices and best practices.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the self-contained reproduction repository at https://github.com/etep/pie-bcc-issue and compare uprobe attachment by virtual address with attachment by the ELF binary address found using nm. Resolve whether PIE virtual-address attachment should be supported and whether separate attach_uprobe_by_virtual_address and attach_uprobe_by_binary_address interfaces are needed; completion depends on that design decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.