[PATCH bpf-next 0/2] Add KIND_RESTRICT support to bpftool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx/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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux