Skip to contentSkip to conversation

pull-request: bpf 2018-02-20

DISCUSSION Daniel Borkmann 2 participants 2 messages Feb 20, 2018 – Feb 21, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi David,

The following pull-request contains BPF updates for your *net* tree.

The main changes are:

1) Fix a memory leak in LPM trie's map_free() callback function, where the trie structure itself was not freed since initial implementation. Also a synchronize_rcu() was needed in order to wait for outstanding programs accessing the trie to complete, from Yonghong.

2) Fix sock_map_alloc()'s error path in order to correctly propagate the -EINVAL error in case of too large allocation requests. This was just recently introduced when fixing close hooks via ULP layer, fix from Eric.

3) Do not use GFP_ATOMIC in __cpu_map_entry_alloc(). Reason is that this will not work with the recent __ptr_ring_init_queue_alloc() conversion to kvmalloc_array(), where in case of fallback to vmalloc() that GFP flag is invalid, from Jason.

4) Fix two recent syzkaller warnings: i) fix bpf_prog_array_copy_to_user() when a prog query with a big number of ids was performed where we'd otherwise trigger a warning from allocator side, ii) fix a missing mlock precharge on arraymaps, from Daniel.

5) Two fixes for bpftool in order to avoid breaking JSON output when used in batch mode, from Quentin.

6) Move a pr_debug() in libbpf in order to avoid having an otherwise uninitialized variable in bpf_program__reloc_text(), from Jeremy.

Please consider pulling these changes from:

git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git

Thanks a lot!

----------------------------------------------------------------

The following changes since commit d4014d8cc6dfa964e3e66df525de2384e3583018:

rds: do not call ->conn_alloc with GFP_KERNEL (2018-02-13 13:52:02 -0500)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git

for you to fetch changes up to b1a2ce825737b0165cc08e6f98f8c0ea1affdd60:

tools/libbpf: Avoid possibly using uninitialized variable (2018-02-20 21:08:20 +0100)

----------------------------------------------------------------
Daniel Borkmann (3):
bpf: fix bpf_prog_array_copy_to_user warning from perf event prog query Merge branch 'bpf-bpftool-json-fixes'
bpf: fix mlock precharge on arraymaps

Eric Dumazet (1):
bpf: fix sock_map_alloc() error path

Jason Wang (1):
bpf: cpumap: use GFP_KERNEL instead of GFP_ATOMIC in __cpu_map_entry_alloc()

Jeremy Cline (1):
tools/libbpf: Avoid possibly using uninitialized variable

Quentin Monnet (2):
tools: bpftool: preserve JSON for batch mode when dumping insns to file
tools: bpftool: preserve JSON output on errors on batch file parsing

Yonghong Song (1):
bpf: fix memory leak in lpm_trie map_free callback function

 kernel/bpf/arraymap.c    | 28 ++++++++++++++++------------
 kernel/bpf/core.c        |  2 +-
 kernel/bpf/cpumap.c      |  2 +-
 kernel/bpf/lpm_trie.c    | 11 +++++++----
 kernel/bpf/sockmap.c     |  3 ++-
 kernel/trace/bpf_trace.c |  2 ++
 tools/bpf/bpftool/main.c |  2 +-
 tools/bpf/bpftool/prog.c |  3 +++
 tools/lib/bpf/libbpf.c   |  5 +++--
 9 files changed, 36 insertions(+), 22 deletions(-)
maintainer
#1 lore raw

From: Daniel Borkmann <[email protected]>
Date: Tue, 20 Feb 2018 22:08:32 +0100

Quoted 3 lines

The following pull-request contains BPF updates for your *net* tree.

The main changes are:

...

Quoted 3 lines

Please consider pulling these changes from:

git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git

Pulled, thanks Daniel.