Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbpf: don't crash on object files with no symbol tables #651

Closed
wants to merge 2 commits into from

Conversation

tsipa
Copy link
Owner

@tsipa tsipa commented Aug 31, 2021

Pull request for series with
subject: libbpf: don't crash on object files with no symbol tables
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=539951

@tsipa
Copy link
Owner Author

tsipa commented Aug 31, 2021

Master branch: 57f780f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=539951
version: 1

@tsipa
Copy link
Owner Author

tsipa commented Aug 31, 2021

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=539951 expired. Closing PR.

@tsipa tsipa closed this Aug 31, 2021
@tsipa tsipa reopened this Sep 1, 2021
@tsipa
Copy link
Owner Author

tsipa commented Sep 1, 2021

Master branch: 9e9fb76
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=540531
version: 2

Nobody and others added 2 commits September 2, 2021 06:00
If libbpf encounters an ELF file that has been stripped of its symbol
table, it will crash in bpf_object__add_programs() when trying to
dereference the obj->efile.symbols pointer.

Fix this by erroring out of bpf_object__elf_collect() if it is not able
able to find the symbol table.

v2:
  - Move check into bpf_object__elf_collect() and add nice error message

Fixes: 6245947 ("libbpf: Allow gaps in BPF program sections to support overriden weak functions")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
@tsipa
Copy link
Owner Author

tsipa commented Sep 2, 2021

Master branch: 49ca615
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=540531
version: 2

@tsipa
Copy link
Owner Author

tsipa commented Sep 2, 2021

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=540531 irrelevant now. Closing PR.

@tsipa tsipa added under-review and removed new labels Sep 2, 2021
@tsipa tsipa closed this Sep 2, 2021
@tsipa tsipa deleted the series/539951=>bpf branch September 2, 2021 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants