From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
bpf@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/1] libbpf: Use (uintptr_t) for a u64 cast to a void pointer to fix build on 32-bit arches
Date: Thu, 21 Mar 2024 13:06:39 -0300 [thread overview]
Message-ID: <ZfxbD5AuBvKOMal5@x1> (raw)
In-Reply-To: <CAEf4BzY2iVCDPajdzNvJPfFHCjHiMb2eq7rk-rfKejhkD9v48A@mail.gmail.com>
On Thu, Mar 21, 2024 at 08:59:57AM -0700, Andrii Nakryiko wrote:
> On Thu, Mar 21, 2024 at 8:16 AM Arnaldo Carvalho de Melo
> > dm.log/ubuntu:18.04-x-sh4:libbpf.c:5355:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> > dm.log/ubuntu:18.04-x-sh4- map->mmaped = mmap((void *)map->map_extra, bpf_map_mmap_sz(map),
> > dm.log/ubuntu:18.04-x-sh4- ^
> > perfbuilder@number:~$
> > I think Namhyung mentioned as well on a chat conversation about noticing
> > this on a 32-bit build on Debian.
> > Fixes: 79ff13e99169ddb0 ("libbpf: Add support for bpf_arena.")
> > Reported-by: Namhyung Kim <namhyung@kernel.org>
> We've already landed a similar fix in the bpf tree, see [0].
>
> [0] https://patchwork.kernel.org/project/netdevbpf/patch/20240319215143.1279312-1-andrii@kernel.org/
Great, uintptr_t looks cleaner tho, but fits the bill.
- Arnaldo
prev parent reply other threads:[~2024-03-21 16:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 15:16 [PATCH 1/1] libbpf: Use (uintptr_t) for a u64 cast to a void pointer to fix build on 32-bit arches Arnaldo Carvalho de Melo
2024-03-21 15:59 ` Andrii Nakryiko
2024-03-21 16:06 ` Arnaldo Carvalho de Melo [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=ZfxbD5AuBvKOMal5@x1 \
--to=acme@kernel.org \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=irogers@google.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.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: 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;
as well as URLs for NNTP newsgroup(s).