[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150528014432.GA20764@Alexeis-MacBook-Pro.local>
Date: Wed, 27 May 2015 18:44:33 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Wang Nan <wangnan0@...wei.com>
Cc: paulus@...ba.org, a.p.zijlstra@...llo.nl, mingo@...hat.com,
acme@...nel.org, namhyung@...nel.org, jolsa@...nel.org,
dsahern@...il.com, daniel@...earbox.net, brendan.d.gregg@...il.com,
masami.hiramatsu.pt@...achi.com, lizefan@...wei.com,
linux-kernel@...r.kernel.org, pi3orama@....com
Subject: Re: [RFC PATCH v4 06/29] bpf tools: Open eBPF object file and do
basic validation
On Wed, May 27, 2015 at 05:19:41AM +0000, Wang Nan wrote:
> This patch defines basic interface of libbpf. 'struct bpf_object' will
> be the handler of each object file. Its internal structure is hide to
> user. eBPF object files are compiled by LLVM as ELF format. In this
> patch, libelf is used to open those files, read EHDR and do basic
> validation according to e_type and e_machine.
>
> All elf related staffs are grouped together and reside in efile field of
> 'struct bpf_object'. bpf_object__elf_finish() is introduced to clear it.
>
> After all eBPF programs in an object file are loaded, related ELF
> information is useless. Close the object file and free those memory.
>
> zfree() and zclose() are introduced to ensure setting NULL pointers and
> negative file descriptors after resources are released.
>
> Signed-off-by: Wang Nan <wangnan0@...wei.com>
the __ notation actually looks good in this context.
Acked-by: Alexei Starovoitov <ast@...mgrid.com>
btw, you didn't cc me on this set, luckily I found it on lkml.
--
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