lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH+k93ExQpYy+g+WUNvv+bDDzDcJR-2WYongJqv4WbMcPV=sRA@mail.gmail.com>
Date:   Fri, 12 Jul 2019 13:56:03 +0100
From:   Matt Hart <matthew.hart@...aro.org>
To:     Yonghong Song <yhs@...com>
Cc:     Andrii Nakryiko <andriin@...com>,
        "andrii.nakryiko@...il.com" <andrii.nakryiko@...il.com>,
        Alexei Starovoitov <ast@...com>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>
Subject: Re: [PATCH bpf-next] libbpf: fix ptr to u64 conversion warning on
 32-bit platforms

On Tue, 9 Jul 2019 at 05:30, Yonghong Song <yhs@...com> wrote:
>
>
>
> On 7/8/19 9:00 PM, Andrii Nakryiko wrote:
> > On 32-bit platforms compiler complains about conversion:
> >
> > libbpf.c: In function ‘perf_event_open_probe’:
> > libbpf.c:4112:17: error: cast from pointer to integer of different
> > size [-Werror=pointer-to-int-cast]
> >    attr.config1 = (uint64_t)(void *)name; /* kprobe_func or uprobe_path */
> >                   ^
> >
> > Reported-by: Matt Hart <matthew.hart@...aro.org>
> > Fixes: b26500274767 ("libbpf: add kprobe/uprobe attach API")
> > Tested-by: Matt Hart <matthew.hart@...aro.org>
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
>
> Acked-by: Yonghong Song <yhs@...com>
>

How do we get this merged? I see the build failure has now propagated
up to mainline :(

> > ---
> >   tools/lib/bpf/libbpf.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> > index ed07789b3e62..794dd5064ae8 100644
> > --- a/tools/lib/bpf/libbpf.c
> > +++ b/tools/lib/bpf/libbpf.c
> > @@ -4126,8 +4126,8 @@ static int perf_event_open_probe(bool uprobe, bool retprobe, const char *name,
> >       }
> >       attr.size = sizeof(attr);
> >       attr.type = type;
> > -     attr.config1 = (uint64_t)(void *)name; /* kprobe_func or uprobe_path */
> > -     attr.config2 = offset;                 /* kprobe_addr or probe_offset */
> > +     attr.config1 = ptr_to_u64(name); /* kprobe_func or uprobe_path */
> > +     attr.config2 = offset;           /* kprobe_addr or probe_offset */
> >
> >       /* pid filter is meaningful only for uprobes */
> >       pfd = syscall(__NR_perf_event_open, &attr,
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ