]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: fix crash in XDP socket part with new larger BPF_LOG_BUF_SIZE
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 10 Apr 2019 06:54:16 +0000 (08:54 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 10 Apr 2019 07:51:50 +0000 (09:51 +0200)
commitda3eb437a0e5c459d4a28419be06793e5dd27de9
tree3f3d8e6de145a43ce2a9da19fa6fe250b566ffb2
parentc512251fe5e387862be4c018900999c7c823b2d5
libbpf: fix crash in XDP socket part with new larger BPF_LOG_BUF_SIZE

In commit 62f8beba464a ("libbpf: teach libbpf about log_level bit 2"),
the BPF_LOG_BUF_SIZE was increased to 16M. The XDP socket part of
libbpf allocated the log_buf on the stack, but for the new 16M buffer
size this is not going to work. Change the code so it uses a 16K buffer
instead.

Fixes: 62f8beba464a ("libbpf: teach libbpf about log_level bit 2")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/xsk.c