mbox series

[v2,bpf-next,0/9] libbpf random fixes

Message ID 20190529173611.4012579-1-andriin@fb.com
Headers show
Series libbpf random fixes | expand

Message

Andrii Nakryiko May 29, 2019, 5:36 p.m. UTC
This patch set is a collection of unrelated fixes for libbpf.

Patch #1 fixes detection of corrupted BPF section w/ instructions.
Patch #2 fixes possible errno clobbering.
Patch #3 simplifies endianness check and brings it in line with few other
similar checks in libbpf.
Patch #4 adds check for failed map name retrieval from ELF symbol name.
Patch #5 fixes return error code to be negative.
Patch #6 fixes using valid fd (0) as a marker of missing associated BTF.
Patch #7 removes redundant logic in two places.
Patch #8 fixes typos in comments and debug output, and fixes formatting.
Patch #9 unwraps a bunch of multi-line statements and comments.

v1->v2:
  - patch #1 simplifications (Song);


Andrii Nakryiko (9):
  libbpf: fix detection of corrupted BPF instructions section
  libbpf: preserve errno before calling into user callback
  libbpf: simplify endianness check
  libbpf: check map name retrieved from ELF
  libbpf: fix error code returned on corrupted ELF
  libbpf: use negative fd to specify missing BTF
  libbpf: simplify two pieces of logic
  libbpf: typo and formatting fixes
  libbpf: reduce unnecessary line wrapping

 tools/lib/bpf/libbpf.c | 148 +++++++++++++++++------------------------
 1 file changed, 60 insertions(+), 88 deletions(-)

Comments

Daniel Borkmann May 29, 2019, 11:26 p.m. UTC | #1
On 05/29/2019 07:36 PM, Andrii Nakryiko wrote:
> This patch set is a collection of unrelated fixes for libbpf.
> 
> Patch #1 fixes detection of corrupted BPF section w/ instructions.
> Patch #2 fixes possible errno clobbering.
> Patch #3 simplifies endianness check and brings it in line with few other
> similar checks in libbpf.
> Patch #4 adds check for failed map name retrieval from ELF symbol name.
> Patch #5 fixes return error code to be negative.
> Patch #6 fixes using valid fd (0) as a marker of missing associated BTF.
> Patch #7 removes redundant logic in two places.
> Patch #8 fixes typos in comments and debug output, and fixes formatting.
> Patch #9 unwraps a bunch of multi-line statements and comments.
> 
> v1->v2:
>   - patch #1 simplifications (Song);
> 
> 
> Andrii Nakryiko (9):
>   libbpf: fix detection of corrupted BPF instructions section
>   libbpf: preserve errno before calling into user callback
>   libbpf: simplify endianness check
>   libbpf: check map name retrieved from ELF
>   libbpf: fix error code returned on corrupted ELF
>   libbpf: use negative fd to specify missing BTF
>   libbpf: simplify two pieces of logic
>   libbpf: typo and formatting fixes
>   libbpf: reduce unnecessary line wrapping
> 
>  tools/lib/bpf/libbpf.c | 148 +++++++++++++++++------------------------
>  1 file changed, 60 insertions(+), 88 deletions(-)
> 

Applied, thanks!