Re: [RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-18 Thread Alexei Starovoitov
On 5/18/15 1:34 PM, Arnaldo Carvalho de Melo wrote: So, lets take a look at: tools/include/linux/kernel.h... bummer, that one wasn't yet moved from tools/perf/util/include/linux/kernel.h there. Will do, and then it has this: #ifndef min #define min(x, y) ({\

Re: [RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-18 Thread Arnaldo Carvalho de Melo
Em Mon, May 18, 2015 at 11:27:17AM -0700, Alexei Starovoitov escreveu: > On 5/17/15 3:56 AM, Wang Nan wrote: > >Expand bpf_obj_elf_collect() to collect license and kernel version > >information in eBPF object file. eBPF object file should have a section > >named 'license', which contains a string.

Re: [RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-18 Thread Alexei Starovoitov
On 5/17/15 3:56 AM, Wang Nan wrote: Expand bpf_obj_elf_collect() to collect license and kernel version information in eBPF object file. eBPF object file should have a section named 'license', which contains a string. It should also have a section named 'version', contains a u32

Re: [RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-18 Thread Alexei Starovoitov
On 5/17/15 3:56 AM, Wang Nan wrote: Expand bpf_obj_elf_collect() to collect license and kernel version information in eBPF object file. eBPF object file should have a section named 'license', which contains a string. It should also have a section named 'version', contains a u32

Re: [RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-18 Thread Arnaldo Carvalho de Melo
Em Mon, May 18, 2015 at 11:27:17AM -0700, Alexei Starovoitov escreveu: On 5/17/15 3:56 AM, Wang Nan wrote: Expand bpf_obj_elf_collect() to collect license and kernel version information in eBPF object file. eBPF object file should have a section named 'license', which contains a string. It

Re: [RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-18 Thread Alexei Starovoitov
On 5/18/15 1:34 PM, Arnaldo Carvalho de Melo wrote: So, lets take a look at: tools/include/linux/kernel.h... bummer, that one wasn't yet moved from tools/perf/util/include/linux/kernel.h there. Will do, and then it has this: #ifndef min #define min(x, y) ({\

[RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-17 Thread Wang Nan
Expand bpf_obj_elf_collect() to collect license and kernel version information in eBPF object file. eBPF object file should have a section named 'license', which contains a string. It should also have a section named 'version', contains a u32 LINUX_VERSION_CODE. bpf_obj_validate() is introduced

[RFC PATCH v3 12/37] bpf tools: Collect version and license from ELF sections

2015-05-17 Thread Wang Nan
Expand bpf_obj_elf_collect() to collect license and kernel version information in eBPF object file. eBPF object file should have a section named 'license', which contains a string. It should also have a section named 'version', contains a u32 LINUX_VERSION_CODE. bpf_obj_validate() is introduced