From patchwork Wed Jul 6 21:28:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_M=C3=BCller?= X-Patchwork-Id: 12908681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9C24C433EF for ; Wed, 6 Jul 2022 21:29:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233127AbiGFV3E (ORCPT ); Wed, 6 Jul 2022 17:29:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231384AbiGFV3E (ORCPT ); Wed, 6 Jul 2022 17:29:04 -0400 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08D501EADA for ; Wed, 6 Jul 2022 14:28:59 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AB454240029 for ; Wed, 6 Jul 2022 23:28:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1657142937; bh=SeBg86NAwSY3FrGJNKC0samC58A1WFwR4OjhiPQWBFs=; h=From:To:Subject:Date:From; b=JZrBWZ2JA8cKZZAc0+Z/koygz9RRZfCVKJ2EiZIKBa3N/zJY1Aypvj/crlZdhGAbf F6L/f8qX5PqqzAAJ7qkshz/h2iRmjyoeoIvrZUAoJCbzCUUKWqruvvJuuO0xoP4TT6 3G3OIyeDYuCCD5o3HcXIG6DV/SumA1Nxu6aijNU3aITHN6crI/aK8I+zAZgL0K/gQG g3MSWkSoHD4mCg0eKbGdbO8vpem4rDFVGNWnSXVqrO2/s90lJ5y/8TmBxebgL50rj6 jAZf+G8nNkVbmblPozk1DTWjfDrsEOu0w4ftz9B5kM5LzAkGCaZNb9dbi7UHk7EYDb fmteOIcyjrQgg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LdXjN6922z6tmQ; Wed, 6 Jul 2022 23:28:56 +0200 (CEST) From: =?utf-8?q?Daniel_M=C3=BCller?= To: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net, quentin@isovalent.com, kernel-team@fb.com Subject: [PATCH bpf-next 0/2] Add KIND_RESTRICT support to bpftool Date: Wed, 6 Jul 2022 21:28:53 +0000 Message-Id: <20220706212855.1700615-1-deso@posteo.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org X-Patchwork-Delegate: bpf@iogearbox.net 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(-) Acked-by: Quentin Monnet