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]
Date:	Sun, 13 Dec 2015 20:28:22 -0800
From:	Alexei Starovoitov <alexei.starovoitov@...il.com>
To:	"Wangnan (F)" <wangnan0@...wei.com>
Cc:	pi3orama <pi3orama@....com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	namhyung@...nel.org, linux-kernel@...r.kernel.org,
	mingo@...nel.org, lizefan@...wei.com,
	Alexei Starovoitov <ast@...nel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Subject: Re: [PATCH v4 09/16] perf tools: Enable indices setting syntax for
 BPF maps

On Mon, Dec 14, 2015 at 11:27:36AM +0800, Wangnan (F) wrote:
> 
> 
> On 2015/12/12 2:21, Alexei Starovoitov wrote:
> >On Fri, Dec 11, 2015 at 08:39:35PM +0800, pi3orama wrote:
> >>>static u64 (*bpf_ktime_get_ns)(void) =
> >>>     (void *)5;
> >>>static int (*bpf_trace_printk)(const char *fmt, int fmt_size, ...) =
> >>>     (void *)6;
> >>>static int (*bpf_get_smp_processor_id)(void) =
> >>>     (void *)8;
> >>>static int (*bpf_perf_event_output)(void *, struct bpf_map_def *, int,
> >>>void *, unsigned long) =
> >>>     (void *)23;
> >>>
> >>>Where can I get this magical mistery table? Could this be hidden away in
> >>>some .h file automagically included in bpf scriptlets so that n00bies
> >>>like me don't have to be wtf'ing?
> >>>
> >>They are function numbers defined in bpf.h and bpf-common.h, but they are Linux
> >>headers. Directly include them causes many error for llvm. Also, the function
> >>prototypes are BPF specific and can't included in Linux source. We should have
> >>a place holds those indices and prototypes together.
> >wait, what kind of errors?
> >they are in uapi, so gets installed into /usr/include eventually
> >and I haven't seen any erros either with gcc or clang.
> >
> Sorry. I saw error because I use
> 
> #include <linux/bpf.h>
> 
> It is okay if I use
> 
> #include <uapi/linux/bpf.h>

then let's use that instead of copy-paste. thanks

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ