From: Yonghong Song <yhs@meta.com>
To: Pu Lehui <pulehui@huaweicloud.com>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Pu Lehui <pulehui@huawei.com>
Subject: Re: [PATCH bpf] selftests/bpf: Fix casting error when cross-compiling test_verifier for 32-bit platforms
Date: Tue, 8 Nov 2022 06:45:56 -0800 [thread overview]
Message-ID: <57eb6611-3e4e-2a4c-69b1-c6f0c1eafe92@meta.com> (raw)
In-Reply-To: <20221108121945.4104644-1-pulehui@huaweicloud.com>
On 11/8/22 4:19 AM, Pu Lehui wrote:
> From: Pu Lehui <pulehui@huawei.com>
>
> When cross-compiling test_verifier for 32-bit platforms, the casting error is shown below:
>
> test_verifier.c:1263:27: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> 1263 | info.xlated_prog_insns = (__u64)*buf;
> | ^
> cc1: all warnings being treated as errors
>
> Fix it by adding zero-extension for it.
>
> Fixes: 933ff53191eb ("selftests/bpf: specify expected instructions in test_verifier tests")
> Signed-off-by: Pu Lehui <pulehui@huawei.com>
Acked-by: Yonghong Song <yhs@fb.com>
next prev parent reply other threads:[~2022-11-08 14:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 12:19 [PATCH bpf] selftests/bpf: Fix casting error when cross-compiling test_verifier for 32-bit platforms Pu Lehui
2022-11-08 12:29 ` Eduard Zingerman
2022-11-08 14:45 ` Yonghong Song [this message]
2022-11-09 20:40 ` 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=57eb6611-3e4e-2a4c-69b1-c6f0c1eafe92@meta.com \
--to=yhs@meta.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=pulehui@huawei.com \
--cc=pulehui@huaweicloud.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=yhs@fb.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