From: patchwork-bot+netdevbpf@kernel.org
To: Martin KaFai Lau <martin.lau@linux.dev>
Cc: bpf@vger.kernel.org, ast@kernel.org, andrii@kernel.org,
daniel@iogearbox.net, kernel-team@meta.com
Subject: Re: [PATCH v2 bpf-next] libbpf: btf_dump_type_data_check_overflow needs to consider BTF_MEMBER_BITFIELD_SIZE
Date: Mon, 01 May 2023 13:50:20 +0000 [thread overview]
Message-ID: <168294902013.3340.3030217679252571442.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20230428013638.1581263-1-martin.lau@linux.dev>
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Thu, 27 Apr 2023 18:36:38 -0700 you wrote:
> From: Martin KaFai Lau <martin.lau@kernel.org>
>
> The btf_dump/struct_data selftest is failing with:
> test_btf_dump_struct_data:FAIL:unexpected return value dumping fs_context unexpected unexpected return value dumping fs_context: actual -7 != expected 264
>
> The reason is in btf_dump_type_data_check_overflow(). It does not use
> BTF_MEMBER_BITFIELD_SIZE from the struct's member (btf_member). Instead,
> it is using the enum size which is 4. It had been working till the recent
> commit 4e04143c869c ("fs_context: drop the unused lsm_flags member")
> removed an integer member which also removed the 4 bytes padding at the end
> of the fs_context. Missing this 4 bytes padding exposed this bug.
> In particular, when btf_dump_type_data_check_overflow() reaches
> the member 'phase', -E2BIG is returned.
>
> [...]
Here is the summary with links:
- [v2,bpf-next] libbpf: btf_dump_type_data_check_overflow needs to consider BTF_MEMBER_BITFIELD_SIZE
https://git.kernel.org/bpf/bpf-next/c/c39028b333f3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2023-05-01 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 1:36 [PATCH v2 bpf-next] libbpf: btf_dump_type_data_check_overflow needs to consider BTF_MEMBER_BITFIELD_SIZE Martin KaFai Lau
2023-04-28 2:26 ` Yonghong Song
2023-04-28 2:58 ` Martin KaFai Lau
2023-05-01 13:50 ` patchwork-bot+netdevbpf [this message]
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=168294902013.3340.3030217679252571442.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@linux.dev \
/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