public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cupertino.miranda at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113225] New: bpf: attributekernel_helper function declarations create a BTF_FUNC_EXTERN. Date: Wed, 03 Jan 2024 20:54:41 +0000 [thread overview] Message-ID: <bug-113225-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113225 Bug ID: 113225 Summary: bpf: attributekernel_helper function declarations create a BTF_FUNC_EXTERN. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: cupertino.miranda at oracle dot com Target Milestone: --- When using attribute kernel_helper such as the one in the example: extern int foo (int arg) __attribute__((kernel_helper (666))); int bar () { return foo (20); } The following BTF entries are created: [1] int 'int'(1U#B) size=4U#B offset=0UB#b bits=32UB#b SIGNED [2] func_proto <anonymous> type=1 param '' type=1 [3] func_proto <anonymous> type=1 [4] func 'foo'(5U#B) type=2 linkage=0 (extern) [5] func 'bar'(9U#B) type=3 linkage=1 (global) BTF information is generated for the extern function declaration, imposing some problem to tools such as bpftool that relies on BTF information to validate completeness of the BTF information. Since kernel helpers are not true functions the BTF information created, although accurate with how the function is declared, it is not accurate with its semantics. Plan resolution is to skip btf output to any attributed kernel_helper function declaration, since the BTF information in this case is not really required.
next reply other threads:[~2024-01-03 20:54 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-03 20:54 cupertino.miranda at oracle dot com [this message] 2024-01-08 18:36 ` [Bug target/113225] bpf: attribute((kernel_helper)) adds inconsistent BTF extern function decl entry cvs-commit at gcc dot gnu.org 2024-01-09 16:46 ` jemarch at gcc dot gnu.org
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=bug-113225-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).