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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 6 Mar 2020 09:51:58 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Song Liu <songliubraving@...com>
Cc:     Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        "quentin@...valent.com" <quentin@...valent.com>,
        Kernel Team <Kernel-team@...com>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "arnaldo.melo@...il.com" <arnaldo.melo@...il.com>,
        "jolsa@...nel.org" <jolsa@...nel.org>
Subject: Re: [PATCH v4 bpf-next 0/4] bpftool: introduce prog profile

On Thu, Mar 05, 2020 at 08:03:53PM +0000, Song Liu wrote:

SNIP

> >> 	prog.c:1650:29: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1650 |  __u32 m, cpu, num_cpu = obj->rodata->num_cpu;
> >> 	      |                             ^~
> >> 	prog.c: In function ‘profile_open_perf_events’:
> >> 	prog.c:1810:19: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1810 |   sizeof(int), obj->rodata->num_cpu * obj->rodata->num_metric);
> >> 	      |                   ^~
> >> 	prog.c:1810:42: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1810 |   sizeof(int), obj->rodata->num_cpu * obj->rodata->num_metric);
> >> 	      |                                          ^~
> >> 	prog.c:1825:26: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1825 |   for (cpu = 0; cpu < obj->rodata->num_cpu; cpu++) {
> >> 	      |                          ^~
> >> 	prog.c: In function ‘do_profile’:
> >> 	prog.c:1904:13: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1904 |  profile_obj->rodata->num_cpu = num_cpu;
> >> 	      |             ^~
> >> 	prog.c:1905:13: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1905 |  profile_obj->rodata->num_metric = num_metric;
> >> 	      |             ^~
> >> 	make: *** [Makefile:129: prog.o] Error 1
> > 
> > I guess you need a newer version of clang that supports global data in BPF programs. 
> 
> Hi Jiri,
> 
> Have you got chance to test this with latest clang? 

yep, got it compiled with new clang

I was testing in on bpftrace programs and couldn't made it work,
because it relies on BTF info.. so I got stuck ;-)

  # bpftool prog profile id 241 duration 3 cycles instructions llc_misses
  Error: prog FD 3 doesn't have valid btf

nit.. ^^^ you could display ID instead of FD in here

I need to check if we can provide BTF info for bpftrace programs

jirka

Powered by blists - more mailing lists