BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Fix handling of CO-RE relos for __weak subprogs
@ 2022-04-08 18:14 Andrii Nakryiko
  2022-04-08 18:14 ` [PATCH bpf-next 1/3] libbpf: don't error out on CO-RE relos for overriden weak subprogs Andrii Nakryiko
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Andrii Nakryiko @ 2022-04-08 18:14 UTC (permalink / raw)
  To: bpf, ast, daniel; +Cc: andrii, kernel-team

Fix the issue accidentally discovered during libbpf USDT support testing.
Libbpf overzealously complained about CO-RE relocations belonging to the code
of a __weak subprog that got overriden by another instance of that function.

Fix the issue fixed, return back to __weak __hidden annotation for USDT
BPF-side APIs.

And add CO-RE relos to linked_funcs selftest to ensure such combo keeps
working going forward.

Andrii Nakryiko (3):
  libbpf: don't error out on CO-RE relos for overriden weak subprogs
  libbpf: use weak hidden modifier for USDT BPF-side API functions
  selftests/bpf: add CO-RE relos into linked_funcs selftests

 tools/lib/bpf/libbpf.c                            | 15 +++++++++++----
 tools/lib/bpf/usdt.bpf.h                          |  6 +++---
 tools/testing/selftests/bpf/progs/linked_funcs1.c |  8 ++++++++
 tools/testing/selftests/bpf/progs/linked_funcs2.c |  8 ++++++++
 4 files changed, 30 insertions(+), 7 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-08 21:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-08 18:14 [PATCH bpf-next 0/3] Fix handling of CO-RE relos for __weak subprogs Andrii Nakryiko
2022-04-08 18:14 ` [PATCH bpf-next 1/3] libbpf: don't error out on CO-RE relos for overriden weak subprogs Andrii Nakryiko
2022-04-08 18:14 ` [PATCH bpf-next 2/3] libbpf: use weak hidden modifier for USDT BPF-side API functions Andrii Nakryiko
2022-04-08 18:14 ` [PATCH bpf-next 3/3] selftests/bpf: add CO-RE relos into linked_funcs selftests Andrii Nakryiko
2022-04-08 18:40 ` [PATCH bpf-next 0/3] Fix handling of CO-RE relos for __weak subprogs Andrii Nakryiko
2022-04-08 21:09 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox