From: "Daniel Müller" <deso@posteo.net>
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 1/2] bpftool: Add support for KIND_RESTRICT to gen min_core_btf command
Date: Wed, 6 Jul 2022 21:28:54 +0000 [thread overview]
Message-ID: <20220706212855.1700615-2-deso@posteo.net> (raw)
In-Reply-To: <20220706212855.1700615-1-deso@posteo.net>
This change adjusts bpftool's type marking logic, as used in conjunction
with TYPE_EXISTS relocations, to correctly recognize and handle the
RESTRICT BTF kind.
[0]: https://lore.kernel.org/bpf/20220623212205.2805002-1-deso@posteo.net/T/#m4c75205145701762a4b398e0cdb911d5b5305ffc
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Müller <deso@posteo.net>
---
tools/bpf/bpftool/gen.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 3d35fbc..1cf53b 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -1762,6 +1762,7 @@ btfgen_mark_type(struct btfgen_info *info, unsigned int type_id, bool follow_poi
}
break;
case BTF_KIND_CONST:
+ case BTF_KIND_RESTRICT:
case BTF_KIND_VOLATILE:
case BTF_KIND_TYPEDEF:
err = btfgen_mark_type(info, btf_type->type, follow_pointers);
--
2.30.2
next prev parent reply other threads:[~2022-07-06 21:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 21:28 [PATCH bpf-next 0/2] Add KIND_RESTRICT support to bpftool Daniel Müller
2022-07-06 21:28 ` Daniel Müller [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220706212855.1700615-2-deso@posteo.net \
--to=deso@posteo.net \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=quentin@isovalent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox