Thread (30 messages) 30 messages, 7 authors, 2019-12-03

Re: [PATCH] libbpf: Fix up generation of bpf_helper_defs.h

From: Alexei Starovoitov <hidden>
Date: 2019-11-28 01:53:24
Also in: bpf, linux-perf-users, lkml

On Wed, Nov 27, 2019 at 5:26 PM Arnaldo Carvalho de Melo
[off-list ref] wrote:
On November 27, 2019 10:20:17 PM GMT-03:00, Alexei Starovoitov [off-list ref] wrote:
quoted
On Wed, Nov 27, 2019 at 5:17 PM Arnaldo Carvalho de Melo
[off-list ref] wrote:
quoted
On November 27, 2019 9:59:15 PM GMT-03:00, Alexei Starovoitov
[off-list ref] wrote:
quoted
quoted
On Wed, Nov 27, 2019 at 4:50 PM Arnaldo Carvalho de Melo
[off-list ref] wrote:
quoted
Take it as one, I think it's what should have been in the cset it
is
quoted
quoted
fixing, that way no breakage would have happened.

Ok. I trimmed commit log and applied here:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=1fd450f99272791df8ea8e1b0f5657678e118e90
quoted
What about your other fix and my suggestion there?
(__u64) cast instead of PRI ?
We do this already in two places:
libbpf.c:                shdr_idx, (__u64)sym->st_value);
libbpf.c:             (__u64)sym.st_value,
GELF_ST_TYPE(sym.st_info),
quoted

I'm using the smartphone now, but I thought you first suggested using
a cast to long, if you mean using %llu + cast to __u64, then should be
was ugly as using PRI, IOW, should work on both 64 bit and 32 bit. :-)

Yes. I suggested (long) first, but then found two cases in libbpf that
solve this with (__u64),
so better to stick to that for consistency.
If it's already being used elsewhere in lubbpf, it was tested already with the build containers and since nobody complained, go with it :-)
Ok.
Pushed this fix:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=7c3977d1e80401b1a25efded698b05d60ee26e31
Likely will send PR for bpf tree to Dave tomorrow.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help