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
| ||
|
Message-ID: <5806D208.90308@huawei.com> Date: Wed, 19 Oct 2016 09:53:12 +0800 From: "Wangnan (F)" <wangnan0@...wei.com> To: Joe Stringer <joe@....org>, Eric Leblond <eric@...it.org> CC: netdev <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, <ast@...com> Subject: Re: [PATCH 1/8] tools lib bpf: add error functions On 2016/10/19 6:52, Joe Stringer wrote: > On 16 October 2016 at 14:18, Eric Leblond <eric@...it.org> wrote: >> The include of err.h is not explicitely needed in exported >> functions and it was causing include conflict with some existing >> code due to redefining some macros. >> >> To fix this, let's have error handling functions provided by the >> library. Furthermore this will allow user to have an homogeneous >> API. >> >> Signed-off-by: Eric Leblond <eric@...it.org> > Does it need to return the error like this or should we just fix up > the bpf_object__open() API to return errors in a simpler form? > > There's already libbpf_set_print(...) for outputting errors, is it > reasonable to just change the library to return NULLs in error cases > instead? Returning error code to caller so caller knows what happen. Other subsystems in perf also do this. Perf hides libbpf's error output (make it silent unless -v), so it needs a way for receiving libbpf's error code. I think this patch is good, decouple libbpf.h and kernel headers. Thank you.
Powered by blists - more mailing lists