All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Add KIND_RESTRICT support to bpftool
@ 2022-07-06 21:28 Daniel Müller
  2022-07-06 21:28 ` [PATCH bpf-next 1/2] bpftool: Add support for KIND_RESTRICT to gen min_core_btf command Daniel Müller
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Daniel Müller @ 2022-07-06 21:28 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel, quentin, kernel-team

As pointed out in an earlier discussion [0] not all paths in bpftool's
minimization logic handle the restrict type qualifier properly. Specifically,
the gen min_core_btf command fails when encountering the corresponding BTF kind
for a TYPE_EXISTS relocation (TYPE_MATCHES support was added earlier):
  > Error: unsupported kind: restrict (26)

This patch set fixes this short coming.

[0]: https://lore.kernel.org/bpf/20220623212205.2805002-1-deso@posteo.net/T/#m4c75205145701762a4b398e0cdb911d5b5305ffc

Daniel Müller (2):
  bpftool: Add support for KIND_RESTRICT to gen min_core_btf command
  selftests/bpf: Add test involving restrict type qualifier

 tools/bpf/bpftool/gen.c                                   | 1 +
 tools/testing/selftests/bpf/prog_tests/core_reloc.c       | 2 ++
 tools/testing/selftests/bpf/progs/core_reloc_types.h      | 8 ++++++--
 .../selftests/bpf/progs/test_core_reloc_type_based.c      | 5 +++++
 4 files changed, 14 insertions(+), 2 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2022-07-08 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 21:28 [PATCH bpf-next 0/2] Add KIND_RESTRICT support to bpftool Daniel Müller
2022-07-06 21:28 ` [PATCH bpf-next 1/2] bpftool: Add support for KIND_RESTRICT to gen min_core_btf command Daniel Müller
2022-07-06 21:28 ` [PATCH bpf-next 2/2] selftests/bpf: Add test involving restrict type qualifier Daniel Müller
2022-07-07  9:14 ` [PATCH bpf-next 0/2] Add KIND_RESTRICT support to bpftool Quentin Monnet
2022-07-08 12:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.